diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-08 15:32:18 +0200 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-07-08 15:36:47 +0200 |
commit | f288806d0223955974096e8360fa5ec7ba6b0d07 (patch) | |
tree | acf96060d5a76e2ba2e3f233e18786ee885fb8ff /bin/rubocop | |
parent | f38ebff92fb4421ac4dcca752dc9a0047dedfc9f (diff) | |
download | bundler-f288806d0223955974096e8360fa5ec7ba6b0d07.tar.gz |
Remove development dependencies from gemspecremove_add_development_dependency_from_gemspec
And refactor development setup.
Diffstat (limited to 'bin/rubocop')
-rwxr-xr-x | bin/rubocop | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/bin/rubocop b/bin/rubocop index ef86f084a9..f700d073ca 100755 --- a/bin/rubocop +++ b/bin/rubocop @@ -3,18 +3,10 @@ load File.expand_path("../with_rubygems", __FILE__) if ENV["RGV"] -require "rubygems" - -bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__)) -rubocop = bundler_spec.dependencies.find do |dep| - dep.name == "rubocop" -end - -rubocop_requirement = rubocop.requirement.to_s +require_relative "../spec/support/rubygems_ext" begin - gem "rubocop", rubocop_requirement - load Gem.bin_path("rubocop", "rubocop") -rescue Gem::LoadError - warn "We couln't activate rubocop (#{rubocop_requirement}). Try `gem install rubocop:'#{rubocop_requirement}'`" + Spec::Rubygems.gem_load("rubocop", "rubocop") +rescue Gem::LoadError => e + warn "We couln't activate rubocop (#{e.requirement}). Run `gem install rubocop:'#{e.requirement}'`" end |