Skip to content

Commit

Permalink
Adding aws-sdk, making Paperclip use S3, setting up an example site.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
tombenner committed Nov 26, 2012
1 parent 616d8e6 commit 86b54c1
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -5,4 +5,5 @@ log/*.log
tmp/
.sass-cache/
config/database.yml
config/site.yml
public/system/
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -10,6 +10,7 @@ gem 'devise'
gem 'activeadmin'
gem 'settingslogic'
gem 'paperclip', '~> 2.7'
gem 'aws-sdk', '~> 1.3.4'
gem 'twitter-bootstrap-rails'
gem 'auto_strip_attributes', '~> 1.0'
gem 'redcarpet'
Expand Down
12 changes: 12 additions & 0 deletions Gemfile.lock
Expand Up @@ -43,6 +43,11 @@ GEM
arel (3.0.2)
auto_strip_attributes (1.1)
activerecord (>= 3.0)
aws-sdk (1.3.9)
httparty (~> 0.7)
json (~> 1.4)
nokogiri (>= 1.4.4)
uuidtools (~> 2.1)
bcrypt-ruby (3.0.1)
bourbon (1.4.0)
sass (>= 3.1)
Expand Down Expand Up @@ -70,6 +75,9 @@ GEM
actionpack (~> 3.0)
has_scope (0.5.1)
hike (1.2.1)
httparty (0.9.0)
multi_json (~> 1.0)
multi_xml
i18n (0.6.1)
inherited_resources (1.3.1)
has_scope (~> 0.5.0)
Expand Down Expand Up @@ -101,7 +109,9 @@ GEM
polyamorous (~> 0.5.0)
mime-types (1.19)
multi_json (1.3.6)
multi_xml (0.5.1)
mysql2 (0.3.11)
nokogiri (1.5.5)
orm_adapter (0.0.7)
paperclip (2.7.0)
activerecord (>= 2.3.0)
Expand Down Expand Up @@ -166,6 +176,7 @@ GEM
uglifier (1.2.4)
execjs (>= 0.3.0)
multi_json (>= 1.0.2)
uuidtools (2.1.3)
warden (1.1.1)
rack (>= 1.0)

Expand All @@ -175,6 +186,7 @@ PLATFORMS
DEPENDENCIES
activeadmin
auto_strip_attributes (~> 1.0)
aws-sdk (~> 1.3.4)
coffee-rails (~> 3.2.1)
devise
jquery-rails
Expand Down
3 changes: 3 additions & 0 deletions config/initializers/paperclip.rb
@@ -0,0 +1,3 @@
SiteSettings.paperclip_options.each do |key, value|
Paperclip::Attachment.default_options[key.to_sym] = value
end
11 changes: 10 additions & 1 deletion config/site.yml
@@ -1,6 +1,15 @@
defaults: &defaults
site_name: "Site Name"
site_slogan: "Site slogan"
paperclip_options:
storage: s3
s3_credentials:
access_key_id: "my_access_key_id"
secret_access_key: "my_secret_access_key"
bucket: "my.bucket"
url: ":s3_domain_url"
path: "/:class/:attachment/:id/:style/:hash.:extension"
hash_data: ":class/:attachment/:id/:style/:extension"
hash_secret: "my_secret"

development:
<<: *defaults
Expand Down
21 changes: 21 additions & 0 deletions config/site.yml.example
@@ -0,0 +1,21 @@
defaults: &defaults
site_name: "Site Name"
paperclip_options:
storage: s3
s3_credentials:
access_key_id: "my_access_key_id"
secret_access_key: "my_secret_access_key"
bucket: "my.bucket"
url: ":s3_domain_url"
path: "/:class/:attachment/:id/:style/:hash.:extension"
hash_data: ":class/:attachment/:id/:style/:extension"
hash_secret: "my_secret"

development:
<<: *defaults

test:
<<: *defaults

production:
<<: *defaults

0 comments on commit 86b54c1

Please sign in to comment.