diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2020-06-03 20:47:59 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-06-18 19:14:15 +0900 |
commit | 596588c6978b1bef4a19328a978ff063d05cb6ab (patch) | |
tree | 0b7a60bb05dff1fc33f1d93f09d2a86523dbfc58 /spec | |
parent | a572e78201e1a4f5a44b6e354dc7b91f5f6d9c93 (diff) |
[rubygems/rubygems] s/ruby!/ruby
https://github.com/rubygems/rubygems/commit/a73fa0760e
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3212
Diffstat (limited to 'spec')
-rw-r--r-- | spec/bundler/commands/open_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/realworld/double_check_spec.rb | 4 | ||||
-rw-r--r-- | spec/bundler/realworld/edgecases_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/runtime/load_spec.rb | 2 | ||||
-rw-r--r-- | spec/bundler/runtime/setup_spec.rb | 18 | ||||
-rw-r--r-- | spec/bundler/runtime/with_unbundled_env_spec.rb | 20 |
6 files changed, 24 insertions, 24 deletions
diff --git a/spec/bundler/commands/open_spec.rb b/spec/bundler/commands/open_spec.rb index 0688734b23..d18e620783 100644 --- a/spec/bundler/commands/open_spec.rb +++ b/spec/bundler/commands/open_spec.rb @@ -94,7 +94,7 @@ RSpec.describe "bundle open" do context "when opening a default gem" do let(:default_gems) do - ruby!(<<-RUBY).split("\n") + ruby(<<-RUBY).split("\n") if Gem::Specification.is_a?(Enumerable) puts Gem::Specification.select(&:default_gem?).map(&:name) end diff --git a/spec/bundler/realworld/double_check_spec.rb b/spec/bundler/realworld/double_check_spec.rb index 90cf298b33..0a8f5e4d9e 100644 --- a/spec/bundler/realworld/double_check_spec.rb +++ b/spec/bundler/realworld/double_check_spec.rb @@ -34,7 +34,7 @@ RSpec.describe "double checking sources", :realworld => true, :sometimes => true end RUBY - ruby! cmd - ruby! cmd + ruby cmd + ruby cmd end end diff --git a/spec/bundler/realworld/edgecases_spec.rb b/spec/bundler/realworld/edgecases_spec.rb index a0828041eb..e5600bb1c1 100644 --- a/spec/bundler/realworld/edgecases_spec.rb +++ b/spec/bundler/realworld/edgecases_spec.rb @@ -2,7 +2,7 @@ RSpec.describe "real world edgecases", :realworld => true, :sometimes => true do def rubygems_version(name, requirement) - ruby! <<-RUBY + ruby <<-RUBY require "#{spec_dir}/support/artifice/vcr" require "#{lib_dir}/bundler" require "#{lib_dir}/bundler/source/rubygems/remote" diff --git a/spec/bundler/runtime/load_spec.rb b/spec/bundler/runtime/load_spec.rb index 5783654c0e..0274ba18b8 100644 --- a/spec/bundler/runtime/load_spec.rb +++ b/spec/bundler/runtime/load_spec.rb @@ -81,7 +81,7 @@ RSpec.describe "Bundler.load" do gem "activesupport", :group => :test G - ruby! <<-RUBY + ruby <<-RUBY require "#{lib_dir}/bundler" Bundler.setup :default Bundler.require :default diff --git a/spec/bundler/runtime/setup_spec.rb b/spec/bundler/runtime/setup_spec.rb index 80c448c969..9ff15f83b0 100644 --- a/spec/bundler/runtime/setup_spec.rb +++ b/spec/bundler/runtime/setup_spec.rb @@ -107,7 +107,7 @@ RSpec.describe "Bundler.setup" do context "load order" do def clean_load_path(lp) - without_bundler_load_path = ruby!("puts $LOAD_PATH").split("\n") + without_bundler_load_path = ruby("puts $LOAD_PATH").split("\n") lp -= without_bundler_load_path lp.map! {|p| p.sub(/^#{Regexp.union system_gem_path.to_s, default_bundle_path.to_s, lib_dir.to_s}/i, "") } end @@ -143,7 +143,7 @@ RSpec.describe "Bundler.setup" do gem "rails" G - ruby! <<-RUBY + ruby <<-RUBY require '#{lib_dir}/bundler' Bundler.setup puts $LOAD_PATH @@ -171,7 +171,7 @@ RSpec.describe "Bundler.setup" do gem "terranova" G - ruby! <<-RUBY + ruby <<-RUBY require '#{lib_dir}/bundler/setup' puts $LOAD_PATH RUBY @@ -1158,14 +1158,14 @@ end context "is not present" do it "does not change the lock" do - expect { ruby! "require '#{lib_dir}/bundler/setup'" }.not_to change { lockfile } + expect { ruby "require '#{lib_dir}/bundler/setup'" }.not_to change { lockfile } end end context "is newer" do let(:ruby_version) { "5.5.5" } it "does not change the lock or warn" do - expect { ruby! "require '#{lib_dir}/bundler/setup'" }.not_to change { lockfile } + expect { ruby "require '#{lib_dir}/bundler/setup'" }.not_to change { lockfile } expect(out).to be_empty expect(err).to be_empty end @@ -1174,7 +1174,7 @@ end context "is older" do let(:ruby_version) { "1.0.0" } it "does not change the lock" do - expect { ruby! "require '#{lib_dir}/bundler/setup'" }.not_to change { lockfile } + expect { ruby "require '#{lib_dir}/bundler/setup'" }.not_to change { lockfile } end end end @@ -1195,7 +1195,7 @@ end it "does not load openssl" do install_gemfile "" - ruby! <<-RUBY + ruby <<-RUBY require "#{lib_dir}/bundler/setup" puts defined?(OpenSSL) || "undefined" require "openssl" @@ -1251,7 +1251,7 @@ end it "activates no gems with -rbundler/setup" do install_gemfile "" - ruby! code, :env => { "RUBYOPT" => activation_warning_hack_rubyopt + " -r#{lib_dir}/bundler/setup" } + ruby code, :env => { "RUBYOPT" => activation_warning_hack_rubyopt + " -r#{lib_dir}/bundler/setup" } expect(out).to eq("{}") end @@ -1359,7 +1359,7 @@ end gem "rack" G - ruby! <<-RUBY + ruby <<-RUBY require "#{lib_dir}/bundler/setup" Object.new.gem "rack" puts Gem.loaded_specs["rack"].full_name diff --git a/spec/bundler/runtime/with_unbundled_env_spec.rb b/spec/bundler/runtime/with_unbundled_env_spec.rb index 4ab4c01edd..67a25f6ff2 100644 --- a/spec/bundler/runtime/with_unbundled_env_spec.rb +++ b/spec/bundler/runtime/with_unbundled_env_spec.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true RSpec.describe "Bundler.with_env helpers" do - def bundle_exec_ruby!(args, options = {}) + def bundle_exec_ruby(args, options = {}) build_bundler_context options bundle "exec '#{Gem.ruby}' #{args}", options end @@ -23,7 +23,7 @@ RSpec.describe "Bundler.with_env helpers" do RUBY path = `getconf PATH`.strip + "#{File::PATH_SEPARATOR}/foo" with_path_as(path) do - bundle_exec_ruby!(bundled_app("source.rb").to_s) + bundle_exec_ruby(bundled_app("source.rb").to_s) expect(last_command.stdboth).to eq(path) end end @@ -34,7 +34,7 @@ RSpec.describe "Bundler.with_env helpers" do RUBY gem_path = ENV["GEM_PATH"] + "#{File::PATH_SEPARATOR}/foo" with_gem_path_as(gem_path) do - bundle_exec_ruby!(bundled_app("source.rb").to_s) + bundle_exec_ruby(bundled_app("source.rb").to_s) expect(last_command.stdboth).to eq(gem_path) end end @@ -52,7 +52,7 @@ RSpec.describe "Bundler.with_env helpers" do path = `getconf PATH`.strip + File::PATH_SEPARATOR + File.dirname(Gem.ruby) with_path_as(path) do build_bundler_context - bundle_exec_ruby!("#{bundled_app("exe.rb")} 2") + bundle_exec_ruby("#{bundled_app("exe.rb")} 2") end expect(err).to eq <<-EOS.strip 2 false @@ -65,11 +65,11 @@ RSpec.describe "Bundler.with_env helpers" do # Simulate bundler has not yet been loaded ENV.replace(ENV.to_hash.delete_if {|k, _v| k.start_with?(Bundler::EnvironmentPreserver::BUNDLER_PREFIX) }) - original = ruby!('puts ENV.to_a.map {|e| e.join("=") }.sort.join("\n")') + original = ruby('puts ENV.to_a.map {|e| e.join("=") }.sort.join("\n")') create_file("source.rb", <<-RUBY) puts Bundler.original_env.to_a.map {|e| e.join("=") }.sort.join("\n") RUBY - bundle_exec_ruby! bundled_app("source.rb") + bundle_exec_ruby bundled_app("source.rb") expect(out).to eq original end end @@ -80,7 +80,7 @@ RSpec.describe "Bundler.with_env helpers" do print #{modified_env}.has_key?('BUNDLE_PATH') RUBY ENV["BUNDLE_PATH"] = "./foo" - bundle_exec_ruby! bundled_app("source.rb") + bundle_exec_ruby bundled_app("source.rb") expect(last_command.stdboth).to include "false" end @@ -90,7 +90,7 @@ RSpec.describe "Bundler.with_env helpers" do RUBY ENV["RUBYOPT"] = "-W2 -rbundler/setup #{ENV["RUBYOPT"]}" simulate_bundler_version_when_missing_prerelease_default_gem_activation do - bundle_exec_ruby! bundled_app("source.rb") + bundle_exec_ruby bundled_app("source.rb") end expect(last_command.stdboth).not_to include("-rbundler/setup") end @@ -101,7 +101,7 @@ RSpec.describe "Bundler.with_env helpers" do RUBY ENV["RUBYLIB"] = lib_dir.to_s + File::PATH_SEPARATOR + "/foo" ENV["BUNDLER_ORIG_RUBYLIB"] = lib_dir.to_s + File::PATH_SEPARATOR + "/foo-original" - bundle_exec_ruby! bundled_app("source.rb") + bundle_exec_ruby bundled_app("source.rb") expect(last_command.stdboth).to include("/foo-original") end @@ -111,7 +111,7 @@ RSpec.describe "Bundler.with_env helpers" do RUBY ENV["MANPATH"] = "/foo" ENV["BUNDLER_ORIG_MANPATH"] = "/foo-original" - bundle_exec_ruby! bundled_app("source.rb") + bundle_exec_ruby bundled_app("source.rb") expect(last_command.stdboth).to include("/foo-original") end end |