Skip to content

Commit

Permalink
store objects in s3, list them in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Sep 12, 2011
1 parent f358d89 commit c948858
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 5 deletions.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ group :development do
gem 'rcov', '~> 0.9.8'
gem 'rr', '~> 1.0.2'
gem 'rspec', '~> 2.6.0'
gem 'aws-s3'
gem "rubyzip"
end
7 changes: 7 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ PATH
GEM
remote: http://rubygems.org/
specs:
aws-s3 (0.6.2)
builder
mime-types
xml-simple
builder (3.0.0)
crack (0.1.8)
diff-lcs (1.1.2)
fakefs (0.2.1)
Expand Down Expand Up @@ -39,11 +44,13 @@ GEM
rubyzip (0.9.4)
term-ansicolor (1.0.6)
thor (0.14.6)
xml-simple (1.0.15)

PLATFORMS
ruby

DEPENDENCIES
aws-s3
fakefs (~> 0.2.1)
foreman!
parka
Expand Down
10 changes: 10 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,18 @@

## Installation

* Rubygems

gem install foreman

* OSX

http://assets.foreman.io/foreman/foreman.pkg

* Standalone Tarball

http://assets.foreman.io/foreman/foreman.tgz

## Description

http://blog.daviddollar.org/2011/05/06/introducing-foreman.html
Expand Down
10 changes: 5 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,20 @@ def s3_connect

require "aws/s3"

unless ENV["HEROKU_RELEASE_ACCESS"] && ENV["HEROKU_RELEASE_SECRET"]
puts "please set HEROKU_RELEASE_ACCESS and HEROKU_RELEASE_SECRET in your environment"
unless ENV["DAVID_RELEASE_ACCESS"] && ENV["DAVID_RELEASE_SECRET"]
puts "please set DAVID_RELEASE_ACCESS and DAVID_RELEASE_SECRET in your environment"
exit 1
end

AWS::S3::Base.establish_connection!(
:access_key_id => ENV["HEROKU_RELEASE_ACCESS"],
:secret_access_key => ENV["HEROKU_RELEASE_SECRET"]
:access_key_id => ENV["DAVID_RELEASE_ACCESS"],
:secret_access_key => ENV["DAVID_RELEASE_SECRET"]
)

@s3_connected = true
end

def store(package_file, filename, bucket="assets.heroku.com")
def store(package_file, filename, bucket="assets.foreman.io")
s3_connect
puts "storing: #{filename}"
AWS::S3::S3Object.store(filename, File.open(package_file), bucket, :access => :public_read)
Expand Down

0 comments on commit c948858

Please sign in to comment.