activerecord-debug_errors 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: da91d2ad33b30bd8ac659196f3e45ffbb216718202955b9edec862eeb3657595
4
- data.tar.gz: 5cff1fcd45f2728651aa0be40858d17491f558a6530d8d71ef1352cb70efd6e8
3
+ metadata.gz: e5e73679ce896b569f923bc47533917baeaed89312248d578e72ac18187ac0d7
4
+ data.tar.gz: 5374c129a058bdb852b294649d14065f8c61de94527335ececbaf17ec9423a5d
5
5
  SHA512:
6
- metadata.gz: 7a982545c7b10fffd01a3ffd3f246f0a0af53a31f9b1eacbe64a18861963c2bce24c6683af8eefae1a8f12e3b66fc26d09b15deef54ac17c3c1ccbfac01e4109
7
- data.tar.gz: 2ee8488020bda34d7d60dca2768ce46c15dce41208651174f9bdc8d17c77b94e6d4d26d5171981eaa718e31753839fd40c0aa58a9ba2f6015982a7845e1059bd
6
+ metadata.gz: 23fa53f6de23fc3310235626e16e2f883abbae22ef12db578aa572c0e29b7b13352cc97ef0ae5275b5c8a456b8b33533ee86694a3aba3b02498ada252ad18cc7
7
+ data.tar.gz: 49e1c9ed26875868ab6b834104a29d383eab2cccfabd9e053c3cd4ffbfdede095f430d3d2fb2fd4a9c5fa3b9153f40f30d9773f2333842a8f79a9bb83066492d
@@ -17,13 +17,19 @@ jobs:
17
17
  - '2.7'
18
18
  - '3.0'
19
19
  - '3.1'
20
+ - '3.2'
21
+ - '3.3'
20
22
  activerecord-version:
21
- - '6'
22
- - '7'
23
+ - '6_0'
24
+ - '6_1'
25
+ - '7_0'
26
+ - '7_1'
23
27
  exclude:
24
- - # activerecord-7 doesn't support Ruby 2.6
25
- ruby-version: '2.6'
26
- activerecord-version: '7'
28
+ # activerecord-7 doesn't support Ruby 2.6
29
+ - ruby-version: '2.6'
30
+ activerecord-version: '7_0'
31
+ - ruby-version: '2.6'
32
+ activerecord-version: '7_1'
27
33
 
28
34
  services:
29
35
  mysql:
@@ -43,7 +49,7 @@ jobs:
43
49
  BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.activerecord-version }}.gemfile
44
50
 
45
51
  steps:
46
- - uses: actions/checkout@v2
52
+ - uses: actions/checkout@v4
47
53
  - name: Set up Ruby ${{ matrix.ruby-version }}
48
54
  uses: ruby/setup-ruby@v1
49
55
  with:
data/README.md CHANGED
@@ -125,7 +125,7 @@ Note that the user requires the PROCESS priviledge to collect the information.
125
125
  When `ActiveRecord::ConnectionTimeoutError` occurs, you can see the information of connection owners (threads):
126
126
 
127
127
  ```
128
- ActiveRecord::ConnectionTimeoutError occured:
128
+ ActiveRecord::ConnectionTimeoutError occurred:
129
129
  connection owners:
130
130
  Thread #<Thread:0x00007fbda205fa70 sleep_forever> status=sleep priority=0
131
131
  /path/to/activerecord-debug_errors/spec/activerecord/debug_errors/ext/connection_adapters/connection_pool_spec.rb:32:in `join'
@@ -0,0 +1,2 @@
1
+ eval_gemfile("../Gemfile")
2
+ gem "activerecord", "~> 6.0.0"
@@ -0,0 +1,2 @@
1
+ eval_gemfile("../Gemfile")
2
+ gem "activerecord", "~> 6.1.0"
@@ -0,0 +1,2 @@
1
+ eval_gemfile("../Gemfile")
2
+ gem "activerecord", "~> 7.0.0"
@@ -0,0 +1,2 @@
1
+ eval_gemfile("../Gemfile")
2
+ gem "activerecord", "~> 7.1.0"
@@ -80,6 +80,13 @@ module ActiveRecord
80
80
  end
81
81
  end
82
82
 
83
+ ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.descendants.each do |adapter|
84
+ adapter.prepend(ActiveRecord::DebugErrors::DisplayMySQLInformation)
85
+ end
86
+
83
87
  class ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter
84
- prepend ActiveRecord::DebugErrors::DisplayMySQLInformation
88
+ def self.inherited(base)
89
+ super
90
+ base.prepend(ActiveRecord::DebugErrors::DisplayMySQLInformation)
91
+ end
85
92
  end
@@ -15,7 +15,7 @@ module ActiveRecord
15
15
  def dump_threads
16
16
  logger = ActiveRecord::Base.logger
17
17
 
18
- logger.error "ActiveRecord::ConnectionTimeoutError occured:"
18
+ logger.error "ActiveRecord::ConnectionTimeoutError occurred:"
19
19
 
20
20
  dump_thread = ->(thread) {
21
21
  logger.error " Thread #{thread} status=#{thread.status} priority=#{thread.priority}"
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module DebugErrors
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-debug_errors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - abicky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-01-19 00:00:00.000000000 Z
11
+ date: 2024-05-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -48,8 +48,10 @@ files:
48
48
  - activerecord-debug_errors.gemspec
49
49
  - bin/console
50
50
  - bin/setup
51
- - gemfiles/activerecord_6.gemfile
52
- - gemfiles/activerecord_7.gemfile
51
+ - gemfiles/activerecord_6_0.gemfile
52
+ - gemfiles/activerecord_6_1.gemfile
53
+ - gemfiles/activerecord_7_0.gemfile
54
+ - gemfiles/activerecord_7_1.gemfile
53
55
  - lib/activerecord-debug_errors.rb
54
56
  - lib/activerecord/debug_errors.rb
55
57
  - lib/activerecord/debug_errors/ext/connection_adapters/abstract_mysql_adapter.rb
@@ -76,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
76
78
  - !ruby/object:Gem::Version
77
79
  version: '0'
78
80
  requirements: []
79
- rubygems_version: 3.2.22
81
+ rubygems_version: 3.5.9
80
82
  signing_key:
81
83
  specification_version: 4
82
84
  summary: An extension of activerecord to display useful debug logs on errors
@@ -1,2 +0,0 @@
1
- eval_gemfile("../Gemfile")
2
- gem "activerecord", "~> 6.0"
@@ -1,2 +0,0 @@
1
- eval_gemfile("../Gemfile")
2
- gem "activerecord", "~> 7.0"