summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Giddins <segiddins@segiddins.me>2016-02-09 10:54:13 -0600
committerSamuel Giddins <segiddins@segiddins.me>2016-02-09 15:25:10 -0600
commit3d538a252f7b0cc0480457cd207f5f53946db13f (patch)
tree2c8bce86952c12ca4a01888f6be521457347618b
parentec2fe21c20a1d61e0ec8345d0bd5c4d575f6f7bf (diff)
downloadbundler-seg-rubocop-0.37.1.tar.gz
[RuboCop] Update to 0.37.1seg-rubocop-0.37.1
-rw-r--r--.rubocop_todo.yml13
-rw-r--r--Rakefile4
-rwxr-xr-xbin/rubocop2
-rw-r--r--lib/bundler/definition.rb19
4 files changed, 13 insertions, 25 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml
index e5024ea0de..cec50c1b88 100644
--- a/.rubocop_todo.yml
+++ b/.rubocop_todo.yml
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
-# on 2016-02-05 10:43:08 -0600 using RuboCop version 0.37.0.
+# on 2016-02-09 10:53:24 -0600 using RuboCop version 0.37.1.
# 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
@@ -25,7 +25,7 @@ Lint/IneffectiveAccessModifier:
Exclude:
- 'lib/bundler/settings.rb'
-# Offense count: 4
+# Offense count: 3
Lint/NestedMethodDefinition:
Exclude:
- 'lib/bundler/inline.rb'
@@ -52,7 +52,7 @@ Lint/UselessAssignment:
- 'lib/bundler/index.rb'
- 'lib/bundler/installer.rb'
-# Offense count: 1291
+# Offense count: 1295
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
# URISchemes: http, https
Metrics/LineLength:
@@ -63,7 +63,7 @@ Metrics/LineLength:
Metrics/ParameterLists:
Max: 6
-# Offense count: 53
+# Offense count: 52
Metrics/PerceivedComplexity:
Max: 54
@@ -148,11 +148,10 @@ Style/GlobalVars:
- 'spec/spec_helper.rb'
- 'spec/support/helpers.rb'
-# Offense count: 2
+# Offense count: 1
Style/IfInsideElse:
Exclude:
- 'lib/bundler/cli/install.rb'
- - 'lib/bundler/definition.rb'
# Offense count: 4
# Cop supports --auto-correct.
@@ -196,7 +195,7 @@ Style/PredicateName:
- 'lib/bundler/source/git/git_proxy.rb'
- 'lib/bundler/source/path.rb'
-# Offense count: 22
+# Offense count: 23
# Configuration parameters: EnforcedStyle, SupportedStyles.
# SupportedStyles: compact, exploded
Style/RaiseArgs:
diff --git a/Rakefile b/Rakefile
index fc578f93a1..e22e3f693b 100644
--- a/Rakefile
+++ b/Rakefile
@@ -34,7 +34,7 @@ namespace :spec do
deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d|
[d.name, d.requirement.to_s]
end]
- deps["rubocop"] ||= "= 0.37.0" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement
+ deps["rubocop"] ||= "= 0.37.1" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement
# JRuby can't build ronn or rdiscount, so we skip that
if defined?(RUBY_ENGINE) && RUBY_ENGINE == "jruby"
@@ -88,7 +88,7 @@ begin
if RUBY_VERSION >= "1.9.3"
# can't go in the gemspec because of the ruby version requirement
- gem "rubocop", "= 0.37.0"
+ gem "rubocop", "= 0.37.1"
require "rubocop/rake_task"
RuboCop::RakeTask.new
end
diff --git a/bin/rubocop b/bin/rubocop
index 6f638bc47b..bc81f5cc88 100755
--- a/bin/rubocop
+++ b/bin/rubocop
@@ -8,7 +8,7 @@ bundler_spec.dependencies.each do |dep|
gem dep.name, dep.requirement.to_s
end
-gem "rubocop", "= 0.37.0"
+gem "rubocop", "= 0.37.1"
Gem::Specification.unresolved_deps.each do |_name, dep|
gem dep.name, *dep.requirement
diff --git a/lib/bundler/definition.rb b/lib/bundler/definition.rb
index d98d8b15b6..944b8089c1 100644
--- a/lib/bundler/definition.rb
+++ b/lib/bundler/definition.rb
@@ -280,22 +280,11 @@ module Bundler
end
def locked_ruby_version
- if @unlock[:ruby]
- if ruby_version && !@locked_ruby_version
- return Bundler::RubyVersion.system
- elsif ruby_version && @locked_ruby_version
- return Bundler::RubyVersion.system
- elsif !ruby_version && @locked_ruby_version
- return nil
- end
+ return unless ruby_version
+ if @unlock[:ruby] || !@locked_ruby_version
+ Bundler::RubyVersion.system
else
- if ruby_version && !@locked_ruby_version
- return Bundler::RubyVersion.system
- elsif ruby_version && @locked_ruby_version
- return @locked_ruby_version
- elsif !ruby_version && @locked_ruby_version
- return @locked_ruby_version
- end
+ @locked_ruby_version
end
end