cfgstore 2.2.9 → 2.2.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/app-config.rb +4 -3
  3. data/lib/app-logger.rb +1 -0
  4. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0656565178e6cc686e83f6b32790c0a85fcd4e3c85cc4228989c792532a1e3b1'
4
- data.tar.gz: 3deec51ba51ee1cd0614316fe4e2c71a421cc7107e350e7b2264c59f0a2af2da
3
+ metadata.gz: 9afa3c297ef2acd7881ecc79e6d100800f7e24808d424a6508192f57864d71f2
4
+ data.tar.gz: 6a08b28f077e8573b2feb39e7fe65b7b7e1c4d67198892de4662ce030849028b
5
5
  SHA512:
6
- metadata.gz: 1aebf4bbda4f0348c1326d10ee2bd224714e24cb3a3e8b5282ba61a3ef9e9ab1feee884cd925baa0b731c72f468be300fa594b18b1b10a87f59760b7a736e816
7
- data.tar.gz: 1d91938ec32411345f6b434bf7d906ba243ebe7c5a9413287f61281826263ae1355c9f7da8d1b3f3d27cefc430d81c724237fd303f0066bb2ba3a1dcf6f39c94
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.load_file( configfile ).keys_to_symbols ) rescue nil
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.load_file( amqp_routesfile ).keys_to_symbols : {},
43
- httproutes: File.exist?( http_routesfile ) ? YAML.load_file( http_routesfile ).keys_to_symbols : {}
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
@@ -1,4 +1,5 @@
1
1
  require 'logger'
2
+ require 'fileutils'
2
3
  require 'monkey-hash'
3
4
  ##
4
5
  # Печататель протоколов с удобной настройкой вывода и фильтрацией спама от Bunny.
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.9
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: 2020-07-01 00:00:00.000000000 Z
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.1.4
69
+ rubygems_version: 3.3.19
56
70
  signing_key:
57
71
  specification_version: 4
58
72
  summary: Loads and serves configs.