aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rubygems
diff options
context:
space:
mode:
authorEric Mueller <nevinera@gmail.com>2023-11-28 21:41:22 -0500
committergit <svn-admin@ruby-lang.org>2023-12-06 20:05:24 +0000
commita6c912a80de27a5022528802305e1e97fe5b2678 (patch)
treee45d46e239bc213b4432f3db82873cf3f561dadd /lib/rubygems
parentb1b78c4f9ff0ff3a2570980b0012893eb03fc597 (diff)
downloadruby-a6c912a80de27a5022528802305e1e97fe5b2678.tar.gz
[rubygems/rubygems] Gem::UpdateSuggestion uses Gem::CIDetector
https://github.com/rubygems/rubygems/commit/e5b0458342
Diffstat (limited to 'lib/rubygems')
-rw-r--r--lib/rubygems/update_suggestion.rb15
1 files changed, 1 insertions, 14 deletions
diff --git a/lib/rubygems/update_suggestion.rb b/lib/rubygems/update_suggestion.rb
index af7067f9b3..6f3ec5f493 100644
--- a/lib/rubygems/update_suggestion.rb
+++ b/lib/rubygems/update_suggestion.rb
@@ -4,15 +4,6 @@
# Mixin methods for Gem::Command to promote available RubyGems update
module Gem::UpdateSuggestion
- # list taken from https://github.com/watson/ci-info/blob/7a3c30d/index.js#L56-L66
- CI_ENV_VARS = [
- "CI", # Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
- "CONTINUOUS_INTEGRATION", # Travis CI, Cirrus CI
- "BUILD_NUMBER", # Jenkins, TeamCity
- "CI_APP_ID", "CI_BUILD_ID", "CI_BUILD_NUMBER", # Applfow
- "RUN_ID" # TaskCluster, dsari
- ].freeze
-
ONE_WEEK = 7 * 24 * 60 * 60
##
@@ -39,7 +30,7 @@ Run `gem update --system #{Gem.latest_rubygems_version}` to update your installa
return false unless Gem.ui.tty?
return false if Gem.rubygems_version.prerelease?
return false if Gem.disable_system_update_message
- return false if ci?
+ return false if Gem::CIDetector.ci?
# check makes sense only when we can store timestamp of last try
# otherwise we will not be able to prevent "annoying" update message
@@ -62,8 +53,4 @@ Run `gem update --system #{Gem.latest_rubygems_version}` to update your installa
rescue StandardError # don't block install command on any problem
false
end
-
- def ci?
- CI_ENV_VARS.any? {|var| ENV.include?(var) }
- end
end