Module: Bundler::Security::Voting::Versions::Local

Defined in:
lib/bundler/security/voting/versions/local.rb

Overview

Module responsible for preparing current or current/new versions of gems

Constant Summary collapse

ME_PATH =

Definition of a local path, if it matches it means that we are the source

'.'
ME_SOURCES =

Sources that we expect to match ourselves too

[
  Bundler::Source::Gemspec,
  Bundler::Source::Path
].freeze

Class Method Summary collapse

Class Method Details

.call(command, definition) ⇒ Object

Parameters:

  • command (String)

    either install or update

  • definition (Bundler::Definition)

    definition for your source



21
22
23
24
25
26
27
28
29
30
# File 'lib/bundler/security/voting/versions/local.rb', line 21

def call(command, definition)
  Bundler.ui.silence { definition.resolve_remotely! }

  case command
  when Commands::INSTALL then build_install(definition)
  when Commands::UPDATE then build_update(definition)
  else
    raise ArgumentError, "invalid command: #{command}"
  end
end