Class: StackMob::Deployer

Inherits:
Object
  • Object
show all
Defined in:
lib/stackmob/deployer.rb

Constant Summary collapse

APP_PATH =
"heroku/app"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(cl) ⇒ Deployer

Returns a new instance of Deployer.



24
25
26
# File 'lib/stackmob/deployer.rb', line 24

def initialize(cl)
  self.client = cl
end

Instance Attribute Details

#clientObject

Returns the value of attribute client.



20
21
22
# File 'lib/stackmob/deployer.rb', line 20

def client
  @client
end

Instance Method Details

#fetchObject



32
33
34
# File 'lib/stackmob/deployer.rb', line 32

def fetch
  self.client.request(:get, :api, APP_PATH)
end

#register(hostname) ⇒ Object



28
29
30
# File 'lib/stackmob/deployer.rb', line 28

def register(hostname)
  self.client.request(:post, :api, APP_PATH, :hostname => hostname)
end