paul_bunyan 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/paul_bunyan/railtie.rb +1 -0
- data/lib/paul_bunyan/version.rb +1 -1
- data/paul_bunyan.gemspec +1 -0
- data/spec/lib/paul_bunyan/railtie_spec.rb +9 -0
- data/spec/spec_helper.rb +1 -0
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ff8de54276086547ea0a24450936dec7a350bc4
|
4
|
+
data.tar.gz: 252ee779ffaf4499ea18c82b7a4d922155ddfcef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ec1e7069fa6276cc61a395ab3c804c3101c81f1624b4287b6bffb684ae3151887002e7543c53c475027467a92ff69db0bbe17e7e42d59248475487308051b2
|
7
|
+
data.tar.gz: 522c7715f58f5295acbe2e3863af97ddf636096377dd6dc24bbcec0ac73d39685b3e4a41fba3033d9b752e7f60064a1a2fda55f2c7a0bd56ab06a91721b0a33e
|
data/lib/paul_bunyan/railtie.rb
CHANGED
@@ -30,6 +30,7 @@ module PaulBunyan
|
|
30
30
|
new_logger = PaulBunyan.add_logger(ActiveSupport::Logger.new(log_target(app.config)))
|
31
31
|
new_logger.level = PaulBunyan::Level.coerce_level(ENV['LOG_LEVEL'] || ::Rails.application.config.log_level || 'INFO')
|
32
32
|
new_logger.formatter = logging_config.formatter
|
33
|
+
new_logger.extend(ActiveSupport::TaggedLogging) if logging_config.formatter.respond_to?(:tagged)
|
33
34
|
|
34
35
|
if logging_config.handle_request_logging
|
35
36
|
unsubscribe_default_log_subscribers
|
data/lib/paul_bunyan/version.rb
CHANGED
data/paul_bunyan.gemspec
CHANGED
@@ -2,6 +2,15 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
module PaulBunyan
|
4
4
|
RSpec.describe Railtie do
|
5
|
+
describe 'initializer "initialize_logger.logging"' do
|
6
|
+
it 'must extend the logger with ActiveSupport::TaggedLogging' do
|
7
|
+
# Since we're extending an instance of a class it's hard to actually
|
8
|
+
# check for the module in the ancestry chain. respond_to? should be a
|
9
|
+
# good enough proxy for it though.
|
10
|
+
expect(PaulBunyan.logger.primary_logger).to respond_to(:tagged)
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
5
14
|
describe '#unsubscribe_default_log_subscribers' do
|
6
15
|
before do
|
7
16
|
@action_controller_subscriber = ActiveSupport::LogSubscriber.subscribers.find{|s|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paul_bunyan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Duane Johnson
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2016-06-
|
14
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: request_store
|
@@ -111,6 +111,20 @@ dependencies:
|
|
111
111
|
- - ">="
|
112
112
|
- !ruby/object:Gem::Version
|
113
113
|
version: '0'
|
114
|
+
- !ruby/object:Gem::Dependency
|
115
|
+
name: byebug
|
116
|
+
requirement: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: '0'
|
121
|
+
type: :development
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
114
128
|
description: 'Extensions and enhancements to Ruby''s built in Logger class. Extensions
|
115
129
|
include: multiple output streams, JSON formatting for easy aggregation, and a Railtie
|
116
130
|
to set some sane(ish) defaults for production Rails environments.'
|