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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +20 -4
  3. data/lib/dotenv/rails.rb +1 -1
  4. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 465d0442e5bb82567680e366c8c93abb9d3f69c3
4
- data.tar.gz: 264c05dcc21602519b4f7745c2666f67d5e90530
3
+ metadata.gz: 2d83f49b76de350ffcbd3268abba893a02683c69
4
+ data.tar.gz: 2b655495917094582c656405c616a418b23774a5
5
5
  SHA512:
6
- metadata.gz: 42be446d13b162d4a17edb39e0495d95daaa418ebb331e04a461b0ae4b1216658d8b1b8a8117ad9e5e6bf3f6f2b5da132c6facb447cad2aba87fc831b5adcf8f
7
- data.tar.gz: 3067ff1c442e7bdea582f8f21c7ede3a69e1317892a82575a4cc3a01cc11a9bf2f1b6e5e4fb5e41527bf3ee601b00a41aa2c7db4d8a210b192f2959d5dfde4dd
6
+ metadata.gz: abe95749ea6a64a853b6c5baec51472fc9ab7aad4c0e4e71f596347aed80686c827b69f33c4f93bcb0d558c1fb494ed32046c79957e63234cd46df215ddf044e
7
+ data.tar.gz: 8ad9711fa9fa2b730743f7de3f5b0518681bb9a7b481fa5947a9eb31e63e8dc131ef2d55c9bddf6bc20fa08ac817996db7d966c54b4c0158485d79eae370f8b7
data/README.md CHANGED
@@ -1,6 +1,4 @@
1
- # dotenv [![Build Status](https://secure.travis-ci.org/bkeepers/dotenv.png?branch=master)](https://travis-ci.org/bkeepers/dotenv)
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)
1
+ # dotenv [![Build Status](https://secure.travis-ci.org/bkeepers/dotenv.png?branch=master)](https://travis-ci.org/bkeepers/dotenv) [![Gem Version](https://badge.fury.io/rb/dotenv.svg)](https://badge.fury.io/rb/dotenv) [![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
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…\n-----END DSA PRIVATE KEY-----\n"
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)`:
@@ -22,7 +22,7 @@ begin
22
22
  event = ActiveSupport::Notifications::Event.new(*args)
23
23
  Spring.watch event.payload[:env].filename if Rails.application
24
24
  end
25
- rescue LoadError
25
+ rescue LoadError, ArgumentError
26
26
  # Spring is not available
27
27
  end
28
28
 
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.2.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-09 00:00:00.000000000 Z
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.2.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.2.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.8
93
+ rubygems_version: 2.6.11
94
94
  signing_key:
95
95
  specification_version: 4
96
96
  summary: Autoload dotenv in Rails.