service_skeleton 0.0.0.43.g678698a → 0.0.0.44.g75d07d7
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bbea89beb2900ccc763828c402cfaae7de09db281f8d57b98097c01a6c7df6e
|
4
|
+
data.tar.gz: c9183e6664e418a8521b7c53dff392b7b34c7e6cb9f1ae0d276f10de11138769
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1febde7fe3cdacc40c9992358150407353970dfb0c54623f1a8cabb2b6c12d2817558e838cb8e9b425b5cb548bf88b1240d6c4c970cbb0f9e44817e6794b3557
|
7
|
+
data.tar.gz: 89b9aab32e137c34ac5022bd35f801d96b711cf54d978390c8a2813a37a9c3823c9809239fd2c52a6f815b58191d5f5c870c8d10da3732cdbf4e996d14b38f29
|
@@ -7,7 +7,12 @@ class ServiceSkeleton::ConfigVariable::String < ServiceSkeleton::ConfigVariable
|
|
7
7
|
|
8
8
|
def pluck_value(env)
|
9
9
|
maybe_default(env) do
|
10
|
-
env[@name.to_s]
|
10
|
+
env[@name.to_s].tap do |s|
|
11
|
+
if @opts[:match] && s !~ @opts[:match]
|
12
|
+
raise ServiceSkeleton::Error::InvalidEnvironmentError,
|
13
|
+
"Value for #{@name} must match #{@opts[:match]}"
|
14
|
+
end
|
15
|
+
end
|
11
16
|
end
|
12
17
|
end
|
13
18
|
end
|
@@ -25,8 +25,8 @@ class ServiceSkeleton
|
|
25
25
|
}
|
26
26
|
end
|
27
27
|
|
28
|
-
def string(var_name, default: UNDEFINED, sensitive: false)
|
29
|
-
register_variable(var_name, ConfigVariable::String, default: default, sensitive: sensitive)
|
28
|
+
def string(var_name, default: UNDEFINED, sensitive: false, match: nil)
|
29
|
+
register_variable(var_name, ConfigVariable::String, default: default, sensitive: sensitive, match: match)
|
30
30
|
end
|
31
31
|
|
32
32
|
def boolean(var_name, default: UNDEFINED, sensitive: false)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: service_skeleton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.0.
|
4
|
+
version: 0.0.0.44.g75d07d7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Palmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-07-
|
11
|
+
date: 2019-07-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: frankenstein
|