Class: AppFog
- Inherits:
-
Object
- Object
- AppFog
- Defined in:
- lib/app_fog.rb
Instance Method Summary collapse
-
#initialize(parameters) ⇒ AppFog
constructor
A new instance of AppFog.
- #login ⇒ Object
- #start(app_name) ⇒ Object
- #update(app_name) ⇒ Object
- #update_from_directory(parameters) ⇒ Object
Constructor Details
#initialize(parameters) ⇒ AppFog
Returns a new instance of AppFog.
6 7 8 9 10 11 |
# File 'lib/app_fog.rb', line 6 def initialize(parameters) @shell_command = parameters[:shell_command] || ShellCommandWrapper.new() @username = parameters[:username] @password = parameters[:password] login end |
Instance Method Details
#login ⇒ Object
13 14 15 |
# File 'lib/app_fog.rb', line 13 def login @shell_command.perform "af login --email #{@username} --passwd #{@password}" end |
#start(app_name) ⇒ Object
27 28 29 |
# File 'lib/app_fog.rb', line 27 def start(app_name) @shell_command.perform "af start #{app_name}" end |
#update(app_name) ⇒ Object
17 18 19 |
# File 'lib/app_fog.rb', line 17 def update(app_name) @shell_command.perform "af update #{app_name}" end |
#update_from_directory(parameters) ⇒ Object
21 22 23 24 25 |
# File 'lib/app_fog.rb', line 21 def update_from_directory(parameters) app_name = parameters[:app_name] directory = parameters[:directory] @shell_command.perform "af update #{app_name} --path #{directory}" end |