diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-09 09:39:34 +0100 |
---|---|---|
committer | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-02-09 09:39:34 +0100 |
commit | 664d105f910eb964e76b0dc10abaffaa739e0973 (patch) | |
tree | 24486f8ca7d70104e77b0aa0769fefae82365b52 | |
parent | 9cbc7dd8f77bcc12fd7e4265ebbd948f0e19b7f7 (diff) | |
download | bundler-clean_rake_spec_deps.tar.gz |
Clean up first `bin/rake spec:deps` outputclean_rake_spec_deps
Currently the first time you run `bin/rake spec:deps` on a fresh
installation, you get the following output:
```
Could not find 'automatiek' (~> 0.1.0) among 17 total gem(s)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.7:/usr/local/rvm/gems/ruby-2.3.7@global', execute `gem env` for more information (Gem::MissingSpecError)
Could not find 'mustache' (= 0.99.6) among 17 total gem(s)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.7:/usr/local/rvm/gems/ruby-2.3.7@global', execute `gem env` for more information (Gem::MissingSpecError)
Could not find 'rake' (~> 12.0) - did find: [rake-10.4.2]
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.7:/usr/local/rvm/gems/ruby-2.3.7@global', execute `gem env` for more information (Gem::MissingSpecVersionError)
Could not find 'rdiscount' (~> 2.2) among 17 total gem(s)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.7:/usr/local/rvm/gems/ruby-2.3.7@global', execute `gem env` for more information (Gem::MissingSpecError)
Could not find 'ronn' (~> 0.7.3) among 17 total gem(s)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.7:/usr/local/rvm/gems/ruby-2.3.7@global', execute `gem env` for more information (Gem::MissingSpecError)
Could not find 'rspec' (~> 3.6) among 17 total gem(s)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.7:/usr/local/rvm/gems/ruby-2.3.7@global', execute `gem env` for more information (Gem::MissingSpecError)
Could not find 'rubocop' (= 0.50.0) among 17 total gem(s)
Checked in 'GEM_PATH=/usr/local/rvm/gems/ruby-2.3.7:/usr/local/rvm/gems/ruby-2.3.7@global', execute `gem env` for more information (Gem::MissingSpecError)
```
Nothing has gone wrong but the user might think the opposite. So, avoid
printing these errors.
-rwxr-xr-x | bin/rake | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -5,15 +5,17 @@ load File.expand_path("../with_rubygems", __FILE__) if ENV["RGV"] require "rubygems" -bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__)) -bundler_spec.dependencies.each do |dep| - begin - gem dep.name, dep.requirement - rescue Gem::LoadError => e - $stderr.puts "#{e.message} (#{e.class})" +unless ARGV[0] == "spec:deps" + bundler_spec = Gem::Specification.load(File.expand_path("../../bundler.gemspec", __FILE__)) + bundler_spec.dependencies.each do |dep| + begin + gem dep.name, dep.requirement + rescue Gem::LoadError => e + $stderr.puts "#{e.message} (#{e.class})" + end end -end -Gem.finish_resolve if Gem.respond_to?(:finish_resolve) + Gem.finish_resolve if Gem.respond_to?(:finish_resolve) +end load Gem.bin_path("rake", "rake") |