diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-12-14 19:49:16 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2019-12-15 16:41:10 +0900 |
commit | 38002a8adbd98266426940d829429a30af0622a4 (patch) | |
tree | db01bcc2653ba0230a07345c4a3c877246dfe473 /spec/bundler/install | |
parent | e2b192f7d5b4f0e2133bb6cf03cfc609258826be (diff) |
Prepare to release bundler-2.1.0
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2753
Diffstat (limited to 'spec/bundler/install')
-rw-r--r-- | spec/bundler/install/deploy_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gemfile/path_spec.rb | 6 | ||||
-rw-r--r-- | spec/bundler/install/gems/compact_index_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gems/resolving_spec.rb | 8 | ||||
-rw-r--r-- | spec/bundler/install/gems/sudo_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/git_spec.rb | 20 |
6 files changed, 30 insertions, 10 deletions
diff --git a/spec/bundler/install/deploy_spec.rb b/spec/bundler/install/deploy_spec.rb index d607f8bb46..89da3fc801 100644 --- a/spec/bundler/install/deploy_spec.rb +++ b/spec/bundler/install/deploy_spec.rb @@ -146,7 +146,7 @@ RSpec.describe "install with --deployment or --frozen" do expect(the_bundle).to include_gems "path_gem 1.0" FileUtils.rm_r lib_path("path_gem-1.0") - bundle! :install, forgotten_command_line_options(:path => ".bundle", :without => "development", :deployment => true).merge(:env => { :DEBUG => "1" }) + bundle! :install, forgotten_command_line_options(:path => ".bundle", :without => "development", :deployment => true).merge(:env => { "DEBUG" => "1" }) run! "puts :WIN" expect(out).to eq("WIN") end diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb index 786b767354..e53636da09 100644 --- a/spec/bundler/install/gemfile/path_spec.rb +++ b/spec/bundler/install/gemfile/path_spec.rb @@ -439,7 +439,7 @@ RSpec.describe "bundle install with explicit source paths" do gem 'net-ssh', '1.0' G - bundle :check, :env => { "DEBUG" => 1 } + bundle :check, :env => { "DEBUG" => "1" } expect(out).to match(/using resolution from the lockfile/) expect(the_bundle).to include_gems "rack-obama 1.0", "net-ssh 1.0" end @@ -459,7 +459,7 @@ RSpec.describe "bundle install with explicit source paths" do gem 'net-ssh', :path => "#{lib_path("omg")}" G - bundle :check, :env => { "DEBUG" => 1 } + bundle :check, :env => { "DEBUG" => "1" } expect(out).to match(/using resolution from the lockfile/) expect(the_bundle).to include_gems "rack-obama 1.0", "net-ssh 1.0" end @@ -654,7 +654,7 @@ RSpec.describe "bundle install with explicit source paths" do File.open(lib_path("private_lib/Gemfile"), "w") {|f| f.puts gemfile } Dir.chdir(lib_path("private_lib")) do - bundle :install, :env => { "DEBUG" => 1 }, :artifice => "endpoint" + bundle :install, :env => { "DEBUG" => "1" }, :artifice => "endpoint" expect(out).to match(%r{^HTTP GET http://localgemserver\.test/api/v1/dependencies\?gems=rack$}) expect(out).not_to match(/^HTTP GET.*private_lib/) expect(the_bundle).to include_gems "private_lib 2.2" diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 2c145ce643..a294b83d1c 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -51,7 +51,7 @@ RSpec.describe "compact index api" do build_gem "Rack", "0.1" end - install_gemfile! <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4 } + install_gemfile! <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } source "#{source_uri}" gem "rack", "1.0" gem "Rack", "0.1" diff --git a/spec/bundler/install/gems/resolving_spec.rb b/spec/bundler/install/gems/resolving_spec.rb index 26ff40f7aa..52511ff67f 100644 --- a/spec/bundler/install/gems/resolving_spec.rb +++ b/spec/bundler/install/gems/resolving_spec.rb @@ -22,7 +22,7 @@ RSpec.describe "bundle install with install-time dependencies" do build_repo2 path = "#{gem_repo2}/#{Gem::MARSHAL_SPEC_DIR}/actionpack-2.3.2.gemspec.rz" - spec = Marshal.load(Bundler.rubygems.inflate(File.read(path))) + spec = Marshal.load(Bundler.rubygems.inflate(File.binread(path))) spec.dependencies.each do |d| d.instance_variable_set(:@type, :fail) end @@ -108,7 +108,7 @@ RSpec.describe "bundle install with install-time dependencies" do end end - install_gemfile <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo2 } + install_gemfile <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo2.to_s } ruby "#{RUBY_VERSION}" source "http://localgemserver.test/" gem 'rack' @@ -127,7 +127,7 @@ RSpec.describe "bundle install with install-time dependencies" do build_gem "foo1", "1.0" end - install_gemfile <<-G, :artifice => "compact_index_rate_limited", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4 } + install_gemfile <<-G, :artifice => "compact_index_rate_limited", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo4.to_s } ruby "#{RUBY_VERSION}" source "http://localgemserver.test/" gem 'rack' @@ -153,7 +153,7 @@ RSpec.describe "bundle install with install-time dependencies" do shared_examples_for "ruby version conflicts" do it "raises an error during resolution" do - install_gemfile <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo2 } + install_gemfile <<-G, :artifice => "compact_index", :env => { "BUNDLER_SPEC_GEM_REPO" => gem_repo2.to_s } source "http://localgemserver.test/" ruby #{ruby_requirement} gem 'require_ruby' diff --git a/spec/bundler/install/gems/sudo_spec.rb b/spec/bundler/install/gems/sudo_spec.rb index fcafe4a907..170ffaca03 100644 --- a/spec/bundler/install/gems/sudo_spec.rb +++ b/spec/bundler/install/gems/sudo_spec.rb @@ -172,7 +172,7 @@ RSpec.describe "when using sudo", :sudo => true do context "when ENV['BUNDLE_SILENCE_ROOT_WARNING'] is set" do it "skips the warning" do - bundle :install, :sudo => :preserve_env, :env => { "BUNDLE_SILENCE_ROOT_WARNING" => true } + bundle :install, :sudo => :preserve_env, :env => { "BUNDLE_SILENCE_ROOT_WARNING" => "true" } expect(err).to_not include(warning) end end diff --git a/spec/bundler/install/git_spec.rb b/spec/bundler/install/git_spec.rb index c16285241f..cc8bf70b03 100644 --- a/spec/bundler/install/git_spec.rb +++ b/spec/bundler/install/git_spec.rb @@ -61,5 +61,25 @@ RSpec.describe "bundle install" do expect(out).to include("Bundle complete!") end + + it "allows multiple gems from the same git source" do + build_repo2 do + build_lib "foo", "1.0", :path => lib_path("gems/foo") + build_lib "zebra", "2.0", :path => lib_path("gems/zebra") + build_git "gems", :path => lib_path("gems"), :gemspec => false + end + + install_gemfile <<-G + source "#{file_uri_for(gem_repo2)}" + gem "foo", :git => "#{lib_path("gems")}", :glob => "foo/*.gemspec" + gem "zebra", :git => "#{lib_path("gems")}", :glob => "zebra/*.gemspec" + G + + bundle "info foo" + expect(out).to include("* foo (1.0 #{revision_for(lib_path("gems"))[0..6]})") + + bundle "info zebra" + expect(out).to include("* zebra (2.0 #{revision_for(lib_path("gems"))[0..6]})") + end end end |