Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Env class to access environmental variables and encrypted credentials.
- Loading branch information
Cong
committed
Dec 17, 2018
1 parent
3b900b5
commit 3886827
Showing
6 changed files
with
90 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| m7OMHqBx4GYQefvvNsCarRdeTk+nA+8YY6mZzFFXkxuQDMxvkeXwi3PagNlpX0JJsU/Bm+o7NtffZamPXVvCV+ZGeJ7mC+fY+IUZBMmuVAQfHWiGjCMKCe2j2veYzNbA59VBijYjHEppmkAu1fkMqigaqgO7eOpxZ8+hd23KFOlhGC5hOR5EjM6DUvn0dcJ8pk5Ny4uMeZdgVp5kp3b01dIpzXJygxDmtWsW/myeVoQfRLE=--Ly3MeODgN7+R63Se--nLrWbxLLIb9vWCjepKP4Ow== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,2 @@ | ||
| # Be sure to restart your server when you modify this file. | ||
|
|
||
| # Your secret key is used for verifying the integrity of signed cookies. | ||
| # If you change this key, all old signed cookies will become invalid! | ||
|
|
||
| # Make sure the secret is at least 30 characters and all random, | ||
| # no regular words or you'll be exposed to dictionary attacks. | ||
| # You can use `rails secret` to generate a secure secret key. | ||
|
|
||
| # Make sure the secrets in this file are kept private | ||
| # if you're sharing your code publicly. | ||
|
|
||
| # Shared secrets are available across all environments. | ||
|
|
||
| # shared: | ||
| # api_key: a1B2c3D4e5F6 | ||
|
|
||
| # Environmental secrets are only available for that specific environment. | ||
|
|
||
| development: | ||
| secret_key_base: cbb78dd13c270bbbd6c89ff53db9fc84415f1de1140807ba85533681e4eca07bac26ad13261424727153a55b1b866a391c1f6a37514b4f88e5151b413c475185 | ||
|
|
||
| test: | ||
| secret_key_base: 59aca2974ed5895fecbe65040b73dc38cde25af858e2be1fd6a2641302f174af5e674723d11150d6c63ebdedcb9e2c0cfcf6087f6d1ac2abc2e8dd282deba3f3 | ||
|
|
||
| # Do not keep production secrets in the unencrypted secrets file. | ||
| # Instead, either read values from the environment. | ||
| # Or, use `bin/rails secrets:setup` to configure encrypted secrets | ||
| # and move the `production:` environment over there. | ||
|
|
||
| production: | ||
| secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> | ||
| # secret_key_base are automagically created for development and test envs, | ||
| # while the one for production should be defined in config/credentials.yml.enc |