dotenv-rails 2.0.0 → 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 +12 -3
  3. metadata +20 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f0d712ccf911d9509175afbdc7b050eb45a9f1d3
4
- data.tar.gz: 5e9c1e0befc03daa04850860a945162cf753f653
3
+ metadata.gz: 464e9c021f470a45e9bd8a38ac9bf351a45d4241
4
+ data.tar.gz: edd0ee2c6d46c8b000cfcc659477d84606e6dba7
5
5
  SHA512:
6
- metadata.gz: 35d6c21fd8cfef23adbb4998431c98e35507cff2db58fb023aef212f371f5644dbd9d46fde5bdb69e0ea2b9fa7e3617dfa369d491c6edfdaf40d1cf9aa84ea9f
7
- data.tar.gz: 1a3a8eb1d9e4f63f5e7f273446e5fa1cde7779d8433d686af4c577b104b7fa18184613c05b0dddef9075f997c470c3ee1f0153b7bc69f2839911c77b24d19f8e
6
+ metadata.gz: b0f43fdcf6c01f2619c86fc6dd27e73aa5a79fd462a5be05eb6443976e79cb5a15d0c617a8c7c354c805b681156b46ea447f74bdc3d35cb4a1c49995c80df233
7
+ data.tar.gz: 706f7a36681dc279ef7c5876b7c3b1d01ca2850c730c24abb1fa9a6ad645292965c3fb74a7b9a4591c0a187425898b2dbe7f0de0bec9cc1b240c66324a2c3425
data/README.md CHANGED
@@ -1,8 +1,10 @@
1
1
  # dotenv [![Build Status](https://secure.travis-ci.org/bkeepers/dotenv.png?branch=master)](https://travis-ci.org/bkeepers/dotenv)
2
2
 
3
+ [![Join the chat at https://gitter.im/bkeepers/dotenv](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/bkeepers/dotenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4
+
3
5
  Shim to load environment variables from `.env` into `ENV` in *development*.
4
6
 
5
- 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.
6
8
 
7
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.
8
10
 
@@ -88,6 +90,11 @@ If you need multiline variables, for example private keys, you can double quote
88
90
  PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nHkVN9…\n-----END DSA PRIVATE KEY-----\n"
89
91
  ```
90
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
+
91
98
  You may also add `export` in front of each line so you can `source` the file in bash:
92
99
 
93
100
  ```shell
@@ -113,11 +120,13 @@ Variable names may not contain the `#` symbol. Values can use the `#` if they ar
113
120
 
114
121
  ## Multiple Rails Environments
115
122
 
116
- 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.
117
124
 
118
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`.
119
126
 
120
- You can also `.env.local` for local overrides.
127
+ You can also use `.env.local` for local overrides.
128
+
129
+ If you use this gem to handle env vars for multiple Rails environments (development, test, production, etc.), please note that env vars that are general to all environments should be stored in `.env`. Then, environment specific env vars should be stored in `.env.<that environment's name>`. When you load a certain environment, dotenv will first load general env vars from `.env`, then load environment specific env vars from `.env.<current environment>`. Variables defined in `.env.<current environment>` will override any values set in `.env` or already defined in the environment.
121
130
 
122
131
  ## Should I commit my .env file?
123
132
 
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.0
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-03-05 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,42 +16,48 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.0.0
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.0
26
+ version: 2.1.0
27
27
  - !ruby/object:Gem::Dependency
28
- name: spring
28
+ name: railties
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
33
+ version: '4.0'
34
+ - - "<"
35
+ - !ruby/object:Gem::Version
36
+ version: '5.1'
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
- version: '0'
43
+ version: '4.0'
44
+ - - "<"
45
+ - !ruby/object:Gem::Version
46
+ version: '5.1'
41
47
  - !ruby/object:Gem::Dependency
42
- name: railties
48
+ name: spring
43
49
  requirement: !ruby/object:Gem::Requirement
44
50
  requirements:
45
- - - "~>"
51
+ - - ">="
46
52
  - !ruby/object:Gem::Version
47
- version: '4.0'
53
+ version: '0'
48
54
  type: :development
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
51
57
  requirements:
52
- - - "~>"
58
+ - - ">="
53
59
  - !ruby/object:Gem::Version
54
- version: '4.0'
60
+ version: '0'
55
61
  description: Autoload dotenv in Rails.
56
62
  email:
57
63
  - brandon@opensoul.org
@@ -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.2
93
+ rubygems_version: 2.4.5.1
88
94
  signing_key:
89
95
  specification_version: 4
90
96
  summary: Autoload dotenv in Rails.