Sha256: 3d18f5496175f71020b0abcd19118ba0ef0cc6ec00ba96b83c9aaa7d8cb3e8f5

Contents?: true

Size: 538 Bytes

Versions: 3

Compression:

Stored size: 538 Bytes

Contents

Dir.glob("#{File.dirname(__FILE__)}/*.rake").each { |r| load r }
Dir.glob("#{File.dirname(__FILE__)}/config/*.rake").each { |r| load r }

## Common libraries
def template(template_name, target_path)
  file = File.read("#{File.dirname(__FILE__)}/config/templates/#{template_name}.erb")
  template = ERB.new file, nil, "%"
  rendered = template.result(binding)
  tmp_file = "/tmp/#{SecureRandom.hex}.#{template_name}"
  upload! StringIO.new(rendered), tmp_file
  execute "sudo cp #{tmp_file} #{target_path}"
  execute  "rm #{tmp_file}"
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
prun-ops-0.2.6 lib/capistrano/prun-ops.rb
prun-ops-0.2.4 lib/capistrano/prun-ops.rb
prun-ops-0.2.3 lib/capistrano/prun-ops.rb