psenv-rails 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd9531475dbf9f49d9e90167d2e51402469d398c81045cfc04ecc665df52b4d4
|
4
|
+
data.tar.gz: ab62bc68e827c58ef09d31eb79ebcc35ac4b048539792dd6971ef5c07165e6ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 49de90719c38a2d686219fbfbd4f035fa4ca85e625ee32ba19973914bb6491929a202211fbf165b29251052b789e98a3f91ddbeacfacf41e5fc3bff1f7573e30
|
7
|
+
data.tar.gz: 374f5d20beeb8046a6259126a5a96e5cf8edca8c95989b492d1097281c1f01bfbe0a7cd8e306b792dd31f262b62995b2b8f06558d738f4450e323ffa8b96d3c5
|
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Shim to load environment variables from [AWS Systems Manager Parameter Store](https://aws.amazon.com/systems-manager/features/#Parameter_Store) into ENV.
|
6
6
|
|
7
|
-
Psenv currently heavily borrows from [Dotenv](https://github.com/bkeepers/dotenv), mainly because I use it in roughly every project so it made
|
7
|
+
Psenv currently heavily borrows from [Dotenv](https://github.com/bkeepers/dotenv), mainly because I use it in roughly every project so it made sense for the APIs to match.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -23,6 +23,26 @@ And then execute:
|
|
23
23
|
Set the `PARAMETER_STORE_PATH` environment variable with the AWS Parameter
|
24
24
|
Store path that you wish to load.
|
25
25
|
|
26
|
+
#### Spring preloader
|
27
|
+
|
28
|
+
The Spring preloader does not detect environment variable changes as
|
29
|
+
application changes. This means that when using Spring, new or changed
|
30
|
+
environment variables from AWS SSM Parameter Store will not become available
|
31
|
+
immediately. This also applies to any change to `PARAMETER_STORE_PATH`.
|
32
|
+
|
33
|
+
There are two work-arounds. You can force Spring to restart by killing it with
|
34
|
+
`bundle exec spring stop`.
|
35
|
+
|
36
|
+
Alternatively, you can update your Spring configuration to reload variables
|
37
|
+
using Psenv after the process forks. To do this, add the following configuration
|
38
|
+
to `config/spring.rb`:
|
39
|
+
|
40
|
+
```
|
41
|
+
Spring.after_fork do
|
42
|
+
Psenv.load
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
26
46
|
### Plain Ruby
|
27
47
|
|
28
48
|
Add this line to your application's Gemfile:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: psenv-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Tomaka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: psenv
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.7.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: 0.
|
26
|
+
version: 0.7.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: railties
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|