Class: Bundler::Plugin::Installer

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler/plugin/installer.rb,
lib/bundler/plugin/installer/git.rb,
lib/bundler/plugin/installer/path.rb,
lib/bundler/plugin/installer/rubygems.rb

Defined Under Namespace

Classes: Git, Path, Rubygems

Instance Method Summary collapse

Instance Method Details

#install(names, options) ⇒ Object



15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/bundler/plugin/installer.rb', line 15

def install(names, options)
  check_sources_consistency!(options)

  version = options[:version] || [">= 0"]

  if options[:git]
    install_git(names, version, options)
  elsif options[:path]
    install_path(names, version, options[:path])
  else
    sources = options[:source] || Gem.sources
    install_rubygems(names, version, sources)
  end
end

#install_definition(definition) ⇒ Hash

Installs the plugin from Definition object created by limited parsing of Gemfile searching for plugins to be installed

Parameters:

Returns:

  • (Hash)

    map of names to their specs they are installed with



35
36
37
38
39
40
41
# File 'lib/bundler/plugin/installer.rb', line 35

def install_definition(definition)
  def definition.lock(*); end
  definition.resolve_remotely!
  specs = definition.specs

  install_from_specs specs
end