lorekeeper 2.6.2 → 2.6.3

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
  SHA256:
3
- metadata.gz: f6870cd9dbaba0f1a82e90805f8177a689cb8f1d8e3ff194ae403c8e68f85cfb
4
- data.tar.gz: 3f98d3e87de6f7a0c06fb3ba29405984f9aa74b105971f6bfcfb4786b2b6255f
3
+ metadata.gz: d211dae4a4b4384c1088e25ca7f3153be286c4dafa9a5e6b00f2d1f5de1f24ce
4
+ data.tar.gz: e352f7504c9ab8425340aac4903edb445fcee8ddb4480d38929570552aa22fc2
5
5
  SHA512:
6
- metadata.gz: dabdb1a460cc3eddb6c1ae00cb99c3cb9ac044a62b5bb2b9f12ebc149d23978e513ee30e8b43bb5922b2976f90e7e942407a5a2b54635704c98c9dbcd586741d
7
- data.tar.gz: ec89d09e5daee804a3745a3c858b1305da2ba08d543b5d3766abfe66ba86d3c2e55d77a56e61d7f0273b82592627263f71aacada6265b18bc66f6fef7efb070c
6
+ metadata.gz: a88a2169e5d597f72ae6f882e2395825c21a18e561700e8b29108f16922e822bbf5c9ca9050953c6feb58725ebffb40215293f58fc2ffdee8488b46e9a63c265
7
+ data.tar.gz: 4793d8b3ade333e955b79c38940289a42e3ca103b5200277aa8997ec12be3548c86eaf82e1b7197009bae467fbaf76a833631f20d543f05a90c81c8fe978dd14
@@ -14,14 +14,27 @@ jobs:
14
14
  runs-on: ubuntu-latest
15
15
  strategy:
16
16
  matrix:
17
- ruby-version: ['2.7', '3.0', '3.1', '3.2']
17
+ ruby: ['2.7', '3.0', '3.1', '3.2', '3.3']
18
+ rails: ['5.2.7', '6.0.4', '6.1.7', '7.0.8', '7.1.1']
19
+ include:
20
+ - rails: '4.0.1'
21
+ ruby: '2.7'
22
+ - rails: '4.1.1'
23
+ ruby: '2.7'
24
+ - rails: '4.2.1'
25
+ ruby: '2.7'
26
+ - rails: '5.0.1'
27
+ ruby: '2.7'
28
+ - rails: '5.1.1'
29
+ ruby: '2.7'
18
30
 
19
31
  steps:
20
- - uses: actions/checkout@v2
32
+ - uses: actions/checkout@v4
21
33
  - name: Set up Ruby
22
34
  uses: ruby/setup-ruby@v1
23
35
  with:
24
- ruby-version: ${{ matrix.ruby-version }}
36
+ ruby-version: ${{ matrix.ruby }}
37
+ cache-version: rails-${{ matrix.rails }} # for the cache key
25
38
  bundler-cache: true # runs 'bundle install' and caches installed gems automatically
26
39
  - name: Run rubocop
27
40
  run: bundle exec rubocop
@@ -29,3 +42,6 @@ jobs:
29
42
  run: bundle exec rspec
30
43
  - name: Run benchmark
31
44
  run: bundle exec rake benchmark
45
+
46
+ env:
47
+ RAILS_VER: ${{ matrix.rails }}
data/.rubocop.yml CHANGED
@@ -1,3 +1,5 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  require:
2
4
  - rubocop-performance
3
5
 
@@ -12,16 +14,20 @@ AllCops:
12
14
  #
13
15
  - 'vendor/bundle/**/*'
14
16
 
15
- Lint/ConstantDefinitionInBlock:
16
- Exclude:
17
- - 'spec/**/*'
18
-
19
17
  Layout/ArgumentAlignment:
20
18
  EnforcedStyle: with_fixed_indentation
21
19
 
22
20
  Layout/FirstHashElementIndentation:
23
21
  EnforcedStyle: consistent
24
22
 
23
+ Lint/ConstantDefinitionInBlock:
24
+ Exclude:
25
+ - 'spec/**/*'
26
+
27
+ Lint/StructNewOverride:
28
+ Exclude:
29
+ - spec/lib/lorekeeper/backtrace_cleaner_spec.rb
30
+
25
31
  Metrics/ParameterLists:
26
32
  CountKeywordArgs: false
27
33
 
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,28 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2023-10-30 07:24:07 UTC using RuboCop version 1.24.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # Cop supports --auto-correct.
11
+ # Configuration parameters: EnforcedStyle.
12
+ # SupportedStyles: space, no_space
13
+ Layout/SpaceAroundEqualsInParameterDefault:
14
+ Exclude:
15
+ - 'lib/lorekeeper/multi_logger.rb'
16
+
17
+ # Offense count: 1
18
+ # Configuration parameters: AllowedMethods.
19
+ # AllowedMethods: respond_to_missing?
20
+ Style/OptionalBooleanParameter:
21
+ Exclude:
22
+ - 'lib/lorekeeper/multi_logger.rb'
23
+
24
+ # Offense count: 1
25
+ # Cop supports --auto-correct.
26
+ Style/RedundantFreeze:
27
+ Exclude:
28
+ - 'lib/lorekeeper/backtrace_cleaner.rb'
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ # 2.6.3
2
+ * Fix Lorekeeper::BacktraceCleaner to support BacktraceLocation
3
+
1
4
  # 2.6.2
2
5
  * Fix respond_to? method signature
3
6
 
data/Gemfile CHANGED
@@ -4,3 +4,5 @@ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in lorekeeper.gemspec
6
6
  gemspec
7
+
8
+ gem 'activesupport', "~> #{ENV.fetch('RAILS_VER', '7.1.1')}"
@@ -38,6 +38,7 @@ module Lorekeeper
38
38
  last_index = nil
39
39
  result = []
40
40
  backtrace.each_with_index do |line, idx|
41
+ line = line.to_s
41
42
  if line.start_with?(@rails_root) && @gem_path.none? { |path| line.start_with?(path) }
42
43
  result << line[@rails_root_size..]
43
44
  last_index = idx
@@ -28,10 +28,10 @@ module Lorekeeper
28
28
  # Delegates methods to the existing Logger instance
29
29
  # We are extending the logger API with methods error_with_data, etc
30
30
  LOGGING_METHODS.each do |method_name|
31
- define_method "#{method_name}_with_data", ->(message_param = nil, data = {}, &block) {
31
+ define_method :"#{method_name}_with_data", ->(message_param = nil, data = {}, &block) {
32
32
  return true if METHOD_SEVERITY_MAP[method_name] < @level
33
33
 
34
- extra_fields = { DATA => (data || {}) }
34
+ extra_fields = { DATA => data || {} }
35
35
  with_extra_fields(extra_fields) do
36
36
  add(METHOD_SEVERITY_MAP[method_name], message_param, nil, &block)
37
37
  end
@@ -87,7 +87,7 @@ module Lorekeeper
87
87
  else
88
88
  log_data(METHOD_SEVERITY_MAP[:warn], 'Logger exception called without exception class.')
89
89
  message = "#{exception.class}: #{exception.inspect} #{param_message}"
90
- with_extra_fields(DATA => (param_data || {})) { log_data(log_level, message) }
90
+ with_extra_fields(DATA => param_data || {}) { log_data(log_level, message) }
91
91
  end
92
92
  end
93
93
 
@@ -38,7 +38,7 @@ module Lorekeeper
38
38
 
39
39
  # Extending the logger API with methods error_with_data, etc
40
40
  LOGGING_METHODS.each do |method_name|
41
- define_method "#{method_name}_with_data", ->(message_param = nil, data = {}) {
41
+ define_method :"#{method_name}_with_data", ->(message_param = nil, data = {}) {
42
42
  return true if METHOD_SEVERITY_MAP[method_name] < @level
43
43
 
44
44
  log_data(METHOD_SEVERITY_MAP[method_name], "#{message_param}, data: #{data}")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Lorekeeper
4
- VERSION = '2.6.2'
4
+ VERSION = '2.6.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lorekeeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordi Polo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-13 00:00:00.000000000 Z
11
+ date: 2024-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj
@@ -215,6 +215,7 @@ files:
215
215
  - ".gitignore"
216
216
  - ".rspec"
217
217
  - ".rubocop.yml"
218
+ - ".rubocop_todo.yml"
218
219
  - CHANGELOG.md
219
220
  - Gemfile
220
221
  - LICENSE.txt