process_settings 0.19.4 → 0.20.0.pre.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/process_settings/helpers/watchdog.rb +1 -1
- data/lib/process_settings/target.rb +2 -0
- data/lib/process_settings/targeted_settings.rb +1 -1
- data/lib/process_settings/testing/helpers.rb +3 -9
- data/lib/process_settings/version.rb +1 -1
- data/lib/process_settings.rb +0 -1
- metadata +14 -8
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
|
|
@@ -14,7 +14,7 @@ module ProcessSettings
|
|
14
14
|
|
15
15
|
def check
|
16
16
|
if version_from_memory != version_from_disk && (Time.now - mtime_from_disk) > MAX_MTIME_DIFFERENCE
|
17
|
-
raise OutOfSync.new("ProcessSettings versions are out of sync!\n Version from Disk: #{version_from_disk}\n Version from Memory: #{version_from_memory}\n mtime of file: #{mtime_from_disk}")
|
17
|
+
raise ProcessSettings::OutOfSync.new("ProcessSettings versions are out of sync!\n Version from Disk: #{version_from_disk}\n Version from Memory: #{version_from_memory}\n mtime of file: #{mtime_from_disk}")
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
@@ -60,18 +60,12 @@ module ProcessSettings
|
|
60
60
|
|
61
61
|
class << self
|
62
62
|
def included(including_klass)
|
63
|
-
|
64
|
-
|
63
|
+
including_klass.define_method(:teardown) do
|
64
|
+
ProcessSettings.instance = initial_instance
|
65
|
+
end
|
65
66
|
end
|
66
67
|
end
|
67
68
|
end
|
68
|
-
|
69
|
-
module TeardownProcessSettings
|
70
|
-
def teardown
|
71
|
-
ProcessSettings.instance = initial_instance
|
72
|
-
super
|
73
|
-
end
|
74
|
-
end
|
75
69
|
end
|
76
70
|
|
77
71
|
Helpers = RSpec::Helpers # for backward-compatibility
|
data/lib/process_settings.rb
CHANGED
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
|
@@ -16,14 +16,20 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.2'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '7'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
29
|
+
version: '4.2'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '7'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: json
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,14 +62,14 @@ dependencies:
|
|
56
62
|
name: psych
|
57
63
|
requirement: !ruby/object:Gem::Requirement
|
58
64
|
requirements:
|
59
|
-
- - "
|
65
|
+
- - "~>"
|
60
66
|
- !ruby/object:Gem::Version
|
61
67
|
version: '3.2'
|
62
68
|
type: :runtime
|
63
69
|
prerelease: false
|
64
70
|
version_requirements: !ruby/object:Gem::Requirement
|
65
71
|
requirements:
|
66
|
-
- - "
|
72
|
+
- - "~>"
|
67
73
|
- !ruby/object:Gem::Version
|
68
74
|
version: '3.2'
|
69
75
|
description: Targeted process settings that dynamically reload without restarting
|
@@ -117,11 +123,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
117
123
|
version: '0'
|
118
124
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
125
|
requirements:
|
120
|
-
- - "
|
126
|
+
- - ">"
|
121
127
|
- !ruby/object:Gem::Version
|
122
|
-
version:
|
128
|
+
version: 1.3.1
|
123
129
|
requirements: []
|
124
|
-
rubygems_version: 3.3
|
130
|
+
rubygems_version: 3.0.3
|
125
131
|
signing_key:
|
126
132
|
specification_version: 4
|
127
133
|
summary: Dynamic process settings
|