sapience 0.2.12 → 0.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -0
- data/CHANGELOG.md +4 -0
- data/lib/sapience/base.rb +5 -2
- data/lib/sapience/rails.rb +3 -0
- 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: 485b7ea86a14e6bcfaedc9a9d2d9d944654ea2c7
|
4
|
+
data.tar.gz: a650a5681fb862e0b85172df46cef8e7ceffa077
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d53690aaf69e9bd76400df5cdfd368799d4b6a50089653add9f22501f92c9f8ddda46aecb2bc65ff9f108e990ff40f6df2b2167bcc5eadade63b1f89c2fc940
|
7
|
+
data.tar.gz: 92711be9adea5c7290cd0aed92f5df6a7c233b8f611c8c1e9fee7a4dc0bb52cd343741595ef1565f873e142465d5b6b87587f2ed9c0ddc4e4799f4f3ddfc03c7
|
data/.travis.yml
CHANGED
@@ -18,4 +18,6 @@ after_success:
|
|
18
18
|
|
19
19
|
notifications:
|
20
20
|
slack:
|
21
|
+
on_success: change
|
22
|
+
on_failure: change
|
21
23
|
secure: apFwkfBQ+3NDJgcLNCHQori9qtr6ePaN3Xx7Sy7NVWwYm9BHNxoX/FN8/hxR63JjXrf1C0hK0FLQ0TiA0BN9PgEEIecg78BvWUwMClDDiwhyYN3H0Bbg35PUFtgDIrOGpu/TYlxNmdHEDYEAxaWsl9wSds8pAJsN6m7VTjGfBwJUDcOiM4L1eRpbp7smPqOjmuQFuOJnO8YkPb+6nUfz53cJrMRUdha89Vgmvnw6cP4/Ms1TsL3vKmMSVbGGh/6WNKPjU6IbuUjwlsh6a9xWxQOk6Wnis/Z+kA+T0XbLMuTLLmzRDuql1tjJeMPi+wukmK1a7GjpPkpkzAgwLQ/CkjTBfIRbMyaBYSuAciuOY8PDtCcT4WLwEvdZbkFmhAdSr1RYxIBpONVfZ/5DT3bpk71+O74OIBqxG6NmkiZ0B6u9/KxbnIINLVAcVaqsN8sdSqWlWKzPm45BfGPXGjmGGgIVFU31rs+W5Zs7IYMNUjZxabYKIv9TsBONbogfbcoGZA+rWWUnQdjypNWJS9wyQDvJ4btxqy8YhDfaV6gF30Un5JcAggMutzKJiYi+qAeh0uN3/9XoXV2N6XBnh58h8ny1NY+0vklWhtFGR1wfFAqkDskvCIZabSeJ5bFM6FtNbNKq9tYciS+eAO1vEYQVDFt9eY2uZF2mFDKRnEegHMU=
|
data/CHANGELOG.md
CHANGED
data/lib/sapience/base.rb
CHANGED
@@ -175,7 +175,7 @@ module Sapience
|
|
175
175
|
# logger.debug('Hello World', result: 'blah')
|
176
176
|
# end
|
177
177
|
def with_payload(payload)
|
178
|
-
current_payload
|
178
|
+
current_payload = self.payload
|
179
179
|
Thread.current[:sapience_payload] = current_payload ? current_payload.merge(payload) : payload
|
180
180
|
yield
|
181
181
|
ensure
|
@@ -222,7 +222,10 @@ module Sapience
|
|
222
222
|
fail ArgumentError, ":filter must be a Regexp or Proc" unless filter.nil? || filter.is_a?(Regexp) || filter.is_a?(Proc)
|
223
223
|
|
224
224
|
@filter = filter.is_a?(Regexp) ? filter.freeze : filter
|
225
|
-
@name = klass.is_a?(String)
|
225
|
+
@name = klass if klass.is_a?(String)
|
226
|
+
@name ||= klass.name if klass.respond_to?(:name)
|
227
|
+
@name ||= klass.class.name
|
228
|
+
|
226
229
|
if level.nil?
|
227
230
|
# Allow the global default level to determine this loggers log level
|
228
231
|
@level_index = nil
|
data/lib/sapience/rails.rb
CHANGED
@@ -57,6 +57,9 @@ module Sapience
|
|
57
57
|
|
58
58
|
# Before any initializers run, but after the gems have been loaded
|
59
59
|
config.after_initialize do
|
60
|
+
# in the rare case a gem disables logging but still requires a logger (teaspoon gem)
|
61
|
+
::Rails.logger ||= Sapience[::Rails]
|
62
|
+
|
60
63
|
require "sapience/extensions/action_cable/tagged_logger_proxy" if defined?(ActionCable)
|
61
64
|
require "sapience/extensions/active_model_serializers/logging" if defined?(ActiveModelSerializers)
|
62
65
|
require "sapience/extensions/active_job/logging" if defined?(ActiveJob)
|
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.2.
|
4
|
+
version: 0.2.13
|
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-09-
|
12
|
+
date: 2016-09-21 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: concurrent-ruby
|