psenv 0.6.0 → 0.7.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3d732258f7fdb38b72751e02f404b2302b06e8723fa2942a31993452de907046
4
- data.tar.gz: 4fe9cdaddf7fc6c00d48b036055e405b2a31bf2ae2f8a92ea09c5dcf090254dd
3
+ metadata.gz: 2e6f6e324f5fb5e43f03fb3a10601febdb86b6fa28e587d53020183cd11f7c30
4
+ data.tar.gz: 0c959dfda622169f797f3839bd116c38c753a5aa9cc9b4285cd76f99130e2907
5
5
  SHA512:
6
- metadata.gz: 0ec89797ab460fe4a2294a25279b1a93f9b77d51a746b017065b6076c60bffee2330d18dac7de331407f19d8467d0aad4c1d87b282f53348e69818c3b2e5a6d1
7
- data.tar.gz: 23ed32cf7985c5d76a0962f36191652f1aa93d36d45a8b5c61060a7871fee7aa6056d8889f175b74c0a6c4b9db87949931e076a88d5b50ce9575ffd802ebedad
6
+ metadata.gz: df5a00bb92ff974c9a8d37794a01934ecba3b5a33f5df25d9cd536513a014b023325e2ae3348435d8fcbee6f3d2b8c713420d8ccd6b35faa51fc26fb5d56d5d5
7
+ data.tar.gz: c460933a6b7573aa251be6f78b7568a181676b3aae183421106f5e495c7592b4bed9d17d5cd6f85effa4a0ffefafb3a0aef5d416d929c55fadf90ad95947aeea
@@ -13,7 +13,7 @@ jobs:
13
13
  ruby-version: 2.6.x
14
14
  - name: Build and test with Rake
15
15
  run: |
16
- gem install bundler -v 1.16
16
+ gem install bundler
17
17
  bundle install --jobs 4 --retry 3
18
18
  bundle exec rubocop
19
19
 
@@ -21,7 +21,7 @@ jobs:
21
21
  runs-on: ubuntu-latest
22
22
  strategy:
23
23
  matrix:
24
- ruby_version: [2.4.x, 2.5.x, 2.6.x]
24
+ ruby_version: [2.4.x, 2.5.x, 2.6.x, 2.7.x]
25
25
 
26
26
  steps:
27
27
  - uses: actions/checkout@v1
@@ -31,6 +31,26 @@ jobs:
31
31
  ruby-version: ${{ matrix.ruby_version }}
32
32
  - name: Build and test with Rake
33
33
  run: |
34
- gem install bundler -v 1.16
34
+ gem install bundler
35
35
  bundle install --jobs 4 --retry 3
36
36
  bundle exec rspec
37
+
38
+ rails:
39
+ runs-on: ubuntu-latest
40
+ steps:
41
+ - uses: actions/checkout@v1
42
+ - name: Set up Ruby 2.6
43
+ uses: actions/setup-ruby@v1
44
+ with:
45
+ ruby-version: 2.6.x
46
+ - name: Test gem in Rails application
47
+ run: |
48
+ cd spec/rails
49
+ gem install bundler
50
+ bundle install --jobs 4 --retry 3
51
+ bundle exec rails test
52
+ env:
53
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
54
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
55
+ AWS_DEFAULT_REGION: us-east-2
56
+ PARAMETER_STORE_PATH: /psenv/test/
@@ -2,6 +2,7 @@ AllCops:
2
2
  Exclude:
3
3
  - db/schema.rb
4
4
  - vendor/**/*
5
+ - spec/rails/**/*
5
6
 
6
7
  Metrics/LineLength:
7
8
  Description: 'Limit lines to 80 characters.'
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 since for the APIs to match.
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:
@@ -1,3 +1,3 @@
1
1
  module Psenv
2
- VERSION = "0.6.0".freeze
2
+ VERSION = "0.7.0".freeze
3
3
  end
@@ -20,7 +20,6 @@ Gem::Specification.new do |spec|
20
20
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
21
  spec.require_paths = ["lib"]
22
22
 
23
- spec.add_development_dependency "bundler", "~> 1.16"
24
23
  spec.add_development_dependency "pry"
25
24
  spec.add_development_dependency "rake", "~> 10.0"
26
25
  spec.add_development_dependency "rspec", "~> 3.0"
metadata CHANGED
@@ -1,29 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: psenv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.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: 2019-10-05 00:00:00.000000000 Z
11
+ date: 2020-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: bundler
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '1.16'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '1.16'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: pry
29
15
  requirement: !ruby/object:Gem::Requirement
@@ -119,7 +105,6 @@ files:
119
105
  - ".gitignore"
120
106
  - ".rspec"
121
107
  - ".rubocop.yml"
122
- - ".travis.yml"
123
108
  - Gemfile
124
109
  - LICENSE.txt
125
110
  - README.md
@@ -1,22 +0,0 @@
1
- sudo: false
2
- cache: bundler
3
- language: ruby
4
- rvm:
5
- - 2.6
6
- - 2.5
7
- - 2.4
8
- - 2.3
9
- before_install: gem install bundler -v 1.16.1
10
-
11
- stages:
12
- - analyze
13
- - test
14
- - deploy
15
-
16
- jobs:
17
- include:
18
- - stage: test
19
- script: bundle exec rspec
20
- - stage: analyze
21
- script: bundle exec rubocop
22
- rvm: 2.5