mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[rubygems/rubygems] Prefer require_relative
to require
for internal requires
https://github.com/rubygems/rubygems/commit/c74fc58695
This commit is contained in:
parent
f6803d2411
commit
54ae3f587e
Notes:
git
2021-08-31 19:07:05 +09:00
80 changed files with 273 additions and 273 deletions
|
@ -12,11 +12,11 @@ module Gem
|
|||
end
|
||||
|
||||
# Must be first since it unloads the prelude from 1.9.2
|
||||
require 'rubygems/compatibility'
|
||||
require_relative 'rubygems/compatibility'
|
||||
|
||||
require 'rubygems/defaults'
|
||||
require 'rubygems/deprecate'
|
||||
require 'rubygems/errors'
|
||||
require_relative 'rubygems/defaults'
|
||||
require_relative 'rubygems/deprecate'
|
||||
require_relative 'rubygems/errors'
|
||||
|
||||
##
|
||||
# RubyGems is the Ruby standard for publishing and managing third party
|
||||
|
@ -559,7 +559,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||
# => [#<Gem::Specification:0x1013b4528 @name="minitest", ...>]
|
||||
|
||||
def self.install(name, version = Gem::Requirement.default, *options)
|
||||
require "rubygems/dependency_installer"
|
||||
require_relative "rubygems/dependency_installer"
|
||||
inst = Gem::DependencyInstaller.new(*options)
|
||||
inst.install name, version
|
||||
inst.installed_gems
|
||||
|
@ -625,12 +625,12 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||
rescue ::LoadError
|
||||
# If we can't load psych, that's fine, go on.
|
||||
else
|
||||
require 'rubygems/psych_additions'
|
||||
require 'rubygems/psych_tree'
|
||||
require_relative 'rubygems/psych_additions'
|
||||
require_relative 'rubygems/psych_tree'
|
||||
end
|
||||
|
||||
require 'yaml'
|
||||
require 'rubygems/safe_yaml'
|
||||
require_relative 'rubygems/safe_yaml'
|
||||
|
||||
@yaml_loaded = true
|
||||
end
|
||||
|
@ -990,7 +990,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||
# Lazily loads DefaultUserInteraction and returns the default UI.
|
||||
|
||||
def self.ui
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative 'rubygems/user_interaction'
|
||||
|
||||
Gem::DefaultUserInteraction.ui
|
||||
end
|
||||
|
@ -1110,7 +1110,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||
end
|
||||
|
||||
ENV["BUNDLE_GEMFILE"] ||= File.expand_path(path)
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative 'rubygems/user_interaction'
|
||||
require "bundler"
|
||||
begin
|
||||
Gem::DefaultUserInteraction.use_ui(ui) do
|
||||
|
@ -1322,7 +1322,7 @@ An Array (#{env.inspect}) was passed in from #{caller[3]}
|
|||
autoload :Version, File.expand_path('rubygems/version', __dir__)
|
||||
end
|
||||
|
||||
require 'rubygems/exceptions'
|
||||
require_relative 'rubygems/exceptions'
|
||||
|
||||
# REFACTOR: This should be pulled out into some kind of hacks file.
|
||||
begin
|
||||
|
@ -1353,6 +1353,6 @@ end
|
|||
# Loads the default specs.
|
||||
Gem::Specification.load_defaults
|
||||
|
||||
require 'rubygems/core_ext/kernel_gem'
|
||||
require 'rubygems/core_ext/kernel_require'
|
||||
require 'rubygems/core_ext/kernel_warn'
|
||||
require_relative 'rubygems/core_ext/kernel_gem'
|
||||
require_relative 'rubygems/core_ext/kernel_require'
|
||||
require_relative 'rubygems/core_ext/kernel_warn'
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/user_interaction'
|
||||
require 'rubygems/text'
|
||||
require_relative 'command'
|
||||
require_relative 'user_interaction'
|
||||
require_relative 'text'
|
||||
|
||||
##
|
||||
# The command manager registers and installs all the individual sub-commands
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/package'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../package'
|
||||
require_relative '../version_option'
|
||||
|
||||
class Gem::Commands::BuildCommand < Gem::Command
|
||||
include Gem::VersionOption
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/security'
|
||||
require_relative '../command'
|
||||
require_relative '../security'
|
||||
|
||||
class Gem::Commands::CertCommand < Gem::Command
|
||||
def initialize
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/version_option'
|
||||
require 'rubygems/validator'
|
||||
require 'rubygems/doctor'
|
||||
require_relative '../command'
|
||||
require_relative '../version_option'
|
||||
require_relative '../validator'
|
||||
require_relative '../doctor'
|
||||
|
||||
class Gem::Commands::CheckCommand < Gem::Command
|
||||
include Gem::VersionOption
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/dependency_list'
|
||||
require 'rubygems/uninstaller'
|
||||
require_relative '../command'
|
||||
require_relative '../dependency_list'
|
||||
require_relative '../uninstaller'
|
||||
|
||||
class Gem::Commands::CleanupCommand < Gem::Command
|
||||
def initialize
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../version_option'
|
||||
|
||||
class Gem::Commands::ContentsCommand < Gem::Command
|
||||
include Gem::VersionOption
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../version_option'
|
||||
|
||||
class Gem::Commands::DependencyCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
class Gem::Commands::EnvironmentCommand < Gem::Command
|
||||
def initialize
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../version_option'
|
||||
|
||||
class Gem::Commands::FetchCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/indexer'
|
||||
require_relative '../command'
|
||||
require_relative '../indexer'
|
||||
|
||||
##
|
||||
# Generates a index files for use as a gem server.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
class Gem::Commands::HelpCommand < Gem::Command
|
||||
# :stopdoc:
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/query_utils'
|
||||
require_relative '../command'
|
||||
require_relative '../query_utils'
|
||||
|
||||
class Gem::Commands::InfoCommand < Gem::Command
|
||||
include Gem::QueryUtils
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/install_update_options'
|
||||
require 'rubygems/dependency_installer'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/validator'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../install_update_options'
|
||||
require_relative '../dependency_installer'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../validator'
|
||||
require_relative '../version_option'
|
||||
|
||||
##
|
||||
# Gem installer command line tool
|
||||
|
@ -172,7 +172,7 @@ You can use `i` command instead of `install`.
|
|||
end
|
||||
|
||||
def install_from_gemdeps # :nodoc:
|
||||
require 'rubygems/request_set'
|
||||
require_relative '../request_set'
|
||||
rs = Gem::RequestSet.new
|
||||
|
||||
specs = rs.install_from_gemdeps options do |req, inst|
|
||||
|
@ -247,11 +247,11 @@ You can use `i` command instead of `install`.
|
|||
|
||||
def load_hooks # :nodoc:
|
||||
if options[:install_as_default]
|
||||
require 'rubygems/install_default_message'
|
||||
require_relative '../install_default_message'
|
||||
else
|
||||
require 'rubygems/install_message'
|
||||
require_relative '../install_message'
|
||||
end
|
||||
require 'rubygems/rdoc'
|
||||
require_relative '../rdoc'
|
||||
end
|
||||
|
||||
def show_install_errors(errors) # :nodoc:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/query_utils'
|
||||
require_relative '../command'
|
||||
require_relative '../query_utils'
|
||||
|
||||
##
|
||||
# Searches for gems starting with the supplied argument.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
class Gem::Commands::LockCommand < Gem::Command
|
||||
def initialize
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
unless defined? Gem::Commands::MirrorCommand
|
||||
class Gem::Commands::MirrorCommand < Gem::Command
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../version_option'
|
||||
|
||||
class Gem::Commands::OpenCommand < Gem::Command
|
||||
include Gem::VersionOption
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/spec_fetcher'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../spec_fetcher'
|
||||
require_relative '../version_option'
|
||||
|
||||
class Gem::Commands::OutdatedCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/gemcutter_utilities'
|
||||
require 'rubygems/text'
|
||||
require_relative '../command'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../gemcutter_utilities'
|
||||
require_relative '../text'
|
||||
|
||||
class Gem::Commands::OwnerCommand < Gem::Command
|
||||
include Gem::Text
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/package'
|
||||
require 'rubygems/installer'
|
||||
require 'rubygems/version_option'
|
||||
require_relative '../command'
|
||||
require_relative '../package'
|
||||
require_relative '../installer'
|
||||
require_relative '../version_option'
|
||||
|
||||
class Gem::Commands::PristineCommand < Gem::Command
|
||||
include Gem::VersionOption
|
||||
|
@ -138,7 +138,7 @@ extensions will be restored.
|
|||
gem = spec.cache_file
|
||||
|
||||
unless File.exist? gem or options[:only_executables] or options[:only_plugins]
|
||||
require 'rubygems/remote_fetcher'
|
||||
require_relative '../remote_fetcher'
|
||||
|
||||
say "Cached gem for #{spec.full_name} not found, attempting to fetch..."
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/gemcutter_utilities'
|
||||
require 'rubygems/package'
|
||||
require_relative '../command'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../gemcutter_utilities'
|
||||
require_relative '../package'
|
||||
|
||||
class Gem::Commands::PushCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/query_utils'
|
||||
require 'rubygems/deprecate'
|
||||
require_relative '../command'
|
||||
require_relative '../query_utils'
|
||||
require_relative '../deprecate'
|
||||
|
||||
class Gem::Commands::QueryCommand < Gem::Command
|
||||
extend Gem::Deprecate
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/version_option'
|
||||
require 'rubygems/rdoc'
|
||||
require_relative '../command'
|
||||
require_relative '../version_option'
|
||||
require_relative '../rdoc'
|
||||
require 'fileutils'
|
||||
|
||||
class Gem::Commands::RdocCommand < Gem::Command
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/query_utils'
|
||||
require_relative '../command'
|
||||
require_relative '../query_utils'
|
||||
|
||||
class Gem::Commands::SearchCommand < Gem::Command
|
||||
include Gem::QueryUtils
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/server'
|
||||
require 'rubygems/deprecate'
|
||||
require_relative '../command'
|
||||
require_relative '../server'
|
||||
require_relative '../deprecate'
|
||||
|
||||
class Gem::Commands::ServerCommand < Gem::Command
|
||||
extend Gem::Deprecate
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
##
|
||||
# Installs RubyGems itself. This command is ordinarily only available from a
|
||||
|
@ -348,7 +348,7 @@ By default, this RubyGems will install gem as:
|
|||
rm_rf dir
|
||||
end
|
||||
|
||||
require 'rubygems/rdoc'
|
||||
require_relative '../rdoc'
|
||||
|
||||
fake_spec = Gem::Specification.new 'rubygems', Gem::VERSION
|
||||
def fake_spec.full_gem_path
|
||||
|
@ -407,7 +407,7 @@ By default, this RubyGems will install gem as:
|
|||
cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e)
|
||||
end
|
||||
|
||||
require 'rubygems/installer'
|
||||
require_relative '../installer'
|
||||
|
||||
Dir.chdir("bundler") do
|
||||
built_gem = Gem::Package.build(bundler_spec)
|
||||
|
@ -584,7 +584,7 @@ abort "#{deprecation_message}"
|
|||
end
|
||||
|
||||
def uninstall_old_gemcutter
|
||||
require 'rubygems/uninstaller'
|
||||
require_relative '../uninstaller'
|
||||
|
||||
ui = Gem::Uninstaller.new('gemcutter', :all => true, :ignore => true,
|
||||
:version => '< 0.4')
|
||||
|
@ -593,7 +593,7 @@ abort "#{deprecation_message}"
|
|||
end
|
||||
|
||||
def regenerate_binstubs
|
||||
require "rubygems/commands/pristine_command"
|
||||
require_relative "pristine_command"
|
||||
say "Regenerating binstubs"
|
||||
|
||||
args = %w[--all --only-executables --silent]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/gemcutter_utilities'
|
||||
require_relative '../command'
|
||||
require_relative '../gemcutter_utilities'
|
||||
|
||||
class Gem::Commands::SigninCommand < Gem::Command
|
||||
include Gem::GemcutterUtilities
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
class Gem::Commands::SignoutCommand < Gem::Command
|
||||
def initialize
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/remote_fetcher'
|
||||
require 'rubygems/spec_fetcher'
|
||||
require 'rubygems/local_remote_options'
|
||||
require_relative '../command'
|
||||
require_relative '../remote_fetcher'
|
||||
require_relative '../spec_fetcher'
|
||||
require_relative '../local_remote_options'
|
||||
|
||||
class Gem::Commands::SourcesCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/version_option'
|
||||
require 'rubygems/package'
|
||||
require_relative '../command'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../version_option'
|
||||
require_relative '../package'
|
||||
|
||||
class Gem::Commands::SpecificationCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
class Gem::Commands::StaleCommand < Gem::Command
|
||||
def initialize
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/version_option'
|
||||
require 'rubygems/uninstaller'
|
||||
require_relative '../command'
|
||||
require_relative '../version_option'
|
||||
require_relative '../uninstaller'
|
||||
require 'fileutils'
|
||||
|
||||
##
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/version_option'
|
||||
require 'rubygems/security_option'
|
||||
require 'rubygems/remote_fetcher'
|
||||
require 'rubygems/package'
|
||||
require_relative '../command'
|
||||
require_relative '../version_option'
|
||||
require_relative '../security_option'
|
||||
require_relative '../remote_fetcher'
|
||||
require_relative '../package'
|
||||
|
||||
# forward-declare
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/command_manager'
|
||||
require 'rubygems/dependency_installer'
|
||||
require 'rubygems/install_update_options'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/spec_fetcher'
|
||||
require 'rubygems/version_option'
|
||||
require 'rubygems/install_message' # must come before rdoc for messaging
|
||||
require 'rubygems/rdoc'
|
||||
require_relative '../command'
|
||||
require_relative '../command_manager'
|
||||
require_relative '../dependency_installer'
|
||||
require_relative '../install_update_options'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../spec_fetcher'
|
||||
require_relative '../version_option'
|
||||
require_relative '../install_message' # must come before rdoc for messaging
|
||||
require_relative '../rdoc'
|
||||
|
||||
class Gem::Commands::UpdateCommand < Gem::Command
|
||||
include Gem::InstallUpdateOptions
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require_relative '../command'
|
||||
|
||||
class Gem::Commands::WhichCommand < Gem::Command
|
||||
def initialize
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/local_remote_options'
|
||||
require 'rubygems/version_option'
|
||||
require 'rubygems/gemcutter_utilities'
|
||||
require_relative '../command'
|
||||
require_relative '../local_remote_options'
|
||||
require_relative '../version_option'
|
||||
require_relative '../gemcutter_utilities'
|
||||
|
||||
class Gem::Commands::YankCommand < Gem::Command
|
||||
include Gem::LocalRemoteOptions
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative 'user_interaction'
|
||||
require 'rbconfig'
|
||||
|
||||
##
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems'
|
||||
require 'rubygems/dependency_list'
|
||||
require 'rubygems/package'
|
||||
require 'rubygems/installer'
|
||||
require 'rubygems/spec_fetcher'
|
||||
require 'rubygems/user_interaction'
|
||||
require 'rubygems/available_set'
|
||||
require 'rubygems/deprecate'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'dependency_list'
|
||||
require_relative 'package'
|
||||
require_relative 'installer'
|
||||
require_relative 'spec_fetcher'
|
||||
require_relative 'user_interaction'
|
||||
require_relative 'available_set'
|
||||
require_relative 'deprecate'
|
||||
|
||||
##
|
||||
# Installs a gem along with all its dependencies from local and remote gems.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#++
|
||||
|
||||
require 'tsort'
|
||||
require 'rubygems/deprecate'
|
||||
require_relative 'deprecate'
|
||||
|
||||
##
|
||||
# Gem::DependencyList is used for installing and uninstalling gems in the
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
##
|
||||
# Cleans up after a partially-failed uninstall or for an invalid
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rubygems/deprecate'
|
||||
require 'rubygems/unknown_command_spell_checker'
|
||||
require_relative 'deprecate'
|
||||
require_relative 'unknown_command_spell_checker'
|
||||
|
||||
##
|
||||
# Base exception class for RubyGems. All exception raised by RubyGems are a
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems'
|
||||
require 'rubygems/command_manager'
|
||||
require 'rubygems/deprecate'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'command_manager'
|
||||
require_relative 'deprecate'
|
||||
|
||||
##
|
||||
# Load additional plugins from $LOAD_PATH
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/remote_fetcher'
|
||||
require 'rubygems/text'
|
||||
require_relative 'remote_fetcher'
|
||||
require_relative 'text'
|
||||
|
||||
##
|
||||
# Utility methods for using the RubyGems API.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems'
|
||||
require 'rubygems/package'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'package'
|
||||
require 'tmpdir'
|
||||
|
||||
##
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
##
|
||||
# A post-install hook that displays "Successfully installed
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
##
|
||||
# A default post-install hook that displays "Successfully installed
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems'
|
||||
require 'rubygems/security_option'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'security_option'
|
||||
|
||||
##
|
||||
# Mixin methods for install and update options for Gem::Commands
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/command'
|
||||
require 'rubygems/installer_uninstaller_utils'
|
||||
require 'rubygems/exceptions'
|
||||
require 'rubygems/deprecate'
|
||||
require 'rubygems/package'
|
||||
require 'rubygems/ext'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative 'command'
|
||||
require_relative 'installer_uninstaller_utils'
|
||||
require_relative 'exceptions'
|
||||
require_relative 'deprecate'
|
||||
require_relative 'package'
|
||||
require_relative 'ext'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
##
|
||||
# The installer installs the files contained in the .gem into the Gem.home.
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#++
|
||||
|
||||
require 'uri'
|
||||
require 'rubygems'
|
||||
require_relative '../rubygems'
|
||||
|
||||
##
|
||||
# Mixin methods for local and remote Gem::Command options.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
##
|
||||
# This Gem::StreamUI subclass records input and output to StringIO for
|
||||
|
|
|
@ -41,9 +41,9 @@
|
|||
# #files are the files in the .gem tar file, not the Ruby files in the gem
|
||||
# #extract_files and #contents automatically call #verify
|
||||
|
||||
require "rubygems"
|
||||
require 'rubygems/security'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative "../rubygems"
|
||||
require_relative 'security'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
class Gem::Package
|
||||
include Gem::UserInteraction
|
||||
|
@ -702,12 +702,12 @@ EOM
|
|||
end
|
||||
end
|
||||
|
||||
require 'rubygems/package/digest_io'
|
||||
require 'rubygems/package/source'
|
||||
require 'rubygems/package/file_source'
|
||||
require 'rubygems/package/io_source'
|
||||
require 'rubygems/package/old'
|
||||
require 'rubygems/package/tar_header'
|
||||
require 'rubygems/package/tar_reader'
|
||||
require 'rubygems/package/tar_reader/entry'
|
||||
require 'rubygems/package/tar_writer'
|
||||
require_relative 'package/digest_io'
|
||||
require_relative 'package/source'
|
||||
require_relative 'package/file_source'
|
||||
require_relative 'package/io_source'
|
||||
require_relative 'package/old'
|
||||
require_relative 'package/tar_header'
|
||||
require_relative 'package/tar_reader'
|
||||
require_relative 'package/tar_reader/entry'
|
||||
require_relative 'package/tar_writer'
|
||||
|
|
|
@ -121,4 +121,4 @@ class Gem::Package::TarReader
|
|||
end
|
||||
end
|
||||
|
||||
require 'rubygems/package/tar_reader/entry'
|
||||
require_relative 'tar_reader/entry'
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
require 'rubygems'
|
||||
require 'rubygems/package'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'package'
|
||||
require 'rake/packagetask'
|
||||
|
||||
##
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require "rubygems/deprecate"
|
||||
require_relative "deprecate"
|
||||
|
||||
##
|
||||
# Available list of platforms for targeting Gem installations.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems'
|
||||
require_relative '../rubygems'
|
||||
|
||||
begin
|
||||
require 'rdoc/rubygems_hook'
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems'
|
||||
require 'rubygems/request'
|
||||
require 'rubygems/request/connection_pools'
|
||||
require 'rubygems/s3_uri_signer'
|
||||
require 'rubygems/uri_formatter'
|
||||
require 'rubygems/uri_parser'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'request'
|
||||
require_relative 'request/connection_pools'
|
||||
require_relative 's3_uri_signer'
|
||||
require_relative 'uri_formatter'
|
||||
require_relative 'uri_parser'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
##
|
||||
# RemoteFetcher handles the details of fetching gems and gem information from
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
require 'net/http'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
class Gem::Request
|
||||
extend Gem::UserInteraction
|
||||
|
@ -287,6 +287,6 @@ class Gem::Request
|
|||
end
|
||||
end
|
||||
|
||||
require 'rubygems/request/http_pool'
|
||||
require 'rubygems/request/https_pool'
|
||||
require 'rubygems/request/connection_pools'
|
||||
require_relative 'request/http_pool'
|
||||
require_relative 'request/https_pool'
|
||||
require_relative 'request/connection_pools'
|
||||
|
|
|
@ -303,7 +303,7 @@ class Gem::RequestSet
|
|||
end
|
||||
end
|
||||
|
||||
require "rubygems/dependency_installer"
|
||||
require_relative "dependency_installer"
|
||||
inst = Gem::DependencyInstaller.new options
|
||||
inst.installed_gems.replace specs
|
||||
|
||||
|
@ -461,6 +461,6 @@ class Gem::RequestSet
|
|||
end
|
||||
end
|
||||
|
||||
require 'rubygems/request_set/gem_dependency_api'
|
||||
require 'rubygems/request_set/lockfile'
|
||||
require 'rubygems/request_set/lockfile/tokenizer'
|
||||
require_relative 'request_set/gem_dependency_api'
|
||||
require_relative 'request_set/lockfile'
|
||||
require_relative 'request_set/lockfile/tokenizer'
|
||||
|
|
|
@ -236,4 +236,4 @@ class Gem::RequestSet::Lockfile
|
|||
end
|
||||
end
|
||||
|
||||
require 'rubygems/request_set/lockfile/tokenizer'
|
||||
require_relative 'lockfile/tokenizer'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/request_set/lockfile/parser'
|
||||
require_relative 'parser'
|
||||
|
||||
class Gem::RequestSet::Lockfile::Tokenizer
|
||||
Token = Struct.new :type, :value, :column, :line
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require "rubygems/deprecate"
|
||||
require_relative "deprecate"
|
||||
|
||||
##
|
||||
# A Requirement is a set of one or more version restrictions. It supports a
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/dependency'
|
||||
require 'rubygems/exceptions'
|
||||
require 'rubygems/util/list'
|
||||
require_relative 'dependency'
|
||||
require_relative 'exceptions'
|
||||
require_relative 'util/list'
|
||||
|
||||
##
|
||||
# Given a set of Gem::Dependency objects as +needed+ and a way to query the
|
||||
|
@ -10,7 +10,7 @@ require 'rubygems/util/list'
|
|||
# all the requirements.
|
||||
|
||||
class Gem::Resolver
|
||||
require 'rubygems/resolver/molinillo'
|
||||
require_relative 'resolver/molinillo'
|
||||
|
||||
##
|
||||
# If the DEBUG_RESOLVER environment variable is set then debugging mode is
|
||||
|
@ -318,30 +318,30 @@ class Gem::Resolver
|
|||
private :amount_constrained
|
||||
end
|
||||
|
||||
require 'rubygems/resolver/activation_request'
|
||||
require 'rubygems/resolver/conflict'
|
||||
require 'rubygems/resolver/dependency_request'
|
||||
require 'rubygems/resolver/requirement_list'
|
||||
require 'rubygems/resolver/stats'
|
||||
require_relative 'resolver/activation_request'
|
||||
require_relative 'resolver/conflict'
|
||||
require_relative 'resolver/dependency_request'
|
||||
require_relative 'resolver/requirement_list'
|
||||
require_relative 'resolver/stats'
|
||||
|
||||
require 'rubygems/resolver/set'
|
||||
require 'rubygems/resolver/api_set'
|
||||
require 'rubygems/resolver/composed_set'
|
||||
require 'rubygems/resolver/best_set'
|
||||
require 'rubygems/resolver/current_set'
|
||||
require 'rubygems/resolver/git_set'
|
||||
require 'rubygems/resolver/index_set'
|
||||
require 'rubygems/resolver/installer_set'
|
||||
require 'rubygems/resolver/lock_set'
|
||||
require 'rubygems/resolver/vendor_set'
|
||||
require 'rubygems/resolver/source_set'
|
||||
require_relative 'resolver/set'
|
||||
require_relative 'resolver/api_set'
|
||||
require_relative 'resolver/composed_set'
|
||||
require_relative 'resolver/best_set'
|
||||
require_relative 'resolver/current_set'
|
||||
require_relative 'resolver/git_set'
|
||||
require_relative 'resolver/index_set'
|
||||
require_relative 'resolver/installer_set'
|
||||
require_relative 'resolver/lock_set'
|
||||
require_relative 'resolver/vendor_set'
|
||||
require_relative 'resolver/source_set'
|
||||
|
||||
require 'rubygems/resolver/specification'
|
||||
require 'rubygems/resolver/spec_specification'
|
||||
require 'rubygems/resolver/api_specification'
|
||||
require 'rubygems/resolver/git_specification'
|
||||
require 'rubygems/resolver/index_specification'
|
||||
require 'rubygems/resolver/installed_specification'
|
||||
require 'rubygems/resolver/local_specification'
|
||||
require 'rubygems/resolver/lock_specification'
|
||||
require 'rubygems/resolver/vendor_specification'
|
||||
require_relative 'resolver/specification'
|
||||
require_relative 'resolver/spec_specification'
|
||||
require_relative 'resolver/api_specification'
|
||||
require_relative 'resolver/git_specification'
|
||||
require_relative 'resolver/index_specification'
|
||||
require_relative 'resolver/installed_specification'
|
||||
require_relative 'resolver/local_specification'
|
||||
require_relative 'resolver/lock_specification'
|
||||
require_relative 'resolver/vendor_specification'
|
||||
|
|
|
@ -21,7 +21,7 @@ class Gem::Resolver::GitSpecification < Gem::Resolver::SpecSpecification
|
|||
# the executables.
|
||||
|
||||
def install(options = {})
|
||||
require 'rubygems/installer'
|
||||
require_relative '../installer'
|
||||
|
||||
installer = Gem::Installer.for_spec spec, options
|
||||
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/resolver/molinillo/lib/molinillo'
|
||||
require_relative 'molinillo/lib/molinillo'
|
||||
|
|
|
@ -93,7 +93,7 @@ class Gem::Resolver::Specification
|
|||
# specification.
|
||||
|
||||
def install(options = {})
|
||||
require 'rubygems/installer'
|
||||
require_relative '../installer'
|
||||
|
||||
gem = download options
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/exceptions'
|
||||
require_relative 'exceptions'
|
||||
require_relative 'openssl'
|
||||
|
||||
##
|
||||
|
@ -592,9 +592,9 @@ module Gem::Security
|
|||
end
|
||||
|
||||
if Gem::HAVE_OPENSSL
|
||||
require 'rubygems/security/policy'
|
||||
require 'rubygems/security/policies'
|
||||
require 'rubygems/security/trust_dir'
|
||||
require_relative 'security/policy'
|
||||
require_relative 'security/policies'
|
||||
require_relative 'security/trust_dir'
|
||||
end
|
||||
|
||||
require 'rubygems/security/signer'
|
||||
require_relative 'security/signer'
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative '../user_interaction'
|
||||
|
||||
##
|
||||
# A Gem::Security::Policy object encapsulates the settings for verifying
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
##
|
||||
# Basic OpenSSL-based package signing class.
|
||||
|
||||
require "rubygems/user_interaction"
|
||||
require_relative "../user_interaction"
|
||||
|
||||
class Gem::Security::Signer
|
||||
include Gem::UserInteraction
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems'
|
||||
require_relative '../rubygems'
|
||||
|
||||
# forward-declare
|
||||
|
||||
|
@ -20,7 +20,7 @@ end
|
|||
module Gem::SecurityOption
|
||||
def add_security_option
|
||||
OptionParser.accept Gem::Security::Policy do |value|
|
||||
require 'rubygems/security'
|
||||
require_relative 'security'
|
||||
|
||||
raise OptionParser::InvalidArgument, 'OpenSSL not installed' unless
|
||||
defined?(Gem::Security::HighSecurity)
|
||||
|
|
|
@ -3,8 +3,8 @@ require 'zlib'
|
|||
require 'erb'
|
||||
require 'uri'
|
||||
|
||||
require 'rubygems'
|
||||
require 'rubygems/rdoc'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'rdoc'
|
||||
|
||||
##
|
||||
# Gem::Server and allows users to serve gems for consumption by
|
||||
|
|
|
@ -240,9 +240,9 @@ class Gem::Source
|
|||
end
|
||||
end
|
||||
|
||||
require 'rubygems/source/git'
|
||||
require 'rubygems/source/installed'
|
||||
require 'rubygems/source/specific_file'
|
||||
require 'rubygems/source/local'
|
||||
require 'rubygems/source/lock'
|
||||
require 'rubygems/source/vendor'
|
||||
require_relative 'source/git'
|
||||
require_relative 'source/installed'
|
||||
require_relative 'source/specific_file'
|
||||
require_relative 'source/local'
|
||||
require_relative 'source/lock'
|
||||
require_relative 'source/vendor'
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/remote_fetcher'
|
||||
require 'rubygems/user_interaction'
|
||||
require 'rubygems/errors'
|
||||
require 'rubygems/text'
|
||||
require 'rubygems/name_tuple'
|
||||
require_relative 'remote_fetcher'
|
||||
require_relative 'user_interaction'
|
||||
require_relative 'errors'
|
||||
require_relative 'text'
|
||||
require_relative 'name_tuple'
|
||||
|
||||
##
|
||||
# SpecFetcher handles metadata updates from remote gem repositories.
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/deprecate'
|
||||
require 'rubygems/basic_specification'
|
||||
require 'rubygems/stub_specification'
|
||||
require 'rubygems/specification_policy'
|
||||
require 'rubygems/util/list'
|
||||
require_relative 'deprecate'
|
||||
require_relative 'basic_specification'
|
||||
require_relative 'stub_specification'
|
||||
require_relative 'specification_policy'
|
||||
require_relative 'util/list'
|
||||
|
||||
##
|
||||
# The Specification class contains the information for a gem. Typically
|
||||
|
@ -1568,9 +1568,9 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
unresolved_deps = Gem::Specification.unresolved_deps.dup
|
||||
Gem::Specification.unresolved_deps.clear
|
||||
|
||||
require 'rubygems/config_file'
|
||||
require 'rubygems/ext'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative 'config_file'
|
||||
require_relative 'ext'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
ui = Gem::SilentUI.new
|
||||
Gem::DefaultUserInteraction.use_ui ui do
|
||||
|
@ -2525,7 +2525,7 @@ class Gem::Specification < Gem::BasicSpecification
|
|||
# back, we have to check again here to make sure that our
|
||||
# psych code was properly loaded, and load it if not.
|
||||
unless Gem.const_defined?(:NoAliasYAMLTree)
|
||||
require 'rubygems/psych_tree'
|
||||
require_relative 'psych_tree'
|
||||
end
|
||||
|
||||
builder = Gem::NoAliasYAMLTree.create
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
require 'rubygems/user_interaction'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
class Gem::SpecificationPolicy
|
||||
include Gem::UserInteraction
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
#++
|
||||
|
||||
require 'fileutils'
|
||||
require 'rubygems'
|
||||
require 'rubygems/installer_uninstaller_utils'
|
||||
require 'rubygems/dependency_list'
|
||||
require 'rubygems/rdoc'
|
||||
require 'rubygems/user_interaction'
|
||||
require_relative '../rubygems'
|
||||
require_relative 'installer_uninstaller_utils'
|
||||
require_relative 'dependency_list'
|
||||
require_relative 'rdoc'
|
||||
require_relative 'user_interaction'
|
||||
|
||||
##
|
||||
# An Uninstaller.
|
||||
|
@ -360,7 +360,7 @@ class Gem::Uninstaller
|
|||
# of what it did for us to find rather than trying to recreate
|
||||
# it again.
|
||||
if @format_executable
|
||||
require 'rubygems/installer'
|
||||
require_relative 'installer'
|
||||
Gem::Installer.exec_format % File.basename(filename)
|
||||
else
|
||||
filename
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/deprecate'
|
||||
require 'rubygems/text'
|
||||
require_relative 'deprecate'
|
||||
require_relative 'text'
|
||||
|
||||
##
|
||||
# Module that defines the default UserInteraction. Any class including this
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
require 'rubygems/text'
|
||||
require_relative '../text'
|
||||
|
||||
class Gem::Licenses
|
||||
extend Gem::Text
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems/package'
|
||||
require 'rubygems/installer'
|
||||
require_relative 'package'
|
||||
require_relative 'installer'
|
||||
|
||||
##
|
||||
# Validator performs various gem file and gem database validation
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
# See LICENSE.txt for permissions.
|
||||
#++
|
||||
|
||||
require 'rubygems'
|
||||
require_relative '../rubygems'
|
||||
|
||||
##
|
||||
# Mixin methods for --version and --platform Gem::Command options.
|
||||
|
|
Loading…
Reference in a new issue