SILENT KILLERPanel

Current Path: > > opt > alt > > ruby32 > share > rubygems > rubygems


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: //opt/alt//ruby32/share/rubygems/rubygems

NameTypeSizeLast ModifiedActions
commands Directory - -
core_ext Directory - -
defaults Directory - -
ext Directory - -
gemcutter_utilities Directory - -
optparse Directory - -
package Directory - -
request Directory - -
request_set Directory - -
resolver Directory - -
security Directory - -
source Directory - -
ssl_certs Directory - -
tsort Directory - -
util Directory - -
available_set.rb File 3086 bytes April 24 2025 07:53:50.
basic_specification.rb File 7836 bytes April 24 2025 07:53:50.
bundler_version_finder.rb File 2010 bytes April 24 2025 07:53:50.
command.rb File 16463 bytes April 24 2025 07:53:50.
command_manager.rb File 5726 bytes April 24 2025 07:53:50.
compatibility.rb File 1027 bytes April 24 2025 07:53:50.
config_file.rb File 14367 bytes April 24 2025 07:53:50.
defaults.rb File 7122 bytes April 24 2025 07:53:50.
dependency.rb File 8854 bytes April 24 2025 07:53:50.
dependency_installer.rb File 10256 bytes April 24 2025 07:53:50.
dependency_list.rb File 5676 bytes April 24 2025 07:53:50.
deprecate.rb File 5007 bytes April 24 2025 07:53:50.
doctor.rb File 3205 bytes April 24 2025 07:53:50.
errors.rb File 4634 bytes April 24 2025 07:53:50.
exceptions.rb File 7516 bytes April 24 2025 07:53:50.
ext.rb File 498 bytes April 24 2025 07:53:50.
gem_runner.rb File 1839 bytes April 24 2025 07:53:50.
gemcutter_utilities.rb File 10788 bytes April 24 2025 07:53:50.
indexer.rb File 11169 bytes April 24 2025 07:53:50.
install_default_message.rb File 349 bytes April 24 2025 07:53:50.
install_message.rb File 323 bytes April 24 2025 07:53:50.
install_update_options.rb File 6507 bytes April 24 2025 07:53:50.
installer.rb File 27885 bytes April 24 2025 07:53:50.
installer_uninstaller_utils.rb File 773 bytes April 24 2025 07:53:50.
local_remote_options.rb File 3647 bytes April 24 2025 07:53:50.
mock_gem_ui.rb File 1413 bytes April 24 2025 07:53:50.
name_tuple.rb File 2445 bytes April 24 2025 07:53:50.
openssl.rb File 125 bytes April 24 2025 07:53:50.
optparse.rb File 72 bytes April 24 2025 07:53:50.
package.rb File 18120 bytes April 24 2025 07:53:50.
package_task.rb File 3885 bytes April 24 2025 07:53:50.
path_support.rb File 1828 bytes April 24 2025 07:53:50.
platform.rb File 7663 bytes April 24 2025 07:53:50.
psych_tree.rb File 795 bytes April 24 2025 07:53:50.
query_utils.rb File 8699 bytes April 24 2025 07:53:50.
rdoc.rb File 232 bytes April 24 2025 07:53:50.
remote_fetcher.rb File 9417 bytes April 24 2025 07:53:50.
request.rb File 8803 bytes April 24 2025 07:53:50.
request_set.rb File 11582 bytes April 24 2025 07:53:50.
requirement.rb File 7055 bytes April 24 2025 07:53:50.
resolver.rb File 9870 bytes April 24 2025 07:53:50.
s3_uri_signer.rb File 6066 bytes April 24 2025 07:53:50.
safe_yaml.rb File 1578 bytes April 24 2025 07:53:50.
security.rb File 22476 bytes April 24 2025 07:53:50.
security_option.rb File 1084 bytes April 24 2025 07:53:50.
shellwords.rb File 66 bytes April 24 2025 07:53:50.
source.rb File 5710 bytes April 24 2025 07:53:50.
source_list.rb File 2466 bytes April 24 2025 07:53:50.
spec_fetcher.rb File 6515 bytes April 24 2025 07:53:50.
specification.rb File 72144 bytes April 24 2025 07:53:50.
specification_policy.rb File 14124 bytes April 24 2025 07:53:50.
stub_specification.rb File 4569 bytes April 24 2025 07:53:50.
text.rb File 2117 bytes April 24 2025 07:53:50.
tsort.rb File 66 bytes April 24 2025 07:53:50.
uninstaller.rb File 10445 bytes April 24 2025 07:53:50.
unknown_command_spell_checker.rb File 411 bytes April 24 2025 07:53:50.
update_suggestion.rb File 2313 bytes April 24 2025 07:53:50.
uri.rb File 2382 bytes April 24 2025 07:53:50.
uri_formatter.rb File 781 bytes April 24 2025 07:53:50.
user_interaction.rb File 13354 bytes April 24 2025 07:53:50.
util.rb File 2465 bytes April 24 2025 07:53:50.
validator.rb File 3744 bytes April 24 2025 07:53:50.
version.rb File 12870 bytes April 24 2025 07:53:50.
version_option.rb File 2262 bytes April 24 2025 07:53:50.

Reading File: //opt/alt//ruby32/share/rubygems/rubygems/update_suggestion.rb

# frozen_string_literal: true

##
# 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

  ##
  # Message to promote available RubyGems update with related gem update command.

  def update_suggestion
    <<-MESSAGE

A new release of RubyGems is available: #{Gem.rubygems_version} → #{Gem.latest_rubygems_version}!
Run `gem update --system #{Gem.latest_rubygems_version}` to update your installation.

    MESSAGE
  end

  ##
  # Determines if current environment is eglible for update suggestion.

  def eglible_for_update?
    # explicit opt-out
    return false if Gem.configuration[:prevent_update_suggestion]
    return false if ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"]

    # focus only on human usage of final RubyGems releases
    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?

    # check makes sense only when we can store timestamp of last try
    # otherwise we will not be able to prevent "annoying" update message
    # on each command call
    return unless Gem.configuration.state_file_writable?

    # load time of last check, ensure the difference is enough to repeat the suggestion
    check_time = Time.now.to_i
    last_update_check = Gem.configuration.last_update_check
    return false if (check_time - last_update_check) < ONE_WEEK

    # compare current and latest version, this is the part where
    # latest rubygems spec is fetched from remote
    (Gem.rubygems_version < Gem.latest_rubygems_version).tap do |eglible|
      # store the time of last successful check into state file
      Gem.configuration.last_update_check = check_time

      return eglible
    end
  rescue # don't block install command on any problem
    false
  end

  def ci?
    CI_ENV_VARS.any? {|var| ENV.include?(var) }
  end
end

SILENT KILLER Tool