fedux_org-stdlib 0.6.8 → 0.6.9
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/lib/fedux_org_stdlib/app_config.rb +14 -6
- data/lib/fedux_org_stdlib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0aa2f8b38c1f62b5fc3ac9d97b62e1c3e3984071
|
|
4
|
+
data.tar.gz: b9aaf7235af3e24b8af10cfe96d61acc95eec9eb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c3d52336360c95d7b2ebf4a6317407a4411a288b2990e1ad27aea57c9cb3cafe68862bfd4f0e7b665d2535528ac198e376aebc9cc81f8513244deed673669338
|
|
7
|
+
data.tar.gz: f05d62f2f49946df8a372618511818bc8abf376df53c29ec1fd3021ab5921fbe57a7f2c0de6be5faca311148cad32e7d957d47ec70960e95b3d3afd9917e51fc
|
|
@@ -3,6 +3,7 @@ require 'fedux_org_stdlib/require_files'
|
|
|
3
3
|
require 'fedux_org_stdlib/app_config/exceptions'
|
|
4
4
|
require 'fedux_org_stdlib/process_environment'
|
|
5
5
|
require 'fedux_org_stdlib/core_ext/array'
|
|
6
|
+
require 'fedux_org_stdlib/logging/logger'
|
|
6
7
|
require_library %w{ json psych active_support/core_ext/string/inflections thread set active_support/hash_with_indifferent_access }
|
|
7
8
|
|
|
8
9
|
module FeduxOrgStdlib
|
|
@@ -74,8 +75,15 @@ module FeduxOrgStdlib
|
|
|
74
75
|
@options ||= Set.new
|
|
75
76
|
end
|
|
76
77
|
|
|
77
|
-
#
|
|
78
|
-
|
|
78
|
+
# Get access to process environment
|
|
79
|
+
#
|
|
80
|
+
# This might be handy to define default options
|
|
81
|
+
#
|
|
82
|
+
# @example Get variable
|
|
83
|
+
#
|
|
84
|
+
# process_environment.fetch('HOME')
|
|
85
|
+
# # => ENV['HOME']
|
|
86
|
+
def process_environment
|
|
79
87
|
@process_environment ||= ProcessEnvironment.new
|
|
80
88
|
end
|
|
81
89
|
|
|
@@ -279,10 +287,10 @@ module FeduxOrgStdlib
|
|
|
279
287
|
# file.
|
|
280
288
|
def _allowed_config_file_paths
|
|
281
289
|
[
|
|
282
|
-
::File.expand_path(::File.join(self.class.
|
|
283
|
-
::File.expand_path(::File.join(self.class.
|
|
284
|
-
::File.expand_path(::File.join(self.class.
|
|
285
|
-
::File.expand_path(::File.join(self.class.
|
|
290
|
+
::File.expand_path(::File.join(self.class.process_environment.fetch('HOME'), '.config', _application_name, _config_file)),
|
|
291
|
+
::File.expand_path(::File.join(self.class.process_environment.fetch('HOME'), format('.%s', _application_name), _config_file)),
|
|
292
|
+
::File.expand_path(::File.join(self.class.process_environment.fetch('HOME'), format('.%s', _config_file))),
|
|
293
|
+
::File.expand_path(::File.join(self.class.process_environment.fetch('HOME'), format('.%src', _config_name))),
|
|
286
294
|
::File.expand_path(::File.join('/etc', _application_name, _config_file)),
|
|
287
295
|
# ::File.expand_path("../../../../files/#{config_file}", __FILE__),
|
|
288
296
|
]
|