Class: Backzilla::Store::SSH

Inherits:
Backzilla::Store show all
Defined in:
lib/backzilla/store/ssh.rb

Instance Attribute Summary

Attributes inherited from Backzilla::Store

#name

Instance Method Summary collapse

Methods inherited from Backzilla::Store

#delete, #get, gnugpg_passphrase=

Methods included from Executor

#execute

Methods included from LoggerHelper

#debug

Constructor Details

#initialize(name, options) ⇒ SSH

Returns a new instance of SSH.



4
5
6
7
8
9
# File 'lib/backzilla/store/ssh.rb', line 4

def initialize(name, options)
  super(name)
  @path = options['path']
  @host = options['host']
  @user = options['user']
end

Instance Method Details

#put(source_path, project_name, entity_name) ⇒ Object



11
12
13
14
15
16
# File 'lib/backzilla/store/ssh.rb', line 11

def put(source_path, project_name, entity_name)
  Net::SSH.start(@host, @user ) do |ssh|
    ssh.exec "mkdir -p " + @path.to_s + "/#{project_name}/#{entity_name}"
  end
  super
end