Class: Migrant::Provisioners::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/migrant/provisioners/base.rb

Direct Known Subclasses

ChefSolo

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(env) ⇒ Base

Returns a new instance of Base.



13
14
15
# File 'lib/migrant/provisioners/base.rb', line 13

def initialize(env)
  @environment = env
end

Class Method Details

.register(shortcut) ⇒ Object



4
5
6
7
# File 'lib/migrant/provisioners/base.rb', line 4

def self.register(shortcut)
  @@provisioners ||= {}
  @@provisioners[shortcut] = self
end

.registered(shortcut) ⇒ Object



9
10
11
# File 'lib/migrant/provisioners/base.rb', line 9

def self.registered(shortcut)
  @@provisioners[shortcut]
end

Instance Method Details

#prepareObject

Any pre-provisioning preparation



23
24
25
# File 'lib/migrant/provisioners/base.rb', line 23

def prepare
  raise "invalid provisioner"
end

#runObject

Run the provisioner



28
29
30
# File 'lib/migrant/provisioners/base.rb', line 28

def run
  raise "invalide provisioner"
end

#uploadObject

Upload any necessary files



18
19
20
# File 'lib/migrant/provisioners/base.rb', line 18

def upload
  raise "invalid provisioner"
end