service_skeleton 0.0.0.41.g9507cda → 0.0.0.43.g678698a
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/service_skeleton/config.rb +7 -3
- data/lib/service_skeleton/config_variable.rb +4 -0
- data/lib/service_skeleton/config_variable/url.rb +4 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b149de67b978a61b485db23c5c35adb077212835af64a44c6ea1a883501bfa40
|
4
|
+
data.tar.gz: 77bd9a46e93fb02b46bbe7c84b2664226fc06ca99a5266a228359ba83d7ea79e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1135ca4d0b40e80230fb11af004ccc0bd985ec7a032d9371f0bd7e356466c1ed720f696d202fb976a85b1353fecf7cb721fb704be65c7fd6f06cdd40cca7f62c
|
7
|
+
data.tar.gz: 3ae9fdb382bf5861743ff895ff4965401d98b9318234d4cdc5ed82410d315e5edd9d6cd2b53f22985b781646753192906735e71d13b81f3e10e18125f06907aa
|
data/README.md
CHANGED
@@ -533,7 +533,7 @@ signals will be hooked with the following behaviour:
|
|
533
533
|
* **`SIGHUP`** -- close and reopen the log file, if logging to a file on disk.
|
534
534
|
Because of the `ServiceSkeleton`'s default log rotation policy, this shouldn't
|
535
535
|
ordinarily be required, but if you've turned off the default log rotation,
|
536
|
-
you may need
|
536
|
+
you may need this.
|
537
537
|
|
538
538
|
* **`SIGQUIT`** -- dump a *whooooooole* lot of debugging information to
|
539
539
|
standard error, including memory allocation summaries and stack traces of all
|
@@ -45,9 +45,13 @@ class ServiceSkeleton
|
|
45
45
|
val = new_value
|
46
46
|
end
|
47
47
|
end.each do |var|
|
48
|
-
if var.redact
|
49
|
-
|
50
|
-
|
48
|
+
if var.redact?(env)
|
49
|
+
if env.object_id != ENV.object_id
|
50
|
+
raise ServiceSkeleton::Error::CannotSanitizeEnvironmentError,
|
51
|
+
"Attempted to sanitize sensitive variable #{var.name}, but we're not operating on the process' environment"
|
52
|
+
else
|
53
|
+
var.redact!(env)
|
54
|
+
end
|
51
55
|
end
|
52
56
|
end
|
53
57
|
end
|
@@ -3,6 +3,10 @@
|
|
3
3
|
require "service_skeleton/config_variable"
|
4
4
|
|
5
5
|
class ServiceSkeleton::ConfigVariable::URL < ServiceSkeleton::ConfigVariable
|
6
|
+
def redact?(env)
|
7
|
+
!!(env.has_key?(@name.to_s) && (@opts[:sensitive] || URI(env[@name.to_s] || "").password))
|
8
|
+
end
|
9
|
+
|
6
10
|
def redact!(env)
|
7
11
|
if env.has_key?(@name.to_s)
|
8
12
|
super
|
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.43.g678698a
|
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-
|
11
|
+
date: 2019-07-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: frankenstein
|
@@ -307,8 +307,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
307
307
|
- !ruby/object:Gem::Version
|
308
308
|
version: 1.3.1
|
309
309
|
requirements: []
|
310
|
-
|
311
|
-
rubygems_version: 2.7.6
|
310
|
+
rubygems_version: 3.0.1
|
312
311
|
signing_key:
|
313
312
|
specification_version: 4
|
314
313
|
summary: The bare bones of a service
|