sapience 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sapience/appender/datadog.rb +1 -1
- data/lib/sapience/configuration.rb +2 -1
- data/lib/sapience/sapience.rb +9 -2
- data/lib/sapience/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: e4372fa8c3f6aecfc30f6da1a26343a6779cd108
|
4
|
+
data.tar.gz: 0773add85e5e719ebabe8f659122b69e420777c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa31463c35b696ae761fecfcfe4de03cc51b6978691eaf4b763991514028db85702014ad31f972b395f60cb0a06956bcefe73d08bf32ebcb1712ac3b00da452a
|
7
|
+
data.tar.gz: ed46eb93a84556f618c69f57f2e6a0779b6a69ab2c45390c9075c8e984bb267ac800b5f6475e1a38f889aec96ef46fdea49e0e380f564617e086da7786a5aaaf
|
data/CHANGELOG.md
CHANGED
@@ -17,7 +17,8 @@ module Sapience
|
|
17
17
|
|
18
18
|
# Initial default Level for all new instances of Sapience::Logger
|
19
19
|
def initialize(options = {}) # rubocop:disable AbcSize
|
20
|
-
|
20
|
+
fail ArgumentError, "options need to be a hash" unless options.is_a?(Hash)
|
21
|
+
@options = DEFAULT.merge(options.deep_symbolize_keys)
|
21
22
|
self.default_level = @options[:log_level].to_sym
|
22
23
|
self.backtrace_level = @options[:log_level].to_sym
|
23
24
|
self.application = @options[:application]
|
data/lib/sapience/sapience.rb
CHANGED
@@ -26,8 +26,10 @@ module Sapience
|
|
26
26
|
|
27
27
|
def self.config
|
28
28
|
@@config ||= begin
|
29
|
-
config
|
30
|
-
|
29
|
+
config = ConfigLoader.load_from_file
|
30
|
+
options = config[environment]
|
31
|
+
options ||= default_options(config)
|
32
|
+
Configuration.new(options)
|
31
33
|
end
|
32
34
|
end
|
33
35
|
|
@@ -35,6 +37,11 @@ module Sapience
|
|
35
37
|
@@configured
|
36
38
|
end
|
37
39
|
|
40
|
+
def self.default_options(options = {})
|
41
|
+
warn "No configuration for environment #{environment}. Using 'default'"
|
42
|
+
options[DEFAULT_ENV]
|
43
|
+
end
|
44
|
+
|
38
45
|
def self.reset!
|
39
46
|
@@config = nil
|
40
47
|
@@logger = nil
|
data/lib/sapience/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sapience
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mikael Henriksson
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-08-
|
12
|
+
date: 2016-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|