Class: IsaacToolbelt::Local
- Inherits:
-
Thor
- Object
- Thor
- IsaacToolbelt::Local
show all
- Extended by:
- Helper
- Defined in:
- lib/isaac_toolbelt.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Helper
check_file, config_network, host, mkdir_if_not, reboot, ssh_run_command, temp_path, transfer_files, upload_string_as_file, waitfor, waitfor_network
Class Method Details
.is_thor_reserved_word?(word, type) ⇒ Boolean
Hackery. Take the run method away from Thor so that we can redefine it.
176
177
178
179
|
# File 'lib/isaac_toolbelt.rb', line 176
def is_thor_reserved_word?(word, type)
return false if word == "run"
super
end
|
Instance Method Details
#debug_node ⇒ Object
197
198
199
200
201
202
203
204
205
|
# File 'lib/isaac_toolbelt.rb', line 197
def debug_node
temp_path = self.class.make_temp_dir(TEMP_ROOT)
result = self.class.transfer_files(temp_path)
if result
self.class.ssh_run_command('cd %s; npm install; node app.js' % [temp_path])
else
puts 'Transfer failed'
end
end
|
#run(*args) ⇒ Object
190
191
192
193
194
|
# File 'lib/isaac_toolbelt.rb', line 190
def run(*args)
temp_path = self.class.temp_path
self.class.transfer_files(temp_path)
self.class.ssh_run_command("cd #{temp_path}; " + 'honcho run ' + args.shelljoin)
end
|
#start ⇒ Object
183
184
185
186
187
|
# File 'lib/isaac_toolbelt.rb', line 183
def start
temp_path = self.class.temp_path
self.class.transfer_files(temp_path)
self.class.ssh_run_command("cd #{temp_path}; " + 'honcho start')
end
|