cfgstore 2.2.9 → 2.2.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/app-config.rb +4 -3
- data/lib/app-logger.rb +1 -0
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9afa3c297ef2acd7881ecc79e6d100800f7e24808d424a6508192f57864d71f2
|
4
|
+
data.tar.gz: 6a08b28f077e8573b2feb39e7fe65b7b7e1c4d67198892de4662ce030849028b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db9c7ac2a3d97cc8b3c142e0137e9a33e2f78223c9af19415f97830e273cc2e2aadede6288e320bd86ecb78c45f4d540422b6d480c93ee5c9004acfd039ee800
|
7
|
+
data.tar.gz: 84f624f89a8c330842203e8790d45039304c5760da858642b7e02a04a3b83347d51dcb96b082c2b08f03407e2e690af597beadd101fd90b5bef231c429a9f556
|
data/lib/app-config.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'singleton'
|
3
3
|
require 'pathname'
|
4
|
+
require 'yaml_extend'
|
4
5
|
require 'monkey-hash'
|
5
6
|
|
6
7
|
module App
|
@@ -30,7 +31,7 @@ module App
|
|
30
31
|
# raise ArgumentError.new("Не найден #{ amqp_routesfile }!") unless File.exist?( amqp_routesfile )
|
31
32
|
# Кто первый встал, того и тапки.
|
32
33
|
Kernel.const_set('Cfg', config)
|
33
|
-
config.merge!( YAML.
|
34
|
+
config.merge!( YAML.ext_load_file( configfile ).keys_to_symbols ) rescue nil
|
34
35
|
$0 += "[ #{ config.app.id } ]" if config.app? && config.app.id?
|
35
36
|
config[ :app ] ||= { id: $0 }
|
36
37
|
config.app[ :log ] ||= ENV['APP_LOG']
|
@@ -39,8 +40,8 @@ module App
|
|
39
40
|
root: root,
|
40
41
|
env: env,
|
41
42
|
configdir: "#{ root }/#{ configdir }",
|
42
|
-
amqproutes: File.exist?( amqp_routesfile ) ? YAML.
|
43
|
-
httproutes: File.exist?( http_routesfile ) ? YAML.
|
43
|
+
amqproutes: File.exist?( amqp_routesfile ) ? YAML.ext_load_file( amqp_routesfile ).keys_to_symbols : {},
|
44
|
+
httproutes: File.exist?( http_routesfile ) ? YAML.ext_load_file( http_routesfile ).keys_to_symbols : {}
|
44
45
|
})
|
45
46
|
|
46
47
|
config[:loglevel] =
|
data/lib/app-logger.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cfgstore
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- deemytch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: monkey-hash
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: yaml_extend
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: Loads from yaml, determines defaults and serves settings for the small
|
28
42
|
program.
|
29
43
|
email: aspamkiller@yandex.ru
|
@@ -52,7 +66,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
52
66
|
- !ruby/object:Gem::Version
|
53
67
|
version: '0'
|
54
68
|
requirements: []
|
55
|
-
rubygems_version: 3.
|
69
|
+
rubygems_version: 3.3.19
|
56
70
|
signing_key:
|
57
71
|
specification_version: 4
|
58
72
|
summary: Loads and serves configs.
|