diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-04-01 20:36:59 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2022-04-28 19:08:49 +0900 |
commit | 678d58c8508ec46aa270e3c5d81fc09cd0fee175 (patch) | |
tree | 34cbc8bb12e609d7a73e35c513090264360ffb49 /spec | |
parent | 479ba9a44b6beda1dce32842bcbc66b6f46a85a0 (diff) |
Merge rubygems master 1e4eda741d732ca1bd7031aef0a16c7348adf7a5
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/5669
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/commands/install_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/commands/update_spec.rb | 30 | ||||
-rw-r--r-- | spec/bundler/install/gemfile/git_spec.rb | 8 | ||||
-rw-r--r-- | spec/bundler/install/gemfile/path_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gems/compact_index_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/install/gems/resolving_spec.rb | 6 | ||||
-rw-r--r-- | spec/bundler/install/gems/standalone_spec.rb | 4 | ||||
-rw-r--r-- | spec/bundler/install/gems/sudo_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/lock/lockfile_spec.rb | 2 |
9 files changed, 29 insertions, 29 deletions
diff --git a/spec/bundler/commands/install_spec.rb b/spec/bundler/commands/install_spec.rb index 9e06c51a08..f189a70b10 100644 --- a/spec/bundler/commands/install_spec.rb +++ b/spec/bundler/commands/install_spec.rb @@ -798,7 +798,7 @@ RSpec.describe "bundle install with gem sources" do it "includes the standalone path" do bundle "binstubs rack", :standalone => true standalone_line = File.read(bundled_app("bin/rackup")).each_line.find {|line| line.include? "$:.unshift" }.strip - expect(standalone_line).to eq %($:.unshift File.expand_path "../../bundle", path.realpath) + expect(standalone_line).to eq %($:.unshift File.expand_path "../bundle", __dir__) end end diff --git a/spec/bundler/commands/update_spec.rb b/spec/bundler/commands/update_spec.rb index ee5d53c527..d013d5bd73 100644 --- a/spec/bundler/commands/update_spec.rb +++ b/spec/bundler/commands/update_spec.rb @@ -1147,7 +1147,7 @@ RSpec.describe "bundle update --bundler" do end it "updates the bundler version in the lockfile without re-resolving if the highest version is already installed" do - system_gems "bundler-2.3.3" + system_gems "bundler-2.3.9" build_repo4 do build_gem "rack", "1.0" @@ -1157,7 +1157,7 @@ RSpec.describe "bundle update --bundler" do source "#{file_uri_for(gem_repo4)}" gem "rack" G - lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, "2.3.3") + lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, "2.3.9") bundle :update, :bundler => true, :artifice => "compact_index", :verbose => true expect(out).to include("Using bundler #{Bundler::VERSION}") @@ -1182,7 +1182,7 @@ RSpec.describe "bundle update --bundler" do end it "updates the bundler version in the lockfile even if the latest version is not installed", :ruby_repo, :realworld do - pristine_system_gems "bundler-2.3.3" + pristine_system_gems "bundler-2.3.9" build_repo4 do build_gem "rack", "1.0" @@ -1192,16 +1192,16 @@ RSpec.describe "bundle update --bundler" do source "#{file_uri_for(gem_repo4)}" gem "rack" G - lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, "2.3.3") + lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, "2.3.9") bundle :update, :bundler => true, :artifice => "vcr", :verbose => true # Only updates properly on modern RubyGems. if Gem.rubygems_version >= Gem::Version.new("3.3.0.dev") - expect(out).to include("Updating bundler to 2.3.4") - expect(out).to include("Using bundler 2.3.4") - expect(out).not_to include("Installing Bundler 2.3.3 and restarting using that version.") + expect(out).to include("Updating bundler to 2.3.10") + expect(out).to include("Using bundler 2.3.10") + expect(out).not_to include("Installing Bundler 2.3.9 and restarting using that version.") expect(lockfile).to eq <<~L GEM @@ -1216,17 +1216,17 @@ RSpec.describe "bundle update --bundler" do rack BUNDLED WITH - 2.3.4 + 2.3.10 L - expect(the_bundle).to include_gems "bundler 2.3.4" + expect(the_bundle).to include_gems "bundler 2.3.10" end expect(the_bundle).to include_gems "rack 1.0" end it "errors if the explicit target version does not exist", :realworld do - pristine_system_gems "bundler-2.3.3" + pristine_system_gems "bundler-2.3.9" build_repo4 do build_gem "rack", "1.0" @@ -1236,7 +1236,7 @@ RSpec.describe "bundle update --bundler" do source "#{file_uri_for(gem_repo4)}" gem "rack" G - lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, "2.3.3") + lockfile lockfile.sub(/(^\s*)#{Bundler::VERSION}($)/, "2.3.9") bundle :update, :bundler => "999.999.999", :artifice => "vcr", :raise_on_error => false @@ -1286,7 +1286,7 @@ RSpec.describe "bundle update --bundler" do end it "does not touch the network if not necessary" do - system_gems "bundler-2.3.3" + system_gems "bundler-2.3.9" build_repo4 do build_gem "rack", "1.0" @@ -1297,7 +1297,7 @@ RSpec.describe "bundle update --bundler" do gem "rack" G - bundle :update, :bundler => "2.3.3", :raise_on_error => false + bundle :update, :bundler => "2.3.9", :raise_on_error => false expect(out).not_to include("Fetching gem metadata from https://rubygems.org/") @@ -1317,10 +1317,10 @@ RSpec.describe "bundle update --bundler" do rack BUNDLED WITH - 2.3.3 + 2.3.9 L - expect(out).to include("Using bundler 2.3.3") + expect(out).to include("Using bundler 2.3.9") end end end diff --git a/spec/bundler/install/gemfile/git_spec.rb b/spec/bundler/install/gemfile/git_spec.rb index 365a84f39e..07995d013b 100644 --- a/spec/bundler/install/gemfile/git_spec.rb +++ b/spec/bundler/install/gemfile/git_spec.rb @@ -1180,7 +1180,7 @@ RSpec.describe "bundle install with git sources" do s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) File.open("\#{path}/foo.rb", "w") do |f| f.puts "FOO = 'YES'" @@ -1273,7 +1273,7 @@ In Gemfile: s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) cur_time = Time.now.to_f.to_s File.open("\#{path}/foo.rb", "w") do |f| @@ -1314,7 +1314,7 @@ In Gemfile: s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) cur_time = Time.now.to_f.to_s File.open("\#{path}/foo.rb", "w") do |f| @@ -1357,7 +1357,7 @@ In Gemfile: s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) cur_time = Time.now.to_f.to_s File.open("\#{path}/foo.rb", "w") do |f| diff --git a/spec/bundler/install/gemfile/path_spec.rb b/spec/bundler/install/gemfile/path_spec.rb index bea7c11dec..515901064f 100644 --- a/spec/bundler/install/gemfile/path_spec.rb +++ b/spec/bundler/install/gemfile/path_spec.rb @@ -137,7 +137,7 @@ RSpec.describe "bundle install with explicit source paths" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" - gem 'foo', :path => File.expand_path("../foo-1.0", __FILE__) + gem 'foo', :path => File.expand_path("foo-1.0", __dir__) G bundle "config set --local frozen true" diff --git a/spec/bundler/install/gems/compact_index_spec.rb b/spec/bundler/install/gems/compact_index_spec.rb index 1282dbf381..72ad40e24f 100644 --- a/spec/bundler/install/gems/compact_index_spec.rb +++ b/spec/bundler/install/gems/compact_index_spec.rb @@ -258,7 +258,7 @@ The checksum of /versions does not match the checksum provided by the server! So s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) File.open("\#{path}/net_build_extensions.rb", "w") do |f| f.puts "NET_BUILD_EXTENSIONS = 'YES'" diff --git a/spec/bundler/install/gems/resolving_spec.rb b/spec/bundler/install/gems/resolving_spec.rb index b0209489b9..209996f61f 100644 --- a/spec/bundler/install/gems/resolving_spec.rb +++ b/spec/bundler/install/gems/resolving_spec.rb @@ -7,7 +7,7 @@ RSpec.describe "bundle install with install-time dependencies" do s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) File.open("\#{path}/implicit_rake_dep.rb", "w") do |f| f.puts "IMPLICIT_RAKE_DEP = 'YES'" @@ -20,7 +20,7 @@ RSpec.describe "bundle install with install-time dependencies" do s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) File.open("\#{path}/another_implicit_rake_dep.rb", "w") do |f| f.puts "ANOTHER_IMPLICIT_RAKE_DEP = 'YES'" @@ -42,7 +42,7 @@ RSpec.describe "bundle install with install-time dependencies" do s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) File.open("\#{path}/net_build_extensions.rb", "w") do |f| f.puts "NET_BUILD_EXTENSIONS = 'YES'" diff --git a/spec/bundler/install/gems/standalone_spec.rb b/spec/bundler/install/gems/standalone_spec.rb index c7efc836a8..66dd7f534a 100644 --- a/spec/bundler/install/gems/standalone_spec.rb +++ b/spec/bundler/install/gems/standalone_spec.rb @@ -205,7 +205,7 @@ RSpec.shared_examples "bundle install --standalone" do build_git "bar", :gemspec => false do |s| s.write "lib/bar/version.rb", %(BAR_VERSION = '1.0') s.write "bar.gemspec", <<-G - lib = File.expand_path('../lib/', __FILE__) + lib = File.expand_path('lib/', __dir__) $:.unshift lib unless $:.include?(lib) require 'bar/version' @@ -419,7 +419,7 @@ RSpec.shared_examples "bundle install --standalone" do it "creates stubs with the correct load path" do extension_line = File.read(bundled_app("bin/rails")).each_line.find {|line| line.include? "$:.unshift" }.strip - expect(extension_line).to eq %($:.unshift File.expand_path "../../bundle", path.realpath) + expect(extension_line).to eq %($:.unshift File.expand_path "../bundle", __dir__) end end end diff --git a/spec/bundler/install/gems/sudo_spec.rb b/spec/bundler/install/gems/sudo_spec.rb index 3e5d38ea4c..41b241da25 100644 --- a/spec/bundler/install/gems/sudo_spec.rb +++ b/spec/bundler/install/gems/sudo_spec.rb @@ -54,7 +54,7 @@ RSpec.describe "when using sudo", :sudo => true do s.extensions << "Rakefile" s.write "Rakefile", <<-RUBY task :default do - path = File.expand_path("../lib", __FILE__) + path = File.expand_path("lib", __dir__) FileUtils.mkdir_p(path) File.open("\#{path}/another_implicit_rake_dep.rb", "w") do |f| f.puts "ANOTHER_IMPLICIT_RAKE_DEP = 'YES'" diff --git a/spec/bundler/lock/lockfile_spec.rb b/spec/bundler/lock/lockfile_spec.rb index 561de9f3bc..8ec0a80bd0 100644 --- a/spec/bundler/lock/lockfile_spec.rb +++ b/spec/bundler/lock/lockfile_spec.rb @@ -897,7 +897,7 @@ RSpec.describe "the lockfile format" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" - path File.expand_path("../foo", __FILE__) do + path File.expand_path("foo", __dir__) do gem "foo" end G |