From 7eedfd15853e197d1da69e07bb54d789bb2333d4 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Sun, 4 Oct 2015 14:22:27 -0500 Subject: [RuboCop] Update to 0.34.1 --- Rakefile | 4 ++-- bin/rubocop | 2 +- exe/bundle_ruby | 2 +- lib/bundler.rb | 4 ++-- spec/support/builders.rb | 5 ++--- 5 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Rakefile b/Rakefile index 9b96a503ba..31dd7f86fe 100644 --- a/Rakefile +++ b/Rakefile @@ -33,7 +33,7 @@ namespace :spec do deps = Hash[BUNDLER_SPEC.development_dependencies.map do |d| [d.name, d.requirement.to_s] end] - deps["rubocop"] ||= "= 0.33.0" if RUBY_VERSION >= "1.9.3" # can't go in the gemspec because of the ruby version requirement + deps["rubocop"] ||= "= 0.34.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.33.0" + gem "rubocop", "= 0.34.1" require "rubocop/rake_task" RuboCop::RakeTask.new end diff --git a/bin/rubocop b/bin/rubocop index 7936c64fa2..56201d51f0 100755 --- a/bin/rubocop +++ b/bin/rubocop @@ -7,5 +7,5 @@ bundler_spec.dependencies.each do |dep| gem dep.name, dep.requirement.to_s end -gem "rubocop", "= 0.33.0" +gem "rubocop", "= 0.34.1" load Gem.bin_path("rubocop", "rubocop") diff --git a/exe/bundle_ruby b/exe/bundle_ruby index 9bee595265..346dbf2ae2 100755 --- a/exe/bundle_ruby +++ b/exe/bundle_ruby @@ -20,7 +20,7 @@ module Bundler end def eval_gemfile(gemfile, contents = nil) - contents ||= File.open(gemfile, "rb") {|f| f.read } + contents ||= File.open(gemfile, "rb", &:read) instance_eval(contents, gemfile.to_s, 1) rescue SyntaxError => e bt = e.message.split("\n")[1..-1] diff --git a/lib/bundler.rb b/lib/bundler.rb index 4f9413540a..d222befc98 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -110,7 +110,7 @@ module Bundler when :write then "write to" when :executable, :exec then "execute" else @permission_type.to_s - end + end "There was an error while trying to #{action} `#{@path}`. " \ "It is likely that you need to grant #{@permission_type} permissions " \ "for that path." @@ -385,7 +385,7 @@ module Bundler end def read_file(file) - File.open(file, "rb") {|f| f.read } + File.open(file, "rb", &:read) end def load_marshal(data) diff --git a/spec/support/builders.rb b/spec/support/builders.rb index c4c4181f6a..95b4b6eb59 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -158,9 +158,7 @@ module Spec RUBY end - build_gem "very_simple_binary" do |s| - s.add_c_extension - end + build_gem "very_simple_binary", &:add_c_extension build_gem "bundler", "0.9" do |s| s.executables = "bundle" @@ -507,6 +505,7 @@ module Spec if options[:rubygems_version] @spec.rubygems_version = options[:rubygems_version] def @spec.mark_version; end + def @spec.validate; end end -- cgit v1.2.1