dotenv-rails 2.2.2 → 2.3.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.
- checksums.yaml +4 -4
- data/README.md +20 -4
- data/lib/dotenv/rails.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d83f49b76de350ffcbd3268abba893a02683c69
|
4
|
+
data.tar.gz: 2b655495917094582c656405c616a418b23774a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: abe95749ea6a64a853b6c5baec51472fc9ab7aad4c0e4e71f596347aed80686c827b69f33c4f93bcb0d558c1fb494ed32046c79957e63234cd46df215ddf044e
|
7
|
+
data.tar.gz: 8ad9711fa9fa2b730743f7de3f5b0518681bb9a7b481fa5947a9eb31e63e8dc131ef2d55c9bddf6bc20fa08ac817996db7d966c54b4c0158485d79eae370f8b7
|
data/README.md
CHANGED
@@ -1,6 +1,4 @@
|
|
1
|
-
# dotenv [](https://travis-ci.org/bkeepers/dotenv)
|
2
|
-
|
3
|
-
[](https://gitter.im/bkeepers/dotenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
1
|
+
# dotenv [](https://travis-ci.org/bkeepers/dotenv) [](https://badge.fury.io/rb/dotenv) [](https://gitter.im/bkeepers/dotenv?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
4
2
|
|
5
3
|
Shim to load environment variables from `.env` into `ENV` in *development*.
|
6
4
|
|
@@ -75,6 +73,12 @@ Alternatively, you can use the `dotenv` executable to launch your application:
|
|
75
73
|
$ dotenv ./script.rb
|
76
74
|
```
|
77
75
|
|
76
|
+
The `dotenv` executable also accepts a single flag, `-f`. Its value should be a comma-separated list of configuration files, in the order of most important to least. All of the files must exist. There _must_ be a space between the flag and its value.
|
77
|
+
|
78
|
+
```
|
79
|
+
$ dotenv -f ".env.local,.env" ./script.rb
|
80
|
+
```
|
81
|
+
|
78
82
|
To ensure `.env` is loaded in rake, load the tasks:
|
79
83
|
|
80
84
|
```ruby
|
@@ -112,9 +116,21 @@ export SECRET_KEY=YOURSECRETKEYGOESHERE
|
|
112
116
|
If you need multiline variables, for example private keys, you can double quote strings and use the `\n` character for newlines:
|
113
117
|
|
114
118
|
```shell
|
115
|
-
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nHkVN9
|
119
|
+
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----\nHkVN9...\n-----END DSA PRIVATE KEY-----\n"
|
116
120
|
```
|
117
121
|
|
122
|
+
Alternatively, multi-line values with line breaks are now supported for quoted values.
|
123
|
+
|
124
|
+
```shell
|
125
|
+
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
|
126
|
+
...
|
127
|
+
HkVN9...
|
128
|
+
...
|
129
|
+
-----END DSA PRIVATE KEY-----"
|
130
|
+
```
|
131
|
+
|
132
|
+
This is particularly helpful when using the Heroku command line plugin [`heroku-config`](https://github.com/xavdid/heroku-config) to pull configuration variables down that may have line breaks.
|
133
|
+
|
118
134
|
### Command Substitution
|
119
135
|
|
120
136
|
You need to add the output of a command in one of your variables? Simply add it with `$(your_command)`:
|
data/lib/dotenv/rails.rb
CHANGED
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.
|
4
|
+
version: 2.3.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: 2018-04-
|
11
|
+
date: 2018-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dotenv
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.
|
19
|
+
version: 2.3.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.
|
26
|
+
version: 2.3.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.6.
|
93
|
+
rubygems_version: 2.6.11
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Autoload dotenv in Rails.
|