Class: Rango::GemDependencyStrategy

Constructor Summary

public initialize(gemname, version = nil)

Meta Tags

Parameters:

Since:

0.0.1

[View source]


39
40
41
42
# File 'lib/rango/bundling/strategies.rb', line 39

def initialize(gemname, version = nil)
  @gemname = gemname
  @version = version
end

Public Visibility

Public Class Methods Inherited from Rango::DependencyStrategy

register

Public Instance Method Summary

#get

Public Instance Method Details

get

public get

Meta Tags

Parameters:

Since:

0.0.1

[View source]


45
46
47
48
49
50
51
52
53
# File 'lib/rango/bundling/strategies.rb', line 45

def get
  part = File.join(Gem.path, "cache", @gemname)
  if @version
    path = "#{part}-#{@version}.gem"
  else
    path = Dir["#{part}-*.gem"].last
  end
  %x[cp "#{path}" .]
end