process_settings 0.18.0 → 0.20.0.pre.1
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: b1badef60c71146241a061aebd1a5911d0780cd1eb2aa0b776f931eaab3d9b7d
|
4
|
+
data.tar.gz: 6b9b1d1b7fcb775b316fb8440e9e2786e9a597314fd4b25214620d594e862fbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92c9644c27ec9d38d1e9aeaf39dbaa8a8b20ea3bfd5c7f84e206db81b1b5bdc344e0effe8cf710b6971535b826b2cd98db9e2c3f58dc6e9cf38f3941e65d41d9
|
7
|
+
data.tar.gz: f29c738cc2f48ae0961e7794968c68b04f450cf1310139ebf76b933c0f25d205e95d7830f84370d833aa89586e659a64c31b39702670d90854327bd525544a18
|
data/README.md
CHANGED
@@ -164,6 +164,14 @@ target:
|
|
164
164
|
```
|
165
165
|
This will be applied in any process that has (`service_name == "frontend"` OR `service_name == "auth"`) AND `datacenter == "AWS-US-EAST-1"`.
|
166
166
|
|
167
|
+
### Regexp Targeting
|
168
|
+
To provide a regular expression for targeting, use the ruby regex keyword `!ruby/regexp` followed by your regular expression. For example:
|
169
|
+
```
|
170
|
+
target:
|
171
|
+
service_name: !ruby/regexp /frontend-\d/
|
172
|
+
```
|
173
|
+
This will be applied in any process that has `service_name` that has `frontend-` followed with a number. As an example this will match `"frontend-1"`
|
174
|
+
|
167
175
|
### Precedence
|
168
176
|
The settings YAML files are always combined in alphabetical order by file path. Later settings take precedence over the earlier ones.
|
169
177
|
|
@@ -114,7 +114,11 @@ module ProcessSettings
|
|
114
114
|
# find last value from matching targets
|
115
115
|
if target_and_settings.target.target_key_matches?(full_context)
|
116
116
|
if (value = target_and_settings.settings.json_doc.mine(*path, not_found_value: :not_found)) != :not_found
|
117
|
-
latest_result = value
|
117
|
+
latest_result = if latest_result.is_a?(Hash) && value.is_a?(Hash)
|
118
|
+
latest_result.deep_merge(value)
|
119
|
+
else
|
120
|
+
value
|
121
|
+
end
|
118
122
|
end
|
119
123
|
end
|
120
124
|
latest_result
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: process_settings
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.20.0.pre.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca
|
@@ -123,9 +123,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
123
123
|
version: '0'
|
124
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- - "
|
126
|
+
- - ">"
|
127
127
|
- !ruby/object:Gem::Version
|
128
|
-
version:
|
128
|
+
version: 1.3.1
|
129
129
|
requirements: []
|
130
130
|
rubygems_version: 3.0.3
|
131
131
|
signing_key:
|