Module: Vagabund

Defined in:
lib/vagabund.rb,
lib/vagabund/boxer.rb,
lib/vagabund/settler.rb,
lib/vagabund/version.rb,
lib/vagabund/squatter.rb,
lib/vagabund/boxer/command.rb,
lib/vagabund/squatter/user.rb,
lib/vagabund/settler/config.rb,
lib/vagabund/settler/errors.rb,
lib/vagabund/settler/sources.rb,
lib/vagabund/squatter/config.rb,
lib/vagabund/settler/packages.rb,
lib/vagabund/settler/projects.rb,
lib/vagabund/settler/provisioner.rb,
lib/vagabund/settler/sources/git.rb,
lib/vagabund/settler/sources/url.rb,
lib/vagabund/squatter/provisioner.rb,
lib/vagabund/settler/packages/base.rb,
lib/vagabund/settler/projects/base.rb,
lib/vagabund/settler/projects/ruby.rb,
lib/vagabund/settler/sources/local.rb,
lib/vagabund/settler/projects/rails.rb,
lib/vagabund/settler/packages/config.rb,
lib/vagabund/settler/projects/config.rb,
lib/vagabund/settler/packages/package_config.rb,
lib/vagabund/settler/projects/project_config.rb

Defined Under Namespace

Modules: Boxer, Settler, Squatter Classes: Plugin

Constant Summary collapse

VERSION =
"0.0.26"

Class Method Summary collapse

Class Method Details

.amazon_images(pattern = nil) ⇒ Object



8
9
10
11
12
# File 'lib/vagabund.rb', line 8

def self.amazon_images(pattern=nil)
  @images ||= JSON.load(`aws ec2 describe-images --owners=self --output=json`)['Images']
  return @images if pattern.nil?
  @images.select { |image| image['Name'].match(pattern) }
end

.most_recent_ami(pattern) ⇒ Object



14
15
16
# File 'lib/vagabund.rb', line 14

def self.most_recent_ami(pattern)
  amazon_images(pattern).sort { |a,b| DateTime.parse(a['CreationDate']) <=> DateTime.parse(b['CreationDate']) }.last
end

.source_rootObject



4
5
6
# File 'lib/vagabund.rb', line 4

def self.source_root
  File.expand_path('../../', __FILE__)
end