Skip to content

Commit 89b39ab

Browse files
committed
move to rails credentials
1 parent 7a00202 commit 89b39ab

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.gitignore

+5-1
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,9 @@ bower.json
7474
# Ignore Byebug command history file.
7575
.byebug_history
7676

77-
# Ignore application configuration
77+
# Ignore application configuration - Figaro
7878
/config/application.yml
79+
80+
# Ignore master.key (Rails 5 way of storing secrets)
81+
# copy the key to Heroku ENV["RAILS_MASTER_KEY"]
82+
/config/master.key

app/views/layouts/application.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<%= javascript_include_tag 'application' %>
1010

1111
<%= render 'application/favicon' %>
12-
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{ENV['GOOGLE_MAPS_API_KEY']}&language=en" %>
12+
<%= javascript_include_tag "https://maps.googleapis.com/maps/api/js?key=#{Rails.application.credentials.google_maps_api_key}&language=en" %>
1313
<!-- Global site tag (gtag.js) - Google Analytics -->
1414
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-38641855-7"></script>
1515
<script>

config/application.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ class Application < Rails::Application
1919
:storage => :s3,
2020
:s3_protocol => :https,
2121
:s3_credentials => {
22-
:bucket => ENV["s3_bucket"],
23-
:access_key_id => ENV["s3_access_key_id"],
24-
:secret_access_key => ENV["s3_secret_access_key"],
25-
:s3_region => ENV["s3_region"]
22+
:bucket => ENV['s3_bucket'],
23+
:access_key_id => Rails.application.credentials.s3_access_key_id,
24+
:secret_access_key => Rails.application.credentials.s3_secret_access_key,
25+
:s3_region => Rails.application.credentials.s3_region,
2626
}
2727
}
2828

config/credentials.yml.enc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gDKfIhRHrwwtBP6rllyw1R4Qy/PbPqqJcB/I/+SBi0kXHdaXz9rtH1pUuUos0LszsXhRRxSp7ZODDsqcmeYpEkQ9Yp3SqNST4ncoVNH0aSVEryaVO7sd/g6CcJ2q996EjSx0frvhNk1k0MYaNy48k1oMk7td3M6WGG8/rXppy48X9uMsx/cQlxlZU5cRYOsJi/O9veNq7XxJi5B828luTbeUMx4n53QVth9k4verBChukF3tTSsQVVQP2JV4YPVCl0QzG+/iZBj65ykPxDZgJTZEwIPOdW2Aa0rrpn9yBRFgycz+uVOMi9u/KJCYgN+O5niwnY6JJ4xfbG0p1pndIDtV6gVqMvxDO8G4iaJMbhXWHPLxEjOqsb6C+Kg9sH1JQN9EPddpfCbMU83kYdaNy7Koi85u3QWK/4jNxKT0tPvwOiKZoIbccmY9EdNAR/wmEmxCtrOlbusnqbedZdEYAK2TWOANQJ0GrxJZXdIVNx1lhkmvMw/dKw9qPFMR3FxWfdQPOw1E88LFckQwRvdU71NQGIPcIDb6o9ztDjszO14mEsv0oWBCSB6ZevDXT8Xuxw9bl9/KrvKX8MAi03/KhH9fH12TA6NA5RIR61gIsVHeCPtofcJoYLiJcTmn4lQ6iFuen7+Uu+ybY5Y87QR3OeAUq2ijKA==--MgbqQ04tlyJ0+1v/--ftABGHIqi/KJBz+Amwd79g==

0 commit comments

Comments
 (0)