File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,6 +43,6 @@ ROLLBAR_ENV=
4343# Include your Translation.io API key for the appropriate domains:
4444# app => TRANSLATION_API_ROADMAP
4545# client => TRANSLATION_API_CLIENT
46- DOMAIN=app
47- TRANSLATION_API_ROADMAP=
48- TRANSLATION_API_CLIENT=
46+ # DOMAIN=app
47+ # TRANSLATION_API_ROADMAP=
48+ # TRANSLATION_API_CLIENT=
Original file line number Diff line number Diff line change 1+ # aws:
2+ # access_key_id: 123
3+ # secret_access_key: 345
4+
5+ # Recaptcha credentials
6+ recaptcha:
7+ site_key: "11111"
8+ secret_key: "22222"
9+
10+ # Database details
11+ database:
12+ user_name: roadmap
13+ password: password123
14+
15+ # Dragonfly gem
16+ dragonfly_secret: "my_dragonfly_secret"
17+
18+ # Devise credentials
19+ secret_key: "11111122222"
20+ devise_pepper: "111122223333444455555"
21+
22+ # Translation.io API key
23+ translation_api_key: "111112222333334444"
24+
25+ translation_api_client_key: "Client key if present"
26+
27+ # Used as the base secret for all MessageVerifiers in Rails, including the one protecting cookies.
28+ secret_key_base: "1111111111111222222223333333444444"
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ defaults: &defaults
55 host: <%= ENV.fetch('DB_HOST', 'localhost') %>
66 port: <%= ENV.fetch('DB_PORT', '5432') %>
77 database: <%= ENV.fetch('DB_NAME', 'roadmap') %>
8- username: <%= ENV.fetch('DB_USERNAME', Rails.application.credentials.db_username ) %>
9- password: <%= ENV.fetch('DB_PASSWORD', Rails.application.credentials.db_password ) %>
8+ username: <%= Rails.application.credentials.dig(:database, :username ) %>
9+ password: <%= Rails.application.credentials.dig(:database, :password ) %>
1010
1111development:
1212 <<: *defaults
Original file line number Diff line number Diff line change 2121# domain specified in order to generate both sets of translation keys.
2222if !ENV [ 'DOMAIN' ] || ENV [ 'DOMAIN' ] == 'app'
2323 TranslationIO . configure do |config |
24- config . api_key = ENV . fetch ( 'TRANSLATION_API_ROADMAP' , nil )
24+ config . api_key = Rails . application . credentials . dig ( :translation_api_key ) . presence
2525 config . source_locale = 'en'
2626 config . target_locales = SUPPORTED_LOCALES
2727 config . text_domain = 'app'
3131 end
3232elsif ENV [ 'DOMAIN' ] == 'client'
3333 TranslationIO . configure do |config |
34- config . api_key = ENV . fetch ( 'TRANSLATION_API_CLIENT' , nil )
34+ config . api_key = Rails . application . credentials . dig ( :translation_api_client_key ) . presence
3535 config . source_locale = 'en'
3636 config . target_locales = CLIENT_LOCALES
3737 config . text_domain = 'client'
You can’t perform that action at this time.
0 commit comments