Created
November 8, 2010 15:12
-
-
Save morgoth/667788 to your computer and use it in GitHub Desktop.
Revisions
-
morgoth renamed this gist
Nov 9, 2010 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
morgoth created this gist
Nov 8, 2010 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ # 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