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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8ea928ce32c34a63cd4b14dc3e2bf1636472539
4
- data.tar.gz: fa38000b5ceecda0373c2a6c29d0f917f50c7ba4
3
+ metadata.gz: 3ff8de54276086547ea0a24450936dec7a350bc4
4
+ data.tar.gz: 252ee779ffaf4499ea18c82b7a4d922155ddfcef
5
5
  SHA512:
6
- metadata.gz: 2a7f5fb1dd233492d92daa32e25a67ce315eaf460d834924cb20771ed7c92bc287fad20f091373c00e60aa3ab5050e9d7114f633656a724820da9fa053822f16
7
- data.tar.gz: e0e153759bbb4d25eb0005a3e69f768e48cb91f583642aa4938676d2ec2a4068e0311abb2661db1408c32cef4f82a978c89e2c29e60aa78ff62a4cc951bbd76a
6
+ metadata.gz: e7ec1e7069fa6276cc61a395ab3c804c3101c81f1624b4287b6bffb684ae3151887002e7543c53c475027467a92ff69db0bbe17e7e42d59248475487308051b2
7
+ data.tar.gz: 522c7715f58f5295acbe2e3863af97ddf636096377dd6dc24bbcec0ac73d39685b3e4a41fba3033d9b752e7f60064a1a2fda55f2c7a0bd56ab06a91721b0a33e
@@ -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
@@ -1,3 +1,3 @@
1
1
  module PaulBunyan
2
- VERSION = '1.2.0'
2
+ VERSION = '1.2.1'
3
3
  end
data/paul_bunyan.gemspec CHANGED
@@ -26,4 +26,5 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency 'wwtd'
27
27
  spec.add_development_dependency 'rails'
28
28
  spec.add_development_dependency 'sqlite3'
29
+ spec.add_development_dependency 'byebug'
29
30
  end
@@ -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
@@ -19,5 +19,6 @@ require 'stringio'
19
19
  require 'paul_bunyan'
20
20
 
21
21
  RSpec.configure do |config|
22
+ config.color = true
22
23
  config.include NotificationHelpers
23
24
  end
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.0
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-28 00:00:00.000000000 Z
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.'