flight_config 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flight_config/log.rb +3 -8
- data/lib/flight_config/version.rb +1 -1
- 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: '081d7e1e6de4db075516f7c0c6e56014960a1a67a40d10038ca934039c2ef7ad'
|
4
|
+
data.tar.gz: ed51d2999f19411b130f1f5acc41b58f056efc2bbad05783d1eec00b95c38d62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd304a5753c64707df7e0fd4c107489bac75378db3c731db249deeba0262053fc0a05c7aee9e3bd1df8704897b46183c3a8be33661e41e731b29881679a4ecbe
|
7
|
+
data.tar.gz: 4635f2ee905c961830fa2c393db15c8978afbd24d2131d20734c8df967abb842a7dd04781e551a75d97f1f42e56ab0ea5949c7cc47d93591c102a0142ff88c24
|
data/lib/flight_config/log.rb
CHANGED
@@ -29,14 +29,6 @@ require 'logger'
|
|
29
29
|
module FlightConfig
|
30
30
|
class << self
|
31
31
|
attr_accessor :logger
|
32
|
-
|
33
|
-
def default_log_path
|
34
|
-
'/tmp/flight_config.log'
|
35
|
-
end
|
36
|
-
|
37
|
-
def logger
|
38
|
-
@logger ||= Logger.new(FlightConfig.default_log_path)
|
39
|
-
end
|
40
32
|
end
|
41
33
|
|
42
34
|
module Log
|
@@ -44,6 +36,8 @@ module FlightConfig
|
|
44
36
|
status = respond_to_missing?(s)
|
45
37
|
if status == :log_method
|
46
38
|
FlightConfig.logger.send(s, *a, &b)
|
39
|
+
elsif status == :nil_logger
|
40
|
+
# noop
|
47
41
|
else
|
48
42
|
super
|
49
43
|
end
|
@@ -51,6 +45,7 @@ module FlightConfig
|
|
51
45
|
|
52
46
|
def self.respond_to_missing?(s)
|
53
47
|
return :log_method if FlightConfig.logger.respond_to?(s)
|
48
|
+
return :nil_logger if FlightConfig.logger.nil?
|
54
49
|
super
|
55
50
|
end
|
56
51
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flight_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alces Flight Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tty-config
|
@@ -140,8 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
- !ruby/object:Gem::Version
|
141
141
|
version: '0'
|
142
142
|
requirements: []
|
143
|
-
|
144
|
-
rubygems_version: 2.7.6
|
143
|
+
rubygems_version: 3.0.3
|
145
144
|
signing_key:
|
146
145
|
specification_version: 4
|
147
146
|
summary: Manages the loading of config files
|