mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems*: Updated to RubyGems 2.0
* test/rubygems*: ditto. * common.mk (prelude): Updated for RubyGems 2.0 source rearrangement. * tool/change_maker.rb: Allow invalid UTF-8 characters in source files. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37976 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3f606b7063
commit
9694bb8cac
214 changed files with 14049 additions and 7085 deletions
|
@ -22,6 +22,7 @@ module Gem::InstallUpdateOptions
|
|||
# Add the install/update options to the option parser.
|
||||
|
||||
def add_install_update_options
|
||||
# TODO: use @parser.accept
|
||||
OptionParser.accept Gem::Security::Policy do |value|
|
||||
require 'rubygems/security'
|
||||
|
||||
|
@ -39,21 +40,49 @@ module Gem::InstallUpdateOptions
|
|||
end
|
||||
|
||||
add_option(:"Install/Update", '-n', '--bindir DIR',
|
||||
'Directory where binary files are',
|
||||
'located') do |value, options|
|
||||
'Directory where binary files are',
|
||||
'located') do |value, options|
|
||||
options[:bin_dir] = File.expand_path(value)
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", '-d', '--[no-]rdoc',
|
||||
'Generate RDoc documentation for the gem on',
|
||||
'install') do |value, options|
|
||||
options[:generate_rdoc] = value
|
||||
add_option(:"Install/Update", '--[no-]document [TYPES]', Array,
|
||||
'Generate documentation for installed gems',
|
||||
'List the documentation types you wish to',
|
||||
'generate. For example: rdoc,ri') do |value, options|
|
||||
options[:document] = case value
|
||||
when nil then %w[ri]
|
||||
when false then []
|
||||
else value
|
||||
end
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", '--[no-]ri',
|
||||
'Generate RI documentation for the gem on',
|
||||
'install') do |value, options|
|
||||
options[:generate_ri] = value
|
||||
add_option(:"Install/Update", '-N', '--no-document',
|
||||
'Disable documentation generation') do |value, options|
|
||||
options[:document] = []
|
||||
end
|
||||
|
||||
add_option(:Deprecated, '--[no-]rdoc',
|
||||
'Generate RDoc for installed gems',
|
||||
'Use --document instead') do |value, options|
|
||||
if value then
|
||||
options[:document] << 'rdoc'
|
||||
else
|
||||
options[:document].delete 'rdoc'
|
||||
end
|
||||
|
||||
options[:document].uniq!
|
||||
end
|
||||
|
||||
add_option(:Deprecated, '--[no-]ri',
|
||||
'Generate ri data for installed gems.',
|
||||
'Use --document instead') do |value, options|
|
||||
if value then
|
||||
options[:document] << 'ri'
|
||||
else
|
||||
options[:document].delete 'ri'
|
||||
end
|
||||
|
||||
options[:document].uniq!
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", '-E', '--[no-]env-shebang',
|
||||
|
@ -85,12 +114,6 @@ module Gem::InstallUpdateOptions
|
|||
options[:ignore_dependencies] = value
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", '-y', '--include-dependencies',
|
||||
'Unconditionally install the required',
|
||||
'dependent gems') do |value, options|
|
||||
options[:include_dependencies] = value
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", '--[no-]format-executable',
|
||||
'Make installed executable names match ruby.',
|
||||
'If ruby is ruby18, foo_exec will be',
|
||||
|
@ -105,15 +128,30 @@ module Gem::InstallUpdateOptions
|
|||
end
|
||||
|
||||
add_option(:"Install/Update", "--development",
|
||||
"Install any additional development",
|
||||
"Install additional development",
|
||||
"dependencies") do |value, options|
|
||||
options[:development] = true
|
||||
options[:dev_shallow] = true
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", "--development-all",
|
||||
"Install development dependencies for all",
|
||||
"gems (including dev deps themselves)") do |value, options|
|
||||
options[:development] = true
|
||||
options[:dev_shallow] = false
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", "--conservative",
|
||||
"Don't attempt to upgrade gems already",
|
||||
"meeting version requirement") do |value, options|
|
||||
options[:conservative] = true
|
||||
options[:minimal_deps] = true
|
||||
end
|
||||
|
||||
add_option(:"Install/Update", "--minimal-deps",
|
||||
"Don't upgrade any dependencies that already",
|
||||
"meet version requirements") do |value, options|
|
||||
options[:minimal_deps] = true
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -121,7 +159,7 @@ module Gem::InstallUpdateOptions
|
|||
# Default options for the gem install command.
|
||||
|
||||
def install_update_defaults_str
|
||||
'--rdoc --no-force --wrappers'
|
||||
'--document=rdoc,ri --wrappers'
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue