diff options
author | Eric Mueller <[email protected]> | 2023-11-28 21:41:22 -0500 |
---|---|---|
committer | git <[email protected]> | 2023-12-06 20:05:24 +0000 |
commit | a6c912a80de27a5022528802305e1e97fe5b2678 (patch) | |
tree | e45d46e239bc213b4432f3db82873cf3f561dadd /lib | |
parent | b1b78c4f9ff0ff3a2570980b0012893eb03fc597 (diff) |
[rubygems/rubygems] Gem::UpdateSuggestion uses Gem::CIDetector
https://github.com/rubygems/rubygems/commit/e5b0458342
Diffstat (limited to 'lib')
-rw-r--r-- | lib/rubygems/update_suggestion.rb | 15 |
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 |