diff options
author | Terence Lee <hone02@gmail.com> | 2013-12-17 01:43:05 -0500 |
---|---|---|
committer | Terence Lee <hone02@gmail.com> | 2013-12-17 01:43:05 -0500 |
commit | 9076b85c813691a21b4f0ce20938bdebc0d2858d (patch) | |
tree | c833acb160267f8886c14fcd95a6babaff83740d | |
parent | 1d8debe29d2352c57d80afafd4fec066b1a6b8ef (diff) | |
download | bundler-9076b85c813691a21b4f0ce20938bdebc0d2858d.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 cf0d628e8c..ae970af7d5 100644 --- a/lib/bundler/rubygems_integration.rb +++ b/lib/bundler/rubygems_integration.rb @@ -177,7 +177,7 @@ module Bundler end end - def build(spec) + def build(spec, skip_validation = false) require 'rubygems/builder' Gem::Builder.new(spec).build end @@ -442,6 +442,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 @@ -506,9 +511,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 05c09a0b44..068d381044 100644 --- a/spec/support/builders.rb +++ b/spec/support/builders.rb @@ -236,7 +236,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 @@ -609,7 +611,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 |