rails_semantic_logger 4.0.0 → 4.0.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: ae65e7f255bb1e297e11fae43718daa117983a7c
4
- data.tar.gz: 2fa4c18fde6943075d10eb918f8b96f15d59a409
3
+ metadata.gz: 3e9c2ffe09cf14071b342b13be6aad0d0aa8935b
4
+ data.tar.gz: 8852db53880093561eeedd13700f7c538614e874
5
5
  SHA512:
6
- metadata.gz: 708723add146771b1d3b0998736248a1aa3ecad54d408e1b387af214011c3871c3dc46e4fd96ee57c485ed557b82d6a93891c7a1e202ae92454c280aef835584
7
- data.tar.gz: 85202862e445f10126ecdfd0fa42287c2e0214758ee5d4383b8de7ee4ebd0b6109c4f67e1e9c104fad994eff39d9b66c6cc6d02224aa4e389cbe392dbcbab533
6
+ metadata.gz: 28d83ef103945904e2c0817fbf0b9a26baa36cfd9bb644de64b0f172155c5767b49f8bd57b30c6da1b10d80555e352a113333f7884e9779227505d7e9b4fa67f
7
+ data.tar.gz: fc0d516bdeaf189cd363e7c7e578c40a10a538a461d53ec12e094a958314def91a9eba6b053a9890378f274e43ffb02180bf703327368400dd395dd828016b0e
data/Rakefile CHANGED
@@ -1,8 +1,9 @@
1
- require 'rake/clean'
2
- require 'rake/testtask'
1
+ # Setup bundler to avoid having to run bundle exec all the time.
2
+ require 'rubygems'
3
+ require 'bundler/setup'
3
4
 
4
- $LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
5
- require 'rails_semantic_logger/version'
5
+ require 'rake/testtask'
6
+ require_relative 'lib/rails_semantic_logger/version'
6
7
 
7
8
  task :gem do
8
9
  system 'gem build rails_semantic_logger.gemspec'
@@ -21,4 +22,10 @@ Rake::TestTask.new(:test) do |t|
21
22
  t.warning = false
22
23
  end
23
24
 
24
- task default: :test
25
+ # By default run tests against all appraisals
26
+ if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
27
+ require 'appraisal'
28
+ task default: :appraisal
29
+ else
30
+ task default: :test
31
+ end
@@ -50,7 +50,7 @@ module RailsSemanticLogger
50
50
  # When Semantic Logger fails to log to an appender it logs the error to an
51
51
  # internal logger, which by default writes to STDERR.
52
52
  # Example, change the default internal logger to log to stdout:
53
- # SemanticLogger::Processor.logger = SemanticLogger::Appender::File.new(STDOUT, :warn)
53
+ # SemanticLogger::Processor.logger = SemanticLogger::Appender::File.new(io: STDOUT, level: :warn)
54
54
  config.rails_semantic_logger.add_file_appender = true
55
55
 
56
56
  # Silence asset logging
@@ -21,7 +21,12 @@ module ActiveRecord
21
21
  unless (payload[:binds] || []).empty?
22
22
  log_payload[:binds] = binds = {}
23
23
  # Changed with Rails 5
24
- if Rails.version.to_i >= 5
24
+ if Rails.version.to_f >= 5.1
25
+ casted_params = type_casted_binds(payload[:binds], payload[:type_casted_binds])
26
+ payload[:binds].zip(casted_params).map { |attr, value|
27
+ render_bind(attr, value)
28
+ }
29
+ elsif Rails.version.to_i >= 5
25
30
  payload[:binds].each do |attr|
26
31
  attr_name, value = render_bind(attr)
27
32
  binds[attr_name] = value
@@ -1,3 +1,3 @@
1
1
  module RailsSemanticLogger #:nodoc
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_semantic_logger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Reid Morrison
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-02 00:00:00.000000000 Z
11
+ date: 2017-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  requirements: []
86
86
  rubyforge_project:
87
- rubygems_version: 2.6.8
87
+ rubygems_version: 2.6.11
88
88
  signing_key:
89
89
  specification_version: 4
90
90
  summary: Scalable, next generation enterprise logging for Rails