Skip to content

Instantly share code, notes, and snippets.

@morgoth
Created November 8, 2010 15:12
Show Gist options
  • Save morgoth/667788 to your computer and use it in GitHub Desktop.
Save morgoth/667788 to your computer and use it in GitHub Desktop.
# hack for the chef - we cannot read file in http_request resource
ruby_block "Set attributes for http request for #{database[:name]} #{database[:kind]}" do
block do
request = resources(:http_request => "Create backup record for #{database[:name]} #{database[:kind]}")
request.message({:backup => {:filename => compressed_file_name, :kind => database[:kind], :size => File.size(compressed_file_path)}})
end
end
http_request "Create backup record for #{database[:name]} #{database[:kind]}" do
url "http://some-url/backups"
action :post
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment