dotenv-rails 2.0.2 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +7 -2
  3. metadata +13 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 43e517e24d553d68a3608a70f7d2962cfd423174
4
- data.tar.gz: 25e19926c46e40e04f1f914d38b4e6da45fed71a
3
+ metadata.gz: 464e9c021f470a45e9bd8a38ac9bf351a45d4241
4
+ data.tar.gz: edd0ee2c6d46c8b000cfcc659477d84606e6dba7
5
5
  SHA512:
6
- metadata.gz: 7032e95f28e9174b55f0adec02773945a32ff0cb4bc421c3d00922c08b4bd5c6c1a8da5e9f732b6186f2a8f22f7a922e18b914baf01e9508ebcfe161df2091e6
7
- data.tar.gz: ef12c5287f99446517ef5d71c378ea1345c0fc854fd28f12d5c17cb00adb8fe9cbfac84eed1db4f1224e384071febca9c66dd23feb1fffb3ab45f418647125ae
6
+ metadata.gz: b0f43fdcf6c01f2619c86fc6dd27e73aa5a79fd462a5be05eb6443976e79cb5a15d0c617a8c7c354c805b681156b46ea447f74bdc3d35cb4a1c49995c80df233
7
+ data.tar.gz: 706f7a36681dc279ef7c5876b7c3b1d01ca2850c730c24abb1fa9a6ad645292965c3fb74a7b9a4591c0a187425898b2dbe7f0de0bec9cc1b240c66324a2c3425
data/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Shim to load environment variables from `.env` into `ENV` in *development*.
6
6
 
7
- Storing [configuration in the environment](http://www.12factor.net/config) is one of the tenets of a [twelve-factor app](http://www.12factor.net/). Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables.
7
+ Storing [configuration in the environment](http://12factor.net/config) is one of the tenets of a [twelve-factor app](http://12factor.net). Anything that is likely to change between deployment environments–such as resource handles for databases or credentials for external services–should be extracted from the code into environment variables.
8
8
 
9
9
  But it is not always practical to set environment variables on development machines or continuous integration servers where multiple projects are run. dotenv loads variables from a `.env` file into `ENV` when the environment is bootstrapped.
10
10
 
@@ -90,6 +90,11 @@ If you need multiline variables, for example private keys, you can double quote
90
90
  PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nHkVN9…\n-----END DSA PRIVATE KEY-----\n"
91
91
  ```
92
92
 
93
+ You need to add the output of a command in one of your variables? Simply add it with `$(your_command)`:
94
+ ```shell
95
+ DATABASE_URL="postgres://$(whoami)@localhost/my_database"
96
+ ```
97
+
93
98
  You may also add `export` in front of each line so you can `source` the file in bash:
94
99
 
95
100
  ```shell
@@ -115,7 +120,7 @@ Variable names may not contain the `#` symbol. Values can use the `#` if they ar
115
120
 
116
121
  ## Multiple Rails Environments
117
122
 
118
- dotenv was originally created to load configuration variables into `ENV` in *development*. There are typically better ways to manage configuration in production environments - such as `/etc/environment` managed by [Puppet](https://github.com/puppetlabs/puppet) or [Chef](https://github.com/opscode/chef), `heroku config`, etc.
123
+ dotenv was originally created to load configuration variables into `ENV` in *development*. There are typically better ways to manage configuration in production environments - such as `/etc/environment` managed by [Puppet](https://github.com/puppetlabs/puppet) or [Chef](https://github.com/chef/chef), `heroku config`, etc.
119
124
 
120
125
  However, some find dotenv to be a convenient way to configure Rails applications in staging and production environments, and you can do that by defining environment-specific files like `.env.production` or `.env.test`.
121
126
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotenv-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Keepers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -16,28 +16,34 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.2
19
+ version: 2.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.0.2
26
+ version: 2.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '5.1'
34
37
  type: :runtime
35
38
  prerelease: false
36
39
  version_requirements: !ruby/object:Gem::Requirement
37
40
  requirements:
38
- - - "~>"
41
+ - - ">="
39
42
  - !ruby/object:Gem::Version
40
43
  version: '4.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.1'
41
47
  - !ruby/object:Gem::Dependency
42
48
  name: spring
43
49
  requirement: !ruby/object:Gem::Requirement
@@ -84,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
90
  version: '0'
85
91
  requirements: []
86
92
  rubyforge_project:
87
- rubygems_version: 2.2.3
93
+ rubygems_version: 2.4.5.1
88
94
  signing_key:
89
95
  specification_version: 4
90
96
  summary: Autoload dotenv in Rails.