From 5c2e64475253e186c23f3dbf908d7ab8108c3274 Mon Sep 17 00:00:00 2001 From: ohbarye Date: Sat, 10 Aug 2019 01:56:40 +0900 Subject: [PATCH 1/9] Fix typo: duplicated the [skip-ci] --- spec/commands/binstubs_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/commands/binstubs_spec.rb b/spec/commands/binstubs_spec.rb index 748cf6362fa..81b4d99064e 100644 --- a/spec/commands/binstubs_spec.rb +++ b/spec/commands/binstubs_spec.rb @@ -264,7 +264,7 @@ end context "when using --shebang" do - it "sets the specified shebang for the the binstub" do + it "sets the specified shebang for the binstub" do install_gemfile <<-G source "#{file_uri_for(gem_repo1)}" gem "rack" From 907f259be9d71b11bf96d780db74a929fb3b97cb Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 3 Aug 2019 07:23:58 +0900 Subject: [PATCH 2/9] Explicitly ignored GEMRC environmental variable. --- spec/spec_helper.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index fc9b8008879..103827a355b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -100,6 +100,7 @@ def self.ruby=(ruby) ENV["RUBYOPT"] = "#{ENV["RUBYOPT"]} -r#{Spec::Path.spec_dir}/support/hax.rb" ENV["BUNDLE_SPEC_RUN"] = "true" ENV["BUNDLE_USER_CONFIG"] = ENV["BUNDLE_USER_CACHE"] = ENV["BUNDLE_USER_PLUGIN"] = nil + ENV["GEMRC"] = nil # Don't wrap output in tests ENV["THOR_COLUMNS"] = "10000" From 7a971a3aaaf9e61456749ab7da4bd4c99575f29e Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sun, 11 Aug 2019 08:10:40 +0900 Subject: [PATCH 3/9] GitHub Actions does not support ANSI color code. Skip failing examples. --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 103827a355b..80e6d475f39 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -71,7 +71,7 @@ def self.ruby=(ruby) config.filter_run_excluding :git => RequirementChecker.against(git_version) config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0]) config.filter_run_excluding :ruby_repo => !(ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"]).nil? - config.filter_run_excluding :non_windows => Gem.win_platform? + config.filter_run_excluding :non_windows => Gem.win_platform? || ENV["CI"] config.filter_run_when_matching :focus unless ENV["CI"] From 060f31bb132afe20547a61d490d86fa509c59f26 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 12 Aug 2019 08:23:27 +0900 Subject: [PATCH 4/9] Re-use GITHUB_ACTION variables for filtering bundler examples. --- spec/bundler/source_spec.rb | 6 +++--- spec/spec_helper.rb | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/bundler/source_spec.rb b/spec/bundler/source_spec.rb index 9ae6b3e3eb6..46d86937dab 100644 --- a/spec/bundler/source_spec.rb +++ b/spec/bundler/source_spec.rb @@ -56,7 +56,7 @@ class ExampleSource < Bundler::Source context "with a different version" do let(:locked_gem) { double(:locked_gem, :name => "nokogiri", :version => "< 1.5") } - context "with color", :non_windows do + context "with color", :no_color_tty do before { Bundler.ui = Bundler::UI::Shell.new } it "should return a string with the spec name and version and locked spec version" do @@ -77,7 +77,7 @@ class ExampleSource < Bundler::Source let(:spec) { double(:spec, :name => "nokogiri", :version => "1.6.1", :platform => rb) } let(:locked_gem) { double(:locked_gem, :name => "nokogiri", :version => "1.7.0") } - context "with color", :non_windows do + context "with color", :no_color_tty do before { Bundler.ui = Bundler::UI::Shell.new } it "should return a string with the locked spec version in yellow" do @@ -98,7 +98,7 @@ class ExampleSource < Bundler::Source let(:spec) { double(:spec, :name => "nokogiri", :version => "1.7.1", :platform => rb) } let(:locked_gem) { double(:locked_gem, :name => "nokogiri", :version => "1.7.0") } - context "with color", :non_windows do + context "with color", :no_color_tty do before { Bundler.ui = Bundler::UI::Shell.new } it "should return a string with the locked spec version in green" do diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 80e6d475f39..6810fcf3ce0 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -71,7 +71,7 @@ def self.ruby=(ruby) config.filter_run_excluding :git => RequirementChecker.against(git_version) config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0]) config.filter_run_excluding :ruby_repo => !(ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"]).nil? - config.filter_run_excluding :non_windows => Gem.win_platform? || ENV["CI"] + config.filter_run_excluding :no_color_tty => Gem.win_platform? || !!ENV["GITHUB_ACTION"] config.filter_run_when_matching :focus unless ENV["CI"] From 7bd417adb22c5af8ce635b81de07c6565208de87 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Mon, 12 Aug 2019 09:01:00 +0900 Subject: [PATCH 5/9] Added example filter for Linux of GitHub Actions. --- spec/commands/exec_spec.rb | 2 +- spec/spec_helper.rb | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 8ad5a3c125b..67c2ce62682 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -55,7 +55,7 @@ expect(out).to eq("hi") end - it "respects custom process title when loading through ruby" do + it "respects custom process title when loading through ruby", :github_action_linux do script_that_changes_its_own_title_and_checks_if_picked_up_by_ps_unix_utility = <<~RUBY Process.setproctitle("1-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16") puts `ps -eo args | grep [1]-2-3-4-5-6-7-8-9-10-11-12-13-14-15-16` diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 6810fcf3ce0..0a957dd0be5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -72,6 +72,7 @@ def self.ruby=(ruby) config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0]) config.filter_run_excluding :ruby_repo => !(ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"]).nil? config.filter_run_excluding :no_color_tty => Gem.win_platform? || !!ENV["GITHUB_ACTION"] + config.filter_run_excluding :github_action_linux => !!ENV["GITHUB_ACTION"] && (ENV["RUNNER_OS"] == "Linux") config.filter_run_when_matching :focus unless ENV["CI"] From 0cf761980a61d0a4498c80bbf5e187e41e2e13b9 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 3 Aug 2019 06:29:36 +0900 Subject: [PATCH 6/9] Fixed the broken example with ruby core structure. --- spec/commands/newgem_spec.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spec/commands/newgem_spec.rb b/spec/commands/newgem_spec.rb index 94f4d82e981..7b05bf3ed0b 100644 --- a/spec/commands/newgem_spec.rb +++ b/spec/commands/newgem_spec.rb @@ -275,7 +275,8 @@ def create_temporary_dir(dir) end it "sets a minimum ruby version" do - bundler_gemspec = Bundler::GemHelper.new(File.expand_path("../..", __dir__)).gemspec + gemspec_path = ruby_core? ? "../../../lib/bundler" : "../.." + bundler_gemspec = Bundler::GemHelper.new(File.expand_path(gemspec_path, __dir__)).gemspec expect(bundler_gemspec.required_ruby_version).to eq(generated_gemspec.required_ruby_version) end From b235225814651fb0ea0ad6dde1c98b21489bf81a Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Sat, 3 Aug 2019 07:09:59 +0900 Subject: [PATCH 7/9] Fixed up 365ee22d73ec73c119a842de271504e04bed6f45 --- spec/commands/exec_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/commands/exec_spec.rb b/spec/commands/exec_spec.rb index 67c2ce62682..bb13b1b0862 100644 --- a/spec/commands/exec_spec.rb +++ b/spec/commands/exec_spec.rb @@ -299,7 +299,7 @@ G rubylib = ENV["RUBYLIB"] - rubylib = rubylib.to_s.split(File::PATH_SEPARATOR).unshift bundler_path + rubylib = rubylib.to_s.split(File::PATH_SEPARATOR).unshift bundler_path.to_s rubylib = rubylib.uniq.join(File::PATH_SEPARATOR) bundle "exec 'echo $RUBYLIB'" From dc8450fd8e485e0e6f312c8da9b633464c175392 Mon Sep 17 00:00:00 2001 From: Yusuke Endoh Date: Wed, 31 Jul 2019 19:51:58 +0900 Subject: [PATCH 8/9] lib/bundler/shared_helpers.rb: remove require "rubygems" Because it causes circular require. --- lib/bundler/shared_helpers.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/bundler/shared_helpers.rb b/lib/bundler/shared_helpers.rb index 62a292fcee2..af1836009f4 100644 --- a/lib/bundler/shared_helpers.rb +++ b/lib/bundler/shared_helpers.rb @@ -2,7 +2,6 @@ require "pathname" require "rbconfig" -require "rubygems" require_relative "version" require_relative "constants" From 925617744622b123b6b55b2c9d750ab061097219 Mon Sep 17 00:00:00 2001 From: Hiroshi SHIBATA Date: Fri, 16 Aug 2019 07:11:14 +0900 Subject: [PATCH 9/9] Fixed rubocop error --- spec/spec_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 0a957dd0be5..14df93a3da7 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -71,8 +71,8 @@ def self.ruby=(ruby) config.filter_run_excluding :git => RequirementChecker.against(git_version) config.filter_run_excluding :bundler => RequirementChecker.against(Bundler::VERSION.split(".")[0]) config.filter_run_excluding :ruby_repo => !(ENV["BUNDLE_RUBY"] && ENV["BUNDLE_GEM"]).nil? - config.filter_run_excluding :no_color_tty => Gem.win_platform? || !!ENV["GITHUB_ACTION"] - config.filter_run_excluding :github_action_linux => !!ENV["GITHUB_ACTION"] && (ENV["RUNNER_OS"] == "Linux") + config.filter_run_excluding :no_color_tty => Gem.win_platform? || !ENV["GITHUB_ACTION"].nil? + config.filter_run_excluding :github_action_linux => !ENV["GITHUB_ACTION"].nil? && (ENV["RUNNER_OS"] == "Linux") config.filter_run_when_matching :focus unless ENV["CI"]