fedux_org-stdlib 0.8.10 → 0.8.11
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/fedux_org_stdlib/app_config.rb +9 -3
- data/lib/fedux_org_stdlib/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1e31a82df3298845b3873de282960a7db936423b
|
|
4
|
+
data.tar.gz: 65e33b51505ae347bc8c5078d376c6d723145d35
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cf8da3ab201f5f3f5853a038d91008d22a1a18fdbefd67cfeb7c1079cd168e220fa80c0e846ca6450a10d669563d9629745a652c60c3870629e0c63005cb52f8
|
|
7
|
+
data.tar.gz: 00b2e8d9a1867c94714452447a11289f317b785790e9a99d4f2a9f556e398c18d8b8451a0af38be09672dac3d13834023895b2794995b123429cf26531c38b62
|
data/Gemfile.lock
CHANGED
|
@@ -181,20 +181,22 @@ module FeduxOrgStdlib
|
|
|
181
181
|
# config_engine does not respond to `:[]` an empty config object will be
|
|
182
182
|
# created.
|
|
183
183
|
|
|
184
|
-
attr_reader :file, :logger, :config_engine, :check_unknown_options, :working_directory
|
|
184
|
+
attr_reader :file, :logger, :config_engine, :check_unknown_options, :working_directory, :safe
|
|
185
185
|
|
|
186
186
|
def initialize(
|
|
187
187
|
file: nil,
|
|
188
188
|
config_engine: Psych,
|
|
189
189
|
logger: FeduxOrgStdlib::Logging::Logger.new,
|
|
190
190
|
check_unknown_options: true,
|
|
191
|
-
working_directory: Dir.getwd
|
|
191
|
+
working_directory: Dir.getwd,
|
|
192
|
+
safe: true
|
|
192
193
|
)
|
|
193
194
|
@logger = logger
|
|
194
195
|
@file = file
|
|
195
196
|
@config_engine = config_engine
|
|
196
197
|
@check_unknown_options = check_unknown_options
|
|
197
198
|
@working_directory = working_directory
|
|
199
|
+
@safe = safe
|
|
198
200
|
|
|
199
201
|
detect_file unless @file
|
|
200
202
|
load_config
|
|
@@ -287,7 +289,11 @@ module FeduxOrgStdlib
|
|
|
287
289
|
end
|
|
288
290
|
|
|
289
291
|
begin
|
|
290
|
-
yaml =
|
|
292
|
+
yaml = if safe
|
|
293
|
+
config_engine.safe_load(File.read(file), [Symbol, Regexp])
|
|
294
|
+
else
|
|
295
|
+
config_engine.load(File.read(file))
|
|
296
|
+
end
|
|
291
297
|
rescue StandardError => e
|
|
292
298
|
raise Exceptions::ConfigFileNotReadable, JSON.dump(message: e.message, file: file)
|
|
293
299
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fedux_org-stdlib
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.8.
|
|
4
|
+
version: 0.8.11
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Max Meyer
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-10-
|
|
11
|
+
date: 2014-10-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|