rack-action_logger 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4b67195a74ca4d8eba2de552e0867fd5eeac22e8
4
- data.tar.gz: bd5f047381c02cda831427f807e9e2d35a162ac8
3
+ metadata.gz: 5c8a0cd101f204c4b4e28255d03d14e870cba315
4
+ data.tar.gz: e0f07f6e7cea35b0ec48eb914df791a8676ed3e6
5
5
  SHA512:
6
- metadata.gz: 7489f225eef57d0860dc614f94fd8885d793fc6c5d3fd3f87ce2b6e284010c939959677a9373b9d8909f57d7eff2f8f00c12948698684447efd670e7086d0a14
7
- data.tar.gz: b28e66ac460fac009832730844751aa6dbc7a358d51f0d3718317e40c5b5eee4ad0d6c3dc541843e3a94a0f81f1a424ebf3aef582e4ff87cf54cd7238642becf
6
+ metadata.gz: 552f8b621a8668c9b39526f74839045f2671dd6ab9891e2bc6bdb063067093392258bfe03ffc5784f5a9052be45c8986ee89d15717d2aa483ea6bba8076ca1db
7
+ data.tar.gz: 34f8be1a577fda8469a585e07fbf8b482f6abefadc1a21c14a602b70e7fd04214658b8705467d33e86135129bad699b07ddbccbb2bf484f1808da00bd9f2a033
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rack-action_logger (0.1.4)
4
+ rack-action_logger (0.1.5)
5
5
  activesupport
6
6
  fluent-logger (~> 0.5)
7
7
  woothee (~> 1.4)
@@ -16,6 +16,7 @@ module Rack::ActionLogger
16
16
  attr_accessor :pretty_print
17
17
  attr_accessor :rack_metrics
18
18
  attr_accessor :rack_content_types
19
+ attr_accessor :rack_unified_tag
19
20
 
20
21
  def initialize
21
22
  @emit_adapter = EmitAdapter::LoggerAdapter
@@ -27,6 +28,7 @@ module Rack::ActionLogger
27
28
  @pretty_print = true
28
29
  @rack_metrics = Rack::ActionLogger::Metrics::RackMetrics
29
30
  @rack_content_types = %w(text/html application/json)
31
+ @rack_unified_tag = true
30
32
  end
31
33
 
32
34
  def tag_prefix
@@ -26,6 +26,7 @@ module Rack::ActionLogger::Metrics
26
26
  end
27
27
 
28
28
  def tag_suffix
29
+ return RACK_TAG_PREFIX if Rack::ActionLogger.configuration.rack_unified_tag
29
30
  if @status_code == 404
30
31
  tags = ['not_found']
31
32
  else
@@ -60,7 +61,7 @@ module Rack::ActionLogger::Metrics
60
61
  end
61
62
 
62
63
  def enable_metrics
63
- Rack::ActionLogger.configuration.rack_content_types.any? { |c| content_type.include?(c) } || action_controller
64
+ Rack::ActionLogger.configuration.rack_content_types.any? { |c| content_type.to_s.include?(c) } || action_controller
64
65
  end
65
66
 
66
67
  def action_controller
@@ -1,5 +1,5 @@
1
1
  module Rack
2
2
  module ActionLogger
3
- VERSION = '0.1.4'
3
+ VERSION = '0.1.5'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-action_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Koichi Ishida