File tree 9 files changed +21
-7
lines changed
9 files changed +21
-7
lines changed Original file line number Diff line number Diff line change
1
+ S3_KEY = KEY
2
+ S3_SECRET = SECRET
Original file line number Diff line number Diff line change 14
14
/log /* .log
15
15
/tmp
16
16
.idea
17
+ /config /database.yml
18
+ /config /services.yml
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ gem 'cancan'
33
33
34
34
gem 'carrierwave' , '0.5.8'
35
35
gem 'fog' , '0.9.0'
36
+ gem 'foreman'
36
37
37
38
gem 'simple_form'
38
39
Original file line number Diff line number Diff line change 90
90
net-ssh (>= 2.1.4 )
91
91
nokogiri (>= 1.4.4 )
92
92
ruby-hmac
93
+ foreman (0.46.0 )
94
+ thor (>= 0.13.6 )
93
95
formatador (0.2.1 )
94
96
gherkin (2.9.3 )
95
97
json (>= 1.4.6 )
@@ -231,6 +233,7 @@ DEPENDENCIES
231
233
devise
232
234
factory_girl
233
235
fog (= 0.9.0 )
236
+ foreman
234
237
guard
235
238
heroku
236
239
jquery-rails
Original file line number Diff line number Diff line change
1
+ web : rails s thin
Original file line number Diff line number Diff line change @@ -3,13 +3,9 @@ development:
3
3
encoding: unicode
4
4
database: wallet
5
5
pool: 5
6
- username : j
7
- password :
8
6
9
7
test:
10
8
adapter: postgresql
11
9
encoding: unicode
12
10
database: wallet
13
- pool : 5
14
- username : j
15
- password :
11
+ pool: 5
Original file line number Diff line number Diff line change 1
1
CarrierWave . configure do |config |
2
2
config . fog_credentials = {
3
3
: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
6
6
# :region => 'eu-west-1' # optional, defaults to 'us-east-1'
7
7
}
8
8
config . fog_directory = 'renters-wallet-documents' # required
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
1
+ s3:
2
+ key: key
3
+ secret: secret
You can’t perform that action at this time.
0 commit comments