Skip to content

Commit

Permalink
Merge 4fd40ec into 431ca35
Browse files Browse the repository at this point in the history
  • Loading branch information
jameshamann committed Nov 15, 2016
2 parents 431ca35 + 4fd40ec commit 8349f44
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Expand Up @@ -17,6 +17,8 @@ gem 'shoulda'

gem 'paperclip'

gem 'aws-sdk'

gem 'devise'

gem 'travis'
Expand Down
10 changes: 10 additions & 0 deletions Gemfile.lock
Expand Up @@ -41,6 +41,14 @@ GEM
acts_as_votable (0.10.0)
addressable (2.4.0)
arel (7.1.4)
aws-sdk (2.6.20)
aws-sdk-resources (= 2.6.20)
aws-sdk-core (2.6.20)
aws-sigv4 (~> 1.0)
jmespath (~> 1.0)
aws-sdk-resources (2.6.20)
aws-sdk-core (= 2.6.20)
aws-sigv4 (1.0.0)
backports (3.6.8)
bcrypt (3.1.11)
builder (3.2.2)
Expand Down Expand Up @@ -107,6 +115,7 @@ GEM
jbuilder (2.6.0)
activesupport (>= 3.0.0, < 5.1)
multi_json (~> 1.2)
jmespath (1.3.1)
jquery-rails (4.2.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand Down Expand Up @@ -288,6 +297,7 @@ PLATFORMS

DEPENDENCIES
acts_as_votable (~> 0.10.0)
aws-sdk
byebug
capybara
coffee-rails (~> 4.2)
Expand Down
11 changes: 11 additions & 0 deletions config/environments/development.rb
Expand Up @@ -7,6 +7,17 @@

Paperclip.options[:command_path] = "/usr/local/bin/convert/"

config.paperclip_defaults = {
storage: :s3,
s3_host_name: "s3-eu-west-1.amazonaws.com",
s3_credentials: {
bucket: ENV.fetch('S3_BUCKET_NAME'),
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
secret_access_key: ENV.fetch('AWS_SECRET_KEY'),
s3_region: ENV.fetch('AWS_REGION'),
}
}

config.cache_classes = false

# Do not eager load code on boot.
Expand Down
11 changes: 11 additions & 0 deletions config/environments/production.rb
Expand Up @@ -4,6 +4,17 @@
# Code is not reloaded between requests.
config.cache_classes = true

config.paperclip_defaults = {
storage: :s3,
s3_host_name: "s3-eu-west-1.amazonaws.com",
s3_credentials: {
bucket: ENV.fetch('S3_BUCKET_NAME'),
access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
secret_access_key: ENV.fetch('AWS_SECRET_KEY'),
s3_region: ENV.fetch('AWS_REGION'),
}
}

# Eager load code on boot. This eager loads most of Rails and
# your application in memory, allowing both threaded web servers
# and those relying on copy on write to perform better.
Expand Down
11 changes: 11 additions & 0 deletions config/environments/test.rb
Expand Up @@ -7,6 +7,17 @@
# and recreated between test runs. Don't rely on the data there!
config.cache_classes = true

config.paperclip_defaults = {
storage: :s3,
s3_host_name: "s3-eu-west-1.amazonaws.com",
s3_credentials: {
bucket: ENV["S3_BUCKET_NAME"],
access_key_id: ENV["AWS_ACCESS_KEY_ID"],
secret_access_key: ENV["AWS_SECRET_KEY"],
s3_region: ENV["AWS_REGION"],
}
}

# Do not eager load code on boot. This avoids loading your whole application
# just for the purpose of running a single test. If you are using a tool that
# preloads Rails for running tests, you may have to set it to true.
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8349f44

Please sign in to comment.