Skip to content

Commit

Permalink
make new files public readable
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information
geemus authored and qrush committed Aug 3, 2010
1 parent 061ee72 commit e367d41
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/models/vault.rb
Expand Up @@ -16,10 +16,11 @@ def write_gem
Pusher.indexer.abbreviate spec
Pusher.indexer.sanitize spec

directory.files.create(
file = directory.files.new(
:body => Gem.deflate(Marshal.dump(spec)),
:key => "quick/Marshal.4.8/#{spec.original_name}.gemspec.rz"
)
file.save('x-amz-acl' => 'public-read')
end

def upload(key, value)
Expand All @@ -29,10 +30,11 @@ def upload(key, value)
gzip.close

# For the life of me, I can't figure out how to pass a stream in here from a closed StringIO
directory.files.create(
file = directory.files.new(
:body => final.string,
:key => key
)
file.save('x-amz-acl' => 'public-read')
end
end

Expand Down

0 comments on commit e367d41

Please sign in to comment.