Skip to content

Commit 2872bcf

Browse files
committed
Making changes to project settings
1 parent e71eb3c commit 2872bcf

9 files changed

+21
-7
lines changed

.env.example

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
S3_KEY=KEY
2+
S3_SECRET=SECRET

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@
1414
/log/*.log
1515
/tmp
1616
.idea
17+
/config/database.yml
18+
/config/services.yml

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ gem 'cancan'
3333

3434
gem 'carrierwave', '0.5.8'
3535
gem 'fog', '0.9.0'
36+
gem 'foreman'
3637

3738
gem 'simple_form'
3839

Gemfile.lock

+3
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ GEM
9090
net-ssh (>= 2.1.4)
9191
nokogiri (>= 1.4.4)
9292
ruby-hmac
93+
foreman (0.46.0)
94+
thor (>= 0.13.6)
9395
formatador (0.2.1)
9496
gherkin (2.9.3)
9597
json (>= 1.4.6)
@@ -231,6 +233,7 @@ DEPENDENCIES
231233
devise
232234
factory_girl
233235
fog (= 0.9.0)
236+
foreman
234237
guard
235238
heroku
236239
jquery-rails

Procfile

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: rails s thin

config/database.yml config/database.yml.example

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,9 @@ development:
33
encoding: unicode
44
database: wallet
55
pool: 5
6-
username: j
7-
password:
86

97
test:
108
adapter: postgresql
119
encoding: unicode
1210
database: wallet
13-
pool: 5
14-
username: j
15-
password:
11+
pool: 5

config/initializers/fog.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
CarrierWave.configure do |config|
22
config.fog_credentials = {
33
:provider => 'AWS', # required
4-
:aws_access_key_id => 'AKIAINJ6HA3PY44KIGZA', # required
5-
:aws_secret_access_key => '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' # required
4+
:aws_access_key_id => ENV['S3_KEY'], # required
5+
:aws_secret_access_key => ENV['S3_SECRET'] # required
66
# :region => 'eu-west-1' # optional, defaults to 'us-east-1'
77
}
88
config.fog_directory = 'renters-wallet-documents' # required

config/initializers/s3.rb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
require 'yaml'
2+
if !Rails.env.production?
3+
config = YAML.load_file(Rails.root.join("config", "services.yml"))
4+
ENV['S3_KEY'] = config["s3"]["key"]
5+
ENV['S3_SECRET'] = config["s3"]["secret"]
6+
end

config/services.yml.example

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
s3:
2+
key: key
3+
secret: secret

0 commit comments

Comments
 (0)