cps-property-generator 0.3.4 → 0.3.7
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c9136a28b0b22964cfe78116a5baa2355f0d582336624a05ec0b1c37e1c96887
|
|
4
|
+
data.tar.gz: 1960f53fb08fd4911045072be3d85f7be78932b57fb6eb8593a0882c1fc70d8b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8b1f580b49c991ad93efc8fd64e60c8762cb5446d0566edeccb5f3916839db5f8db43219f46054056731287cc74f6b31607d535752812380f3569b892827bdf4
|
|
7
|
+
data.tar.gz: f863f63f20700d9767143d4a935ddf005a9547bff1d33cb31f2b0007b0871b6769dad6571d43708bd0b5e16378ca7b67a8750d220603953f72d4a7477cc416e5
|
data/lib/generator/globals.rb
CHANGED
|
@@ -73,6 +73,25 @@ module PropertyGenerator
|
|
|
73
73
|
end
|
|
74
74
|
end
|
|
75
75
|
|
|
76
|
+
# If there are no environmental globals and there are account globals we have to merge them in
|
|
77
|
+
if condensed.empty? && !account_globals.empty?
|
|
78
|
+
# assemble the account to env mapping
|
|
79
|
+
mapping = {}
|
|
80
|
+
|
|
81
|
+
@environment_configs.each do |env, vals|
|
|
82
|
+
account = vals["account"]
|
|
83
|
+
next if account.nil?
|
|
84
|
+
|
|
85
|
+
mapping[account] = Array(mapping[account]).push(env)
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
account_globals.each do |account, env_account|
|
|
89
|
+
mapping[account].each do |env|
|
|
90
|
+
condensed[env] = env_account
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
end
|
|
94
|
+
|
|
76
95
|
unless main_global.empty?
|
|
77
96
|
# All environments need the main global definitions
|
|
78
97
|
@environments.each do |env|
|
data/spec/lib/global_spec.rb
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
my_account: 987654321098
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cps-property-generator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bryan Call
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2023-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -30,14 +30,14 @@ dependencies:
|
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 1.
|
|
33
|
+
version: 1.117.2
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 1.
|
|
40
|
+
version: 1.117.2
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: terminal-table
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -162,6 +162,7 @@ files:
|
|
|
162
162
|
- spec/resources/config/config.yml
|
|
163
163
|
- spec/resources/globals/accounts/123456789012/123456789012.yml
|
|
164
164
|
- spec/resources/globals/accounts/123456789012/environments/my-test-env1.yml
|
|
165
|
+
- spec/resources/globals/accounts/987654321098/987654321098.yml
|
|
165
166
|
- spec/resources/globals/globals.yml
|
|
166
167
|
- spec/resources/services/my-microservice-1.yml
|
|
167
168
|
- spec/spec_helper.rb
|