diff options
author | Andre Arko <andre@arko.net> | 2015-07-18 13:37:04 -0600 |
---|---|---|
committer | Andre Arko <andre@arko.net> | 2015-07-18 13:37:04 -0600 |
commit | b7b6d967079e040ad1fc070bf4ebca398ae4f117 (patch) | |
tree | 144edcc319c98c3d504fa4a9064ae892cda432a7 | |
parent | 3328f9207d3025a121d2ef60f7427193cfc00ca9 (diff) | |
download | bundler-b7b6d967079e040ad1fc070bf4ebca398ae4f117.tar.gz |
Update spec to fail, then fix itaa-warn-invalid-gemspecs
-rw-r--r-- | lib/bundler.rb | 7 | ||||
-rw-r--r-- | spec/install/gemfile/path_spec.rb | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/lib/bundler.rb b/lib/bundler.rb index 95c86a73d2..7059830a46 100644 --- a/lib/bundler.rb +++ b/lib/bundler.rb @@ -367,16 +367,13 @@ module Bundler else spec = eval_gemspec(path, contents) end - warn_on_invalid_specs(spec) if validate + Bundler.rubygems.validate(spec) if spec && validate spec end - end - - def warn_on_invalid_specs(spec) - spec && Bundler.rubygems.validate(spec) rescue Gem::InvalidSpecificationException => e Bundler.ui.warn "The gemspec at #{file} is not valid. " \ "The validation error was '#{e.message}'" + nil end def clear_gemspec_cache diff --git a/spec/install/gemfile/path_spec.rb b/spec/install/gemfile/path_spec.rb index b07038136f..a38981150b 100644 --- a/spec/install/gemfile/path_spec.rb +++ b/spec/install/gemfile/path_spec.rb @@ -141,7 +141,7 @@ describe "bundle install with explicit source paths" do should_be_installed "premailer 1.0.0" end - it "errors on invalid specs", :rubygems => "1.7" do + it "warns on invalid specs", :rubygems => "1.7" do build_lib "foo" gemspec = lib_path("foo-1.0").join("foo.gemspec").to_s @@ -158,7 +158,7 @@ describe "bundle install with explicit source paths" do G expect(out).to match(/missing value for attribute version/) - should_not_be_installed("foo 1.0") + expect(out).to_not include("ERROR REPORT") end it "supports gemspec syntax" do |