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 +4 -4
- data/.github/workflows/test.yml +12 -6
- data/README.md +1 -1
- data/gemfiles/activerecord_6_0.gemfile +2 -0
- data/gemfiles/activerecord_6_1.gemfile +2 -0
- data/gemfiles/activerecord_7_0.gemfile +2 -0
- data/gemfiles/activerecord_7_1.gemfile +2 -0
- data/lib/activerecord/debug_errors/ext/connection_adapters/abstract_mysql_adapter.rb +8 -1
- data/lib/activerecord/debug_errors/ext/connection_adapters/connection_pool.rb +1 -1
- data/lib/activerecord/debug_errors/version.rb +1 -1
- metadata +7 -5
- data/gemfiles/activerecord_6.gemfile +0 -2
- data/gemfiles/activerecord_7.gemfile +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e5e73679ce896b569f923bc47533917baeaed89312248d578e72ac18187ac0d7
|
4
|
+
data.tar.gz: 5374c129a058bdb852b294649d14065f8c61de94527335ececbaf17ec9423a5d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23fa53f6de23fc3310235626e16e2f883abbae22ef12db578aa572c0e29b7b13352cc97ef0ae5275b5c8a456b8b33533ee86694a3aba3b02498ada252ad18cc7
|
7
|
+
data.tar.gz: 49e1c9ed26875868ab6b834104a29d383eab2cccfabd9e053c3cd4ffbfdede095f430d3d2fb2fd4a9c5fa3b9153f40f30d9773f2333842a8f79a9bb83066492d
|
data/.github/workflows/test.yml
CHANGED
@@ -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
|
-
- '
|
22
|
-
- '
|
23
|
+
- '6_0'
|
24
|
+
- '6_1'
|
25
|
+
- '7_0'
|
26
|
+
- '7_1'
|
23
27
|
exclude:
|
24
|
-
|
25
|
-
|
26
|
-
activerecord-version: '
|
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@
|
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
|
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'
|
@@ -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
|
-
|
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
|
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}"
|
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.
|
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:
|
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/
|
52
|
-
- gemfiles/
|
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.
|
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
|