From 1fe9763c191640f4144c858ccf44754edfe27395 Mon Sep 17 00:00:00 2001 From: htwroclau <35439320+htwroclau@users.noreply.github.com> Date: Mon, 4 Mar 2019 02:38:56 +0900 Subject: [PATCH] chore: Fix RuboCop Style/IfInsideElse (#915) --- .rubocop_todo.yml | 7 +------ spec/support/helper_methods.rb | 4 ++-- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 050cd1ad..de57da0b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2019-03-03 12:56:55 +0100 using RuboCop version 0.65.0. +# on 2019-03-04 02:27:02 +0900 using RuboCop version 0.65.0. # The point is for the user to remove these configuration records # one by one as the offenses are removed from the code base. # Note that changes in the inspected code, or installation of new @@ -99,11 +99,6 @@ Style/GuardClause: - 'lib/faraday/request/url_encoded.rb' - 'lib/faraday/utils/headers.rb' -# Offense count: 1 -Style/IfInsideElse: - Exclude: - - 'spec/support/helper_methods.rb' - # Offense count: 24 # Cop supports --auto-correct. Style/IfUnlessModifier: diff --git a/spec/support/helper_methods.rb b/spec/support/helper_methods.rb index 28e19640..8f5e6b98 100644 --- a/spec/support/helper_methods.rb +++ b/spec/support/helper_methods.rb @@ -14,8 +14,8 @@ module Faraday def on_feature(name, &block) if @features.nil? superclass.on_feature(name, &block) if superclass.respond_to?(:on_feature) - else - yield if block_given? && @features.include?(name) + elsif block_given? && @features.include?(name) + yield end end