new(options = {})
public
Creates a new
installer instance.
Options are:
:cache_dir |
Alternate repository path to store .gem files in.
|
:domain |
:local, :remote, or :both. :local only searches gems in the current
directory. :remote searches only gems in Gem::sources. :both searches
both.
|
:env_shebang |
See Gem::Installer::new.
|
:force |
See Gem::Installer#install.
|
:format_executable |
See Gem::Installer#initialize.
|
:ignore_dependencies |
Don’t install any
dependencies.
|
:install_dir |
See Gem::Installer#install.
|
:prerelease |
Allow prerelease versions. See #install.
|
:security_policy |
See Gem::Installer::new and Gem::Security.
|
:user_install |
See Gem::Installer.new
|
:wrappers |
See Gem::Installer::new
|
:build_args |
See Gem::Installer::new
|
Show source
def initialize(options = {})
@only_install_dir = !!options[:install_dir]
@install_dir = options[:install_dir] || Gem.dir
@build_root = options[:build_root]
options = DEFAULT_OPTIONS.merge options
@bin_dir = options[:bin_dir]
@dev_shallow = options[:dev_shallow]
@development = options[:development]
@document = options[:document]
@domain = options[:domain]
@env_shebang = options[:env_shebang]
@force = options[:force]
@format_executable = options[:format_executable]
@ignore_dependencies = options[:ignore_dependencies]
@prerelease = options[:prerelease]
@security_policy = options[:security_policy]
@user_install = options[:user_install]
@wrappers = options[:wrappers]
@build_args = options[:build_args]
@build_docs_in_background = options[:build_docs_in_background]
@install_as_default = options[:install_as_default]
@dir_mode = options[:dir_mode]
@data_mode = options[:data_mode]
@prog_mode = options[:prog_mode]
@minimal_deps = options[:minimal_deps]
@available = nil
@installed_gems = []
@toplevel_specs = nil
@cache_dir = options[:cache_dir] || @install_dir
@errors = []
end