Class: Admiral::Layers::AdmiralTestServerspecRun
- Inherits:
-
Admiral::LayerBase
- Object
- Admiral::LayerBase
- Admiral::Layers::AdmiralTestServerspecRun
- Defined in:
- lib/admiral/layers/admiral.test.serverspec.run.rb
Instance Method Summary collapse
- #do_action ⇒ Object
-
#initialize(config, ipaddress) ⇒ AdmiralTestServerspecRun
constructor
A new instance of AdmiralTestServerspecRun.
Methods inherited from Admiral::LayerBase
#add_parameter, inherited, #run, #run_ssh_command, #show_information, #upload, #verify
Constructor Details
#initialize(config, ipaddress) ⇒ AdmiralTestServerspecRun
Returns a new instance of AdmiralTestServerspecRun.
10 11 12 13 14 |
# File 'lib/admiral/layers/admiral.test.serverspec.run.rb', line 10 def initialize(config, ipaddress) description = "Run RSpec" super(description, config, ipaddress) end |
Instance Method Details
#do_action ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'lib/admiral/layers/admiral.test.serverspec.run.rb', line 16 def do_action() username = @config['username'] gemsdir = "/tmp/#{username}/gems" cachedir = "#{gemsdir}/cache" env = { 'username' => username, 'GEM_HOME' => gemsdir, 'GEM_PATH' => gemsdir, 'GEM_CACHE' => cachedir, } cmd = "/tmp/#{username}/#{$uid}.sh" rc = run_ssh_command(cmd, :env => env) return (rc == 0) end |