diff options
author | Terence Lee <hone02@gmail.com> | 2013-12-17 01:43:05 -0500 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2013-12-17 22:02:43 -0500 |
commit | bc56cc49f0ace974967b9d7d1037ecf1bce3292b (patch) | |
tree | 00679a07b94376e6b5a8564d63ffb922f08855e0 | |
parent | bead9260b6eea2ef6bc1327f945caa79d764118a (diff) | |
download | bundler-bc56cc49f0ace974967b9d7d1037ecf1bce3292b.tar.gz |
fix build for Ruby 2.1.0
-rw-r--r-- | lib/bundler/rubygems_integration.rb | 11 | ||||
-rw-r--r-- | spec/support/builders.rb | 6 |
2 files changed, 12 insertions, 5 deletions
diff --git a/lib/bundler/rubygems_integration.rb b/lib/bundler/rubygems_integration.rb index 7e53937964..0b3d2c59e6 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -153,7 +153,7 @@ module Bundler end end - def build(spec) + def build(spec, skip_validation = false) require 'rubygems/builder' Gem::Builder.new(spec).build end @@ -417,6 +417,11 @@ module Bundler def find_name(name) Gem::Specification.find_all_by_name name end + + def build(spec, skip_validation = false) + require 'rubygems/builder' + Gem::Builder.new(spec).build(skip_validation) + end end # Rubygems 1.8.0 to 1.8.4 @@ -481,9 +486,9 @@ module Bundler return p end - def build(spec) + def build(spec, skip_validation = false) require 'rubygems/package' - Gem::Package.build(spec) + Gem::Package.build(spec, skip_validation) end end diff --git a/spec/support/builders.rb b/spec/support/builders.rb index 856f0479cc..9cb923bf55 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -234,7 +234,9 @@ module Spec end # Capistrano did this (at least until version 2.5.10) - build_gem "double_deps" do |s| + # Rubygems 2.2 doesn't allow the specifying of a dependency twice + # See https://github.com/rubygems/rubygems/commit/03dbac93a3396a80db258d9bc63500333c25bd2f + build_gem "double_deps", "1.0", :skip_validation => true do |s| s.add_dependency "net-ssh", ">= 1.0.0" s.add_dependency "net-ssh" end @@ -605,7 +607,7 @@ module Spec @spec.authors = ["that guy"] end - Bundler.rubygems.build(@spec) + Bundler.rubygems.build(@spec, opts[:skip_validation]) if opts[:to_system] `gem install --ignore-dependencies #{@spec.full_name}.gem` else |