diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-07-27 12:44:51 -0500 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-08-02 15:04:28 -0500 |
commit | 29746bd6f37b1ff0b34c108b389d4603a20de110 (patch) | |
tree | 06e73e853f59b185db9920b3ae06d789987e26b5 | |
parent | 17107b22ad41ee306f534bcee375bb3d08d5f460 (diff) | |
download | bundler-29746bd6f37b1ff0b34c108b389d4603a20de110.tar.gz |
[RuboCop] Fix offenses
-rw-r--r-- | .rubocop_todo.yml | 9 | ||||
-rw-r--r-- | spec/support/matchers.rb | 5 | ||||
-rw-r--r-- | spec/support/the_bundle.rb | 3 |
3 files changed, 8 insertions, 9 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4761c7872b..3a23005c2b 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-07-14 22:16:31 -0500 using RuboCop version 0.41.2. +# on 2016-07-27 12:41:39 -0500 using RuboCop version 0.41.2. # 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 @@ -45,14 +45,13 @@ Lint/UselessAccessModifier: Exclude: - 'lib/bundler/fetcher.rb' -# Offense count: 7 +# Offense count: 6 Lint/UselessAssignment: Exclude: - - 'lib/bundler/graph.rb' - 'lib/bundler/index.rb' - 'lib/bundler/installer.rb' -# Offense count: 1629 +# Offense count: 1686 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes. # URISchemes: http, https Metrics/LineLength: @@ -106,7 +105,7 @@ Style/CaseEquality: Style/ClassAndModuleChildren: Enabled: false -# Offense count: 11 +# Offense count: 10 # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle, SupportedStyles, SingleLineConditionsOnly. # SupportedStyles: assign_to_condition, assign_inside_condition diff --git a/spec/support/matchers.rb b/spec/support/matchers.rb index e4244294b1..4545feabfa 100644 --- a/spec/support/matchers.rb +++ b/spec/support/matchers.rb @@ -175,9 +175,8 @@ module Spec next "checking for #{name} failed:\n#{e}" end next if out == "WIN" - if version.nil? - next "expected #{name} to not be installed, but it was" - elsif Gem::Version.new(out) == Gem::Version.new(version) + next "expected #{name} to not be installed, but it was" if version.nil? + if Gem::Version.new(out) == Gem::Version.new(version) next "expected #{name} (#{version}) not to be installed, but it was" end end.compact diff --git a/spec/support/the_bundle.rb b/spec/support/the_bundle.rb index 85282db7cb..86df9cd9c7 100644 --- a/spec/support/the_bundle.rb +++ b/spec/support/the_bundle.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "support/helpers" require "support/path" @@ -17,7 +18,7 @@ module Spec def to_s "the bundle" end - alias inspect to_s + alias_method :inspect, :to_s def locked? lockfile.file? |