Mixin methods for install and update options for Gem::Commands
Add the install/update options to the option parser.
# File lib/rubygems/install_update_options.rb, line 18 18: def add_install_update_options 19: OptionParser.accept Gem::Security::Policy do |value| 20: value = Gem::Security::Policies[value] 21: raise OptionParser::InvalidArgument, value if value.nil? 22: value 23: end 24: 25: add_option(:"Install/Update", '-i', '--install-dir DIR', 26: 'Gem repository directory to get installed', 27: 'gems') do |value, options| 28: options[:install_dir] = File.expand_path(value) 29: end 30: 31: add_option(:"Install/Update", '-n', '--bindir DIR', 32: 'Directory where binary files are', 33: 'located') do |value, options| 34: options[:bin_dir] = File.expand_path(value) 35: end 36: 37: add_option(:"Install/Update", '-d', '--[no-]rdoc', 38: 'Generate RDoc documentation for the gem on', 39: 'install') do |value, options| 40: options[:generate_rdoc] = value 41: end 42: 43: add_option(:"Install/Update", '--[no-]ri', 44: 'Generate RI documentation for the gem on', 45: 'install') do |value, options| 46: options[:generate_ri] = value 47: end 48: 49: add_option(:"Install/Update", '-E', '--[no-]env-shebang', 50: "Rewrite the shebang line on installed", 51: "scripts to use /usr/bin/env") do |value, options| 52: options[:env_shebang] = value 53: end 54: 55: add_option(:"Install/Update", '-f', '--[no-]force', 56: 'Force gem to install, bypassing dependency', 57: 'checks') do |value, options| 58: options[:force] = value 59: end 60: 61: add_option(:"Install/Update", '-t', '--[no-]test', 62: 'Ignored; just for compatiblity') do |value, options| 63: end 64: 65: add_option(:"Install/Update", '-w', '--[no-]wrappers', 66: 'Use bin wrappers for executables', 67: 'Not available on dosish platforms') do |value, options| 68: options[:wrappers] = value 69: end 70: 71: add_option(:"Install/Update", '-P', '--trust-policy POLICY', 72: Gem::Security::Policy, 73: 'Specify gem trust policy') do |value, options| 74: options[:security_policy] = value 75: end 76: 77: add_option(:"Install/Update", '--ignore-dependencies', 78: 'Do not install any required dependent gems') do |value, options| 79: options[:ignore_dependencies] = value 80: end 81: 82: add_option(:"Install/Update", '-y', '--include-dependencies', 83: 'Unconditionally install the required', 84: 'dependent gems') do |value, options| 85: options[:include_dependencies] = value 86: end 87: 88: add_option(:"Install/Update", '--[no-]format-executable', 89: 'Make installed executable names match ruby.', 90: 'If ruby is ruby18, foo_exec will be', 91: 'foo_exec18') do |value, options| 92: options[:format_executable] = value 93: end 94: 95: add_option(:"Install/Update", '--[no-]user-install', 96: 'Install in user\s home directory instead', 97: 'of GEM_HOME.') do |value, options| 98: options[:user_install] = value 99: end 100: 101: add_option(:"Install/Update", "--development", 102: "Install any additional development", 103: "dependencies") do |value, options| 104: options[:development] = true 105: end 106: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.