fog, aws not supported any more

This commit is contained in:
Espen Antonsen 2011-04-12 13:01:04 +08:00
parent 7acec90448
commit 19b95fe4a4
4 changed files with 25 additions and 22 deletions

View file

@ -12,8 +12,7 @@ gem "carrierwave", :git => 'git://github.com/jnicklas/carrierwave.git'
gem 'sqlite3-ruby' gem 'sqlite3-ruby'
# S3 support # S3 support
#gem 'fog' gem 'fog'
gem 'aws'
# ImageMagick: # ImageMagick:
#gem "rmagick", :require => 'RMagick' #gem "rmagick", :require => 'RMagick'

View file

@ -36,16 +36,22 @@ GEM
activesupport (= 3.0.6) activesupport (= 3.0.6)
activesupport (3.0.6) activesupport (3.0.6)
arel (2.0.9) arel (2.0.9)
aws (2.4.5)
activesupport
http_connection
uuidtools
xml-simple
builder (2.1.2) builder (2.1.2)
erubis (2.6.6) erubis (2.6.6)
abstract (>= 1.0.0) abstract (>= 1.0.0)
http_connection (1.4.0) excon (0.6.1)
fog (0.7.2)
builder
excon (>= 0.6.1)
formatador (>= 0.1.3)
json
mime-types
net-ssh (>= 2.1.3)
nokogiri (>= 1.4.4)
ruby-hmac
formatador (0.1.3)
i18n (0.5.0) i18n (0.5.0)
json (1.5.1)
mail (2.2.15) mail (2.2.15)
activesupport (>= 2.3.6) activesupport (>= 2.3.6)
i18n (>= 0.4.0) i18n (>= 0.4.0)
@ -55,6 +61,8 @@ GEM
mini_exiftool (1.3.0) mini_exiftool (1.3.0)
mini_magick (3.2) mini_magick (3.2)
subexec (~> 0.0.4) subexec (~> 0.0.4)
net-ssh (2.1.4)
nokogiri (1.4.4)
polyglot (0.3.1) polyglot (0.3.1)
rack (1.2.2) rack (1.2.2)
rack-mount (0.6.14) rack-mount (0.6.14)
@ -75,6 +83,7 @@ GEM
rake (>= 0.8.7) rake (>= 0.8.7)
thor (~> 0.14.4) thor (~> 0.14.4)
rake (0.8.7) rake (0.8.7)
ruby-hmac (0.4.0)
sqlite3 (1.3.3) sqlite3 (1.3.3)
sqlite3-ruby (1.3.3) sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3) sqlite3 (>= 1.3.3)
@ -83,15 +92,13 @@ GEM
treetop (1.4.9) treetop (1.4.9)
polyglot (>= 0.3.1) polyglot (>= 0.3.1)
tzinfo (0.3.26) tzinfo (0.3.26)
uuidtools (2.1.2)
xml-simple (1.0.15)
PLATFORMS PLATFORMS
ruby ruby
DEPENDENCIES DEPENDENCIES
aws
carrierwave! carrierwave!
fog
mime-types mime-types
mini_exiftool mini_exiftool
mini_magick mini_magick

View file

@ -8,7 +8,7 @@ class FileUploader < CarrierWave::Uploader::Base
include CarrierWave::MiniMagick include CarrierWave::MiniMagick
# Choose what kind of storage to use for this uploader # Choose what kind of storage to use for this uploader
if ENV['S3_KEY'] if ENV['S3_KEY']
storage :s3 storage :fog
def cache_dir def cache_dir
"#{RAILS_ROOT}/tmp/uploads" if ENV['HEROKU'] == 'true' "#{RAILS_ROOT}/tmp/uploads" if ENV['HEROKU'] == 'true'

View file

@ -1,12 +1,9 @@
CarrierWave.configure do |config| CarrierWave.configure do |config|
config.s3_access_key_id = ENV['S3_KEY'] config.fog_credentials = {
config.s3_secret_access_key = ENV['S3_SECRET'] :provider => 'AWS',
config.s3_bucket = ENV['S3_BUCKET'] :aws_access_key_id => ENV['S3_KEY'],
#config.fog_credentials = { :aws_secret_access_key => ENV['S3_SECRET'],
# :provider => 'AWS', :region => 'us-east-1'
# :aws_access_key_id => ENV['S3_KEY'], }
# :aws_secret_access_key => ENV['S3_SECRET'], config.fog_directory = ENV['S3_BUCKET']
# :region => 'us-east-1'
#}
#config.fog_directory = ENV['S3_BUCKET']
end end