summaryrefslogtreecommitdiff
path: root/lib/rubygems/commands
diff options
context:
space:
mode:
-rw-r--r--lib/rubygems/commands/cert_command.rb2
-rw-r--r--lib/rubygems/commands/check_command.rb2
-rw-r--r--lib/rubygems/commands/cleanup_command.rb8
-rw-r--r--lib/rubygems/commands/contents_command.rb4
-rw-r--r--lib/rubygems/commands/dependency_command.rb2
-rw-r--r--lib/rubygems/commands/fetch_command.rb4
-rw-r--r--lib/rubygems/commands/generate_index_command.rb2
-rw-r--r--lib/rubygems/commands/info_command.rb4
-rw-r--r--lib/rubygems/commands/install_command.rb10
-rw-r--r--lib/rubygems/commands/list_command.rb4
-rw-r--r--lib/rubygems/commands/lock_command.rb2
-rw-r--r--lib/rubygems/commands/open_command.rb2
-rw-r--r--lib/rubygems/commands/owner_command.rb2
-rw-r--r--lib/rubygems/commands/pristine_command.rb20
-rw-r--r--lib/rubygems/commands/push_command.rb2
-rw-r--r--lib/rubygems/commands/query_command.rb4
-rw-r--r--lib/rubygems/commands/rdoc_command.rb4
-rw-r--r--lib/rubygems/commands/search_command.rb4
-rw-r--r--lib/rubygems/commands/setup_command.rb32
-rw-r--r--lib/rubygems/commands/specification_command.rb4
-rw-r--r--lib/rubygems/commands/uninstall_command.rb4
-rw-r--r--lib/rubygems/commands/unpack_command.rb4
-rw-r--r--lib/rubygems/commands/update_command.rb2
-rw-r--r--lib/rubygems/commands/which_command.rb2
24 files changed, 65 insertions, 65 deletions
@@ -6,7 +6,7 @@ require_relative "../security"
class Gem::Commands::CertCommand < Gem::Command
def initialize
super "cert", "Manage RubyGems certificates and signing settings",
- :add => [], :remove => [], :list => [], :build => [], :sign => []
add_option("-a", "--add CERT",
"Add a trusted certificate.") do |cert_file, options|
@@ -10,7 +10,7 @@ class Gem::Commands::CheckCommand < Gem::Command
def initialize
super "check", "Check a gem repository for added or missing files",
- :alien => true, :doctor => false, :dry_run => false, :gems => true
add_option("-a", "--[no-]alien",
'Report "unmanaged" or rogue files in the',
@@ -8,8 +8,8 @@ class Gem::Commands::CleanupCommand < Gem::Command
def initialize
super "cleanup",
"Clean up old versions of installed gems",
- :force => false, :install_dir => Gem.dir,
- :check_dev => true
add_option("-n", "-d", "--dry-run",
"Do not uninstall gems") do |_value, options|
@@ -166,8 +166,8 @@ If no gems are named all gems in GEM_HOME are cleaned.
say "Attempting to uninstall #{spec.full_name}"
uninstall_options = {
- :executables => false,
- :version => "= #{spec.version}",
}
uninstall_options[:user_install] = Gem.user_dir == spec.base_dir
@@ -8,8 +8,8 @@ class Gem::Commands::ContentsCommand < Gem::Command
def initialize
super "contents", "Display the contents of the installed gems",
- :specdirs => [], :lib_only => false, :prefix => true,
- :show_install_dir => false
add_version_option
@@ -11,7 +11,7 @@ class Gem::Commands::DependencyCommand < Gem::Command
def initialize
super "dependency",
"Show the dependencies of an installed gem",
- :version => Gem::Requirement.default, :domain => :local
add_version_option
add_platform_option
@@ -10,8 +10,8 @@ class Gem::Commands::FetchCommand < Gem::Command
def initialize
defaults = {
- :suggest_alternate => true,
- :version => Gem::Requirement.default,
}
super "fetch", "Download a gem and place it in the current directory", defaults
@@ -12,7 +12,7 @@ class Gem::Commands::GenerateIndexCommand < Gem::Command
def initialize
super "generate_index",
"Generates the index files for a gem server directory",
- :directory => ".", :build_modern => true
add_option "-d", "--directory=DIRNAME",
"repository base dir containing gems subdir" do |dir, options|
@@ -8,8 +8,8 @@ class Gem::Commands::InfoCommand < Gem::Command
def initialize
super "info", "Show information for the given gem",
- :name => //, :domain => :local, :details => false, :versions => true,
- :installed => nil, :version => Gem::Requirement.default
add_query_options
@@ -23,11 +23,11 @@ class Gem::Commands::InstallCommand < Gem::Command
def initialize
defaults = Gem::DependencyInstaller::DEFAULT_OPTIONS.merge({
- :format_executable => false,
- :lock => true,
- :suggest_alternate => true,
- :version => Gem::Requirement.default,
- :without_groups => [],
})
defaults.merge!(install_update_options)
@@ -11,8 +11,8 @@ class Gem::Commands::ListCommand < Gem::Command
def initialize
super "list", "Display local gems whose name matches REGEXP",
- :domain => :local, :details => false, :versions => true,
- :installed => nil, :version => Gem::Requirement.default
add_query_options
end
@@ -5,7 +5,7 @@ require_relative "../command"
class Gem::Commands::LockCommand < Gem::Command
def initialize
super "lock", "Generate a lockdown list of gems",
- :strict => false
add_option "-s", "--[no-]strict",
"fail if unable to satisfy a dependency" do |strict, options|
@@ -70,7 +70,7 @@ class Gem::Commands::OpenCommand < Gem::Command
end
def open_editor(path)
- system(*@editor.split(/\s+/) + [path], { :chdir => path })
end
def spec_for(name)
@@ -39,7 +39,7 @@ permission to.
add_proxy_option
add_key_option
add_otp_option
- defaults.merge! :add => [], :remove => []
add_option "-a", "--add NEW_OWNER", "Add an owner by user identifier" do |value, options|
options[:add] << value
@@ -11,10 +11,10 @@ class Gem::Commands::PristineCommand < Gem::Command
def initialize
super "pristine",
"Restores installed gems to pristine condition from files located in the gem cache",
- :version => Gem::Requirement.default,
- :extensions => true,
- :extensions_set => false,
- :all => false
add_option("--all",
"Restore all installed gems to pristine",
@@ -179,12 +179,12 @@ extensions will be restored.
install_dir = options[:install_dir] if options[:install_dir]
installer_options = {
- :wrappers => true,
- :force => true,
- :install_dir => install_dir || spec.base_dir,
- :env_shebang => env_shebang,
- :build_args => spec.build_args,
- :bin_dir => bin_dir,
}
if options[:only_executables]
@@ -30,7 +30,7 @@ The push command will use ~/.gem/credentials to authenticate to a server, but yo
end
def initialize
- super "push", "Push a gem up to the gem server", :host => host
@user_defined_host = false
@@ -20,8 +20,8 @@ class Gem::Commands::QueryCommand < Gem::Command
def initialize(name = "query", summary = "Query gem information in local or remote repositories")
super name, summary,
- :domain => :local, :details => false, :versions => true,
- :installed => nil, :version => Gem::Requirement.default
add_option("-n", "--name-matches REGEXP",
"Name of gem(s) to query on matches the",
@@ -10,8 +10,8 @@ class Gem::Commands::RdocCommand < Gem::Command
def initialize
super "rdoc", "Generates RDoc for pre-installed gems",
- :version => Gem::Requirement.default,
- :include_rdoc => false, :include_ri => true, :overwrite => false
add_option("--all",
"Generate RDoc/RI documentation for all",
@@ -8,8 +8,8 @@ class Gem::Commands::SearchCommand < Gem::Command
def initialize
super "search", "Display remote gems whose name matches REGEXP",
- :domain => :remote, :details => false, :versions => true,
- :installed => nil, :version => Gem::Requirement.default
add_query_options
end
@@ -14,12 +14,12 @@ class Gem::Commands::SetupCommand < Gem::Command
def initialize
super "setup", "Install RubyGems",
- :format_executable => false, :document => %w[ri],
- :force => true,
- :site_or_vendor => "sitelibdir",
- :destdir => "", :prefix => "", :previous_version => "",
- :regenerate_binstubs => true,
- :regenerate_plugins => true
add_option "--previous-version=VERSION",
"Previous version of RubyGems",
@@ -265,7 +265,7 @@ By default, this RubyGems will install gem as:
fp.puts bin.join
end
- install bin_tmp_file, dest_file, :mode => prog_mode
bin_file_names << dest_file
ensure
rm bin_tmp_file
@@ -287,7 +287,7 @@ By default, this RubyGems will install gem as:
TEXT
end
- install bin_cmd_file, "#{dest_file}.bat", :mode => prog_mode
ensure
rm bin_cmd_file
end
@@ -369,7 +369,7 @@ By default, this RubyGems will install gem as:
File.dirname(loaded_from)
else
target_specs_dir = File.join(default_dir, "specifications", "default")
- mkdir_p target_specs_dir, :mode => 0o755
target_specs_dir
end
@@ -393,7 +393,7 @@ By default, this RubyGems will install gem as:
end
bundler_bin_dir = bundler_spec.bin_dir
- mkdir_p bundler_bin_dir, :mode => 0o755
bundler_spec.executables.each do |e|
cp File.join("bundler", bundler_spec.bindir, e), File.join(bundler_bin_dir, e)
end
@@ -430,8 +430,8 @@ By default, this RubyGems will install gem as:
lib_dir, bin_dir = generate_default_dirs
end
- mkdir_p lib_dir, :mode => 0o755
- mkdir_p bin_dir, :mode => 0o755
[lib_dir, bin_dir]
end
@@ -576,8 +576,8 @@ abort "#{deprecation_message}"
def uninstall_old_gemcutter
require_relative "../uninstaller"
- ui = Gem::Uninstaller.new("gemcutter", :all => true, :ignore => true,
- :version => "< 0.4")
ui.uninstall
rescue Gem::InstallError
end
@@ -639,10 +639,10 @@ abort "#{deprecation_message}"
dest_file = File.join dest_dir, file
dest_dir = File.dirname dest_file
unless File.directory? dest_dir
- mkdir_p dest_dir, :mode => 0o755
end
- install file, dest_file, :mode => options[:data_mode] || 0o644
end
def remove_file_list(files, dir)
@@ -13,8 +13,8 @@ class Gem::Commands::SpecificationCommand < Gem::Command
Gem.load_yaml
super "specification", "Display gem specification (in yaml)",
- :domain => :local, :version => Gem::Requirement.default,
- :format => :yaml
add_version_option("examine")
add_platform_option
@@ -15,8 +15,8 @@ class Gem::Commands::UninstallCommand < Gem::Command
def initialize
super "uninstall", "Uninstall gems from the local repository",
- :version => Gem::Requirement.default, :user_install => true,
- :check_dev => false, :vendor => false
add_option("-a", "--[no-]all",
"Uninstall all matching versions") do |value, options|
@@ -21,8 +21,8 @@ class Gem::Commands::UnpackCommand < Gem::Command
require "fileutils"
super "unpack", "Unpack an installed gem to the current directory",
- :version => Gem::Requirement.default,
- :target => Dir.pwd
add_option("--target=DIR",
"target directory for unpacking") do |value, options|
@@ -21,7 +21,7 @@ class Gem::Commands::UpdateCommand < Gem::Command
def initialize
options = {
- :force => false,
}
options.merge!(install_update_options)
@@ -5,7 +5,7 @@ require_relative "../command"
class Gem::Commands::WhichCommand < Gem::Command
def initialize
super "which", "Find the location of a library file you can require",
- :search_gems_first => false, :show_all => false
add_option "-a", "--[no-]all", "show all matching files" do |show_all, options|
options[:show_all] = show_all