diff options
author | Samuel Giddins <segiddins@segiddins.me> | 2016-02-05 10:44:54 -0600 |
---|---|---|
committer | Samuel Giddins <segiddins@segiddins.me> | 2016-02-05 10:44:54 -0600 |
commit | 1f4a36fcf467c6af469bfa8a89032464f30b99bd (patch) | |
tree | 538a355da2cb1a90e40340c19e94ea5733626691 | |
parent | 661a2d392346094ffbc671d8dbb2e10710f02dbe (diff) | |
download | bundler-1f4a36fcf467c6af469bfa8a89032464f30b99bd.tar.gz |
[RuboCop] Update to 0.37.0
-rw-r--r-- | .rubocop_todo.yml | 25 | ||||
-rw-r--r-- | Rakefile | 4 | ||||
-rwxr-xr-x | bin/rubocop | 2 | ||||
-rw-r--r-- | lib/bundler/installer/parallel_installer.rb | 2 | ||||
-rw-r--r-- | spec/support/ruby_ext.rb | 2 |
5 files changed, 16 insertions, 19 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 3ee0c03b..e5024ea0 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2016-01-14 15:41:59 -0600 using RuboCop version 0.36.0. +# on 2016-02-05 10:43:08 -0600 using RuboCop version 0.37.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 @@ -13,10 +13,9 @@ Lint/Eval: - 'lib/bundler/endpoint_specification.rb' - 'spec/support/streams.rb' -# Offense count: 5 +# Offense count: 4 Lint/HandleExceptions: Exclude: - - 'lib/bundler/fetcher/dependency.rb' - 'lib/bundler/installer.rb' - 'lib/bundler/psyched_yaml.rb' - 'lib/bundler/vendored_persistent.rb' @@ -53,7 +52,7 @@ Lint/UselessAssignment: - 'lib/bundler/index.rb' - 'lib/bundler/installer.rb' -# Offense count: 1057 +# Offense count: 1291 # Configuration parameters: AllowHeredoc, AllowURI, URISchemes. # URISchemes: http, https Metrics/LineLength: @@ -85,8 +84,9 @@ Performance/RedundantMatch: - 'lib/bundler/definition.rb' - 'lib/bundler/lockfile_parser.rb' -# Offense count: 8 +# Offense count: 6 # Cop supports --auto-correct. +# Configuration parameters: MaxKeyValuePairs. Performance/RedundantMerge: Exclude: - 'lib/bundler/cli/gem.rb' @@ -129,7 +129,7 @@ Style/ConditionalAssignment: - 'lib/bundler/source/git.rb' - 'lib/bundler/source/rubygems.rb' -# Offense count: 122 +# Offense count: 118 Style/Documentation: Enabled: false @@ -154,7 +154,7 @@ Style/IfInsideElse: - 'lib/bundler/cli/install.rb' - 'lib/bundler/definition.rb' -# Offense count: 2 +# Offense count: 4 # Cop supports --auto-correct. # Configuration parameters: SupportedStyles, IndentationWidth. # SupportedStyles: special_inside_parentheses, consistent, align_brackets @@ -174,10 +174,9 @@ Style/ModuleFunction: Style/MultilineMethodCallIndentation: Enabled: false -# Offense count: 8 +# Offense count: 5 Style/NestedParenthesizedCalls: Exclude: - - 'lib/bundler/fetcher.rb' - 'lib/bundler/resolver.rb' - 'spec/bundler/shared_helpers_spec.rb' - 'spec/commands/lock_spec.rb' @@ -197,19 +196,18 @@ Style/PredicateName: - 'lib/bundler/source/git/git_proxy.rb' - 'lib/bundler/source/path.rb' -# Offense count: 9 +# Offense count: 22 # Configuration parameters: EnforcedStyle, SupportedStyles. # SupportedStyles: compact, exploded Style/RaiseArgs: Enabled: false -# Offense count: 3 +# Offense count: 2 # Cop supports --auto-correct. Style/RedundantParentheses: Exclude: - 'lib/bundler/cli/console.rb' - 'lib/bundler/dsl.rb' - - 'spec/support/ruby_ext.rb' # Offense count: 1 # Cop supports --auto-correct. @@ -234,7 +232,7 @@ Style/TrailingCommaInLiteral: - 'spec/support/artifice/endpoint.rb' - 'spec/support/rubygems_ext.rb' -# Offense count: 20 +# Offense count: 19 # Cop supports --auto-correct. Style/UnneededInterpolation: Exclude: @@ -247,4 +245,3 @@ Style/UnneededInterpolation: - 'spec/support/artifice/endpoint.rb' - 'spec/support/artifice/endpoint_500.rb' - 'spec/support/fakeweb/windows.rb' - - 'spec/support/rubygems_ext.rb' @@ -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.36.0" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement + deps["rubocop"] ||= "= 0.37.0" 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.36.0" + gem "rubocop", "= 0.37.0" require "rubocop/rake_task" RuboCop::RakeTask.new end diff --git a/bin/rubocop b/bin/rubocop index 7460dafa..6f638bc4 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.36.0" +gem "rubocop", "= 0.37.0" Gem::Specification.unresolved_deps.each do |_name, dep| gem dep.name, *dep.requirement diff --git a/lib/bundler/installer/parallel_installer.rb b/lib/bundler/installer/parallel_installer.rb index 0a276aa9..bd19da47 100644 --- a/lib/bundler/installer/parallel_installer.rb +++ b/lib/bundler/installer/parallel_installer.rb @@ -46,7 +46,7 @@ class ParallelInstaller @dependencies ||= begin deps = all_dependencies.reject {|dep| ignorable_dependency? dep } missing = deps.reject {|dep| all_spec_names.include? dep.name } - if missing.size > 0 + unless missing.empty? raise Bundler::LockfileError, "Your Gemfile.lock is corrupt. The following #{missing.size > 1 ? "gems are" : "gem is"} missing " \ "from the DEPENDENCIES section: '#{missing.map(&:name).join('\' \'')}'" end diff --git a/spec/support/ruby_ext.rb b/spec/support/ruby_ext.rb index 7f1eabf4..809708b9 100644 --- a/spec/support/ruby_ext.rb +++ b/spec/support/ruby_ext.rb @@ -11,7 +11,7 @@ class IO IO.select([self], nil, nil, select_timeout) break if eof? # stop raising :-( buffer << readpartial(chunk_size) - rescue(EOFError) + rescue EOFError break end end |