Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: cfcosta/asset_sync
...
head fork: cfcosta/asset_sync
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 2 contributors
Commits on Dec 05, 2012
@juwalter juwalter Calls 'save' explicitly on Rackspace::File
... in order to allow for custom headers
e9e5304
@cfcosta Merge pull request #1 from juwalter/master
With old version of fog - needs to use file#save for custom headers
fc6d98b
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/asset_sync/storage.rb
View
9 lib/asset_sync/storage.rb
@@ -154,14 +154,17 @@ def upload_file(f)
log "Uploading: #{f}"
end
- bucket.files.create(file) unless ignore
+ unless ignore
+ file_object = bucket.files.new(file)
+ file_object.save(custom_headers(file))
+ end
end
- def add_custom_headers(file)
+ def custom_headers(file)
headers = config.custom_headers.select { |(key, _)| file[:key] =~ key }
return unless headers
- headers.values.each { |h| file.merge! h }
+ headers.values.inject({}) {|hsh,v| hsh.merge!(v); hsh }
end
def upload_files

No commit comments for this range

Something went wrong with that request. Please try again.