env_setup 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/env_setup +0 -2
- data/lib/env_setup/configuration.rb +1 -1
- data/lib/env_setup/version.rb +1 -1
- data/spec/env_setup/env_builder_spec.rb +2 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9c41acc02b85485891e7ac909d0711f650200c8cf8848840b78554b558f171d7
|
4
|
+
data.tar.gz: e12dd5cd3edaab85dad74a0c1ca3472ea750c2c7c1a84ca0fd7d37e70d241875
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cf9f31c65b9dbbe098f1a5477f7d8ab4011be7ead7e7020fe8f2e96f1ecea8c83985b2d5bb4bdc2b6a3253238e3a5adf40ff199405866a5e37377652ce7a560
|
7
|
+
data.tar.gz: 7220349ce399a398023b5c4e78fe949d81a4664c36f6cdfc4a641f38de23fe115fd52682433629f122e2217233330f6a9bc9403388b9457a0498a174fdd23081
|
data/bin/env_setup
CHANGED
@@ -12,11 +12,9 @@ aws_secret_access_key = inputs.delete('AWS_SECRET_ACCESS_KEY')
|
|
12
12
|
aws_region = inputs.delete('AWS_REGION')
|
13
13
|
aws_secret_name = inputs.delete('AWS_SECRET_NAME')
|
14
14
|
generate_env_file = inputs.key?('GENERATE_ENV_FILE')
|
15
|
-
env_name = inputs.delete('ENV_NAME')
|
16
15
|
|
17
16
|
EnvSetup.configure do |config|
|
18
17
|
config.template = template
|
19
|
-
config.env_name = env_name
|
20
18
|
config.aws_access_key = aws_access_key
|
21
19
|
config.aws_secret_access_key = aws_secret_access_key
|
22
20
|
config.aws_region = aws_region
|
data/lib/env_setup/version.rb
CHANGED
@@ -4,7 +4,6 @@ require 'env_setup/env_builder'
|
|
4
4
|
|
5
5
|
RSpec.describe EnvSetup::EnvBuilder do
|
6
6
|
describe '.build_json' do
|
7
|
-
let(:env_name) { 'PR-12345' }
|
8
7
|
let(:secret) { SecureRandom.hex }
|
9
8
|
let(:salt) { SecureRandom.hex(2) }
|
10
9
|
let(:template) do
|
@@ -37,7 +36,7 @@ RSpec.describe EnvSetup::EnvBuilder do
|
|
37
36
|
|
38
37
|
context 'with aws secrets manager' do
|
39
38
|
let(:inputs) do
|
40
|
-
{ 'INTEGRATION_APP_HOST' => 'https://integrate.foobar2.com' }
|
39
|
+
{ 'INTEGRATION_APP_HOST' => 'https://integrate.foobar2.com', 'ENV_NAME' => 'PR-12345' }
|
41
40
|
end
|
42
41
|
let(:expected_json) do
|
43
42
|
{
|
@@ -60,7 +59,6 @@ RSpec.describe EnvSetup::EnvBuilder do
|
|
60
59
|
|
61
60
|
allow(EnvSetup).to receive(:configuration).and_return(
|
62
61
|
EnvSetup::Configuration.new.tap do |config|
|
63
|
-
config.env_name = env_name
|
64
62
|
config.template = template
|
65
63
|
config.aws_access_key = 'aws_access_key'
|
66
64
|
config.aws_secret_access_key = 'aws_secret_access_key'
|
@@ -104,7 +102,6 @@ RSpec.describe EnvSetup::EnvBuilder do
|
|
104
102
|
|
105
103
|
allow(EnvSetup).to receive(:configuration).and_return(
|
106
104
|
EnvSetup::Configuration.new.tap do |config|
|
107
|
-
config.env_name = env_name
|
108
105
|
config.template = template
|
109
106
|
end
|
110
107
|
)
|
@@ -117,15 +114,13 @@ RSpec.describe EnvSetup::EnvBuilder do
|
|
117
114
|
end
|
118
115
|
|
119
116
|
describe '.build_var' do
|
120
|
-
let(:inputs) { { 'MY_VAR' => 'Hey!', 'FOO' => 'bar' } }
|
121
|
-
let(:env_name) { 'env-test' }
|
117
|
+
let(:inputs) { { 'MY_VAR' => 'Hey!', 'FOO' => 'bar', 'ENV_NAME' => 'env-test' } }
|
122
118
|
let(:template) { {} }
|
123
119
|
let(:builder) { described_class.new(inputs) }
|
124
120
|
|
125
121
|
before do
|
126
122
|
EnvSetup.configure do |config|
|
127
123
|
config.template = template
|
128
|
-
config.env_name = env_name
|
129
124
|
end
|
130
125
|
end
|
131
126
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: env_setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonatas Daniel Hermann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|