Module: Deployment::Methods::DWEB
- Defined in:
- lib/depengine/dsl/dweb.rb
Instance Method Summary collapse
- #dweb_link(source, symlink, options = {}) ⇒ Object
- #dweb_upload(source, target, options = {}) ⇒ Object
- #send_dweb_command(command, options = {}) ⇒ Object
Instance Method Details
#dweb_link(source, symlink, options = {}) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/depengine/dsl/dweb.rb', line 36 def dweb_link(source, symlink, ={}) publisher = ::Publisher::Dweb.new publisher.staging_host = @cdb['staging_host'] publisher.ssh_key_file = @cdb['ssh_key_file'] publisher.siteid = @cdb['siteid'] publisher.remote_symlink(source, symlink, ) end |
#dweb_upload(source, target, options = {}) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/depengine/dsl/dweb.rb', line 17 def dweb_upload(source, target, ={}) Helper.validates_presence_of @cdb['staging_host'], "Staging Host not set" Helper.validates_presence_of @cdb['ssh_key_file'], "SSH keyfile not set" Helper.validates_presence_of @cdb['siteid'], "Siteid not set" Helper.validates_presence_of source Helper.validates_presence_of target publisher = ::Publisher::Dweb.new publisher.staging_host = @cdb['staging_host'] publisher.ssh_key_file = @cdb['ssh_key_file'] publisher.siteid = @cdb['siteid'] vhost = [:siteid] || @cdb['siteid'] [:excludes] = [:excludes] || ['.svn'] publisher.upload(File.join($recipe_config[:deploy_home], source), \ File.join('/vhosts/', vhost, target), ) end |
#send_dweb_command(command, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/depengine/dsl/dweb.rb', line 5 def send_dweb_command(command, ={}) Helper.validates_presence_of @cdb['staging_host'], "Staging Host not set" Helper.validates_presence_of @cdb['ssh_key_file_command'], "SSH keyfile not set" Helper.validates_presence_of @cdb['siteid'], "Siteid not set" publisher = ::Publisher::Dweb.new publisher.staging_host = @cdb['staging_host'] publisher.ssh_key_file = @cdb['ssh_key_file_command'] publisher.siteid = @cdb['siteid'] publisher.send_command(command, ) end |