activerecord-debug_errors 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/test.yml +24 -13
- data/README.md +2 -2
- data/activerecord-debug_errors.gemspec +2 -2
- 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/gemfiles/activerecord_7_2.gemfile +2 -0
- data/gemfiles/activerecord_8_0.gemfile +2 -0
- data/gemfiles/activerecord_latest.gemfile +1 -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 +13 -14
- 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: f2f6bedffa09d9bd260844adb01a8180aed5c66c6717d0dbb3a15eadf301d5f3
|
4
|
+
data.tar.gz: 70a431a4cf586a45780a54cc451d46118b018ece04e824f0b65b65653c31ccee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02a5fb6e570214b74b5c4754155a15ffb6d3edba40cf70382b7167eeabae6e69d549139ae82bef91507af30b3c9b8c8b1859baabe9c03be239c8d7669ebcdc9d
|
7
|
+
data.tar.gz: 6bcec1dce1cc2334697ccb82f480ebfcaf1123663dbc14ba819fb05a0c4aab0ea7ab2fd73ce6b1983b3df46ffb8c96845afe8f641524a3ef5c68c63b76c60933
|
data/.github/workflows/test.yml
CHANGED
@@ -3,6 +3,8 @@ name: CI
|
|
3
3
|
on:
|
4
4
|
push:
|
5
5
|
pull_request:
|
6
|
+
schedule:
|
7
|
+
- cron: '0 13 * * *'
|
6
8
|
|
7
9
|
jobs:
|
8
10
|
build:
|
@@ -13,21 +15,30 @@ jobs:
|
|
13
15
|
fail-fast: false
|
14
16
|
matrix:
|
15
17
|
ruby-version:
|
16
|
-
- '2.6'
|
17
|
-
- '2.7'
|
18
|
-
- '3.0'
|
19
18
|
- '3.1'
|
19
|
+
- '3.2'
|
20
|
+
- '3.3'
|
21
|
+
- '3'
|
20
22
|
activerecord-version:
|
21
|
-
- '
|
22
|
-
- '
|
23
|
+
- '6_1'
|
24
|
+
- '7_0'
|
25
|
+
- '7_1'
|
26
|
+
- '7_2'
|
27
|
+
- '8_0'
|
28
|
+
- 'latest'
|
29
|
+
mysql-version:
|
30
|
+
- '8.0'
|
23
31
|
exclude:
|
24
|
-
|
25
|
-
|
26
|
-
activerecord-version: '
|
32
|
+
# Exclude conditions that don't meat the minimal requirement
|
33
|
+
- ruby-version: '3.1'
|
34
|
+
activerecord-version: '8_0'
|
27
35
|
|
36
|
+
# Exclude duplicate conditions
|
37
|
+
- ruby-version: '3.1'
|
38
|
+
activerecord-version: 'latest' # equivalent to '7_2'
|
28
39
|
services:
|
29
40
|
mysql:
|
30
|
-
image: mysql
|
41
|
+
image: mysql:${{ matrix.mysql-version }}
|
31
42
|
ports:
|
32
43
|
- 3306:3306
|
33
44
|
options: >-
|
@@ -43,16 +54,16 @@ jobs:
|
|
43
54
|
BUNDLE_GEMFILE: gemfiles/activerecord_${{ matrix.activerecord-version }}.gemfile
|
44
55
|
|
45
56
|
steps:
|
46
|
-
- uses: actions/checkout@
|
57
|
+
- uses: actions/checkout@v4
|
47
58
|
- name: Set up Ruby ${{ matrix.ruby-version }}
|
48
59
|
uses: ruby/setup-ruby@v1
|
49
60
|
with:
|
50
61
|
ruby-version: ${{ matrix.ruby-version }}
|
51
62
|
bundler-cache: true
|
52
|
-
- name:
|
63
|
+
- name: Show activerecord version
|
64
|
+
run: bundle info activerecord
|
65
|
+
- name: Run tests
|
53
66
|
run: |
|
54
|
-
bundle config path vendor/bundle
|
55
|
-
bundle install --jobs 4 --retry 3
|
56
67
|
bundle exec rake
|
57
68
|
env:
|
58
69
|
MYSQL_HOST: 127.0.0.1
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# ActiveRecord::DebugErrors
|
2
2
|
|
3
|
-
![](https://github.com/abicky/activerecord-debug_errors/workflows/
|
3
|
+
[![CI](https://github.com/abicky/activerecord-debug_errors/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/abicky/activerecord-debug_errors/actions/workflows/test.yml)
|
4
4
|
|
5
5
|
ActiveRecord::DebugErrors is an extension of activerecord to display useful debug logs on errors.
|
6
6
|
|
@@ -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'
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.description = %q{ActiveRecord::DebugErrors is an extension of activerecord to display useful debug logs on errors.}
|
11
11
|
spec.homepage = "https://github.com/abicky/activerecord-debug_errors"
|
12
12
|
spec.license = "MIT"
|
13
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
13
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
14
14
|
|
15
15
|
spec.metadata["homepage_uri"] = spec.homepage
|
16
16
|
spec.metadata["source_code_uri"] = spec.homepage
|
@@ -22,5 +22,5 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
-
spec.add_runtime_dependency "activerecord", ">= 6"
|
25
|
+
spec.add_runtime_dependency "activerecord", ">= 6.1"
|
26
26
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
eval_gemfile("../Gemfile")
|
@@ -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.4
|
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-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '6'
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '8'
|
19
|
+
version: '6.1'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '6'
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '8'
|
26
|
+
version: '6.1'
|
33
27
|
description: ActiveRecord::DebugErrors is an extension of activerecord to display
|
34
28
|
useful debug logs on errors.
|
35
29
|
email:
|
@@ -48,8 +42,13 @@ files:
|
|
48
42
|
- activerecord-debug_errors.gemspec
|
49
43
|
- bin/console
|
50
44
|
- bin/setup
|
51
|
-
- gemfiles/
|
52
|
-
- gemfiles/
|
45
|
+
- gemfiles/activerecord_6_0.gemfile
|
46
|
+
- gemfiles/activerecord_6_1.gemfile
|
47
|
+
- gemfiles/activerecord_7_0.gemfile
|
48
|
+
- gemfiles/activerecord_7_1.gemfile
|
49
|
+
- gemfiles/activerecord_7_2.gemfile
|
50
|
+
- gemfiles/activerecord_8_0.gemfile
|
51
|
+
- gemfiles/activerecord_latest.gemfile
|
53
52
|
- lib/activerecord-debug_errors.rb
|
54
53
|
- lib/activerecord/debug_errors.rb
|
55
54
|
- lib/activerecord/debug_errors/ext/connection_adapters/abstract_mysql_adapter.rb
|
@@ -69,14 +68,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
69
68
|
requirements:
|
70
69
|
- - ">="
|
71
70
|
- !ruby/object:Gem::Version
|
72
|
-
version:
|
71
|
+
version: 3.0.0
|
73
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
73
|
requirements:
|
75
74
|
- - ">="
|
76
75
|
- !ruby/object:Gem::Version
|
77
76
|
version: '0'
|
78
77
|
requirements: []
|
79
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.5.11
|
80
79
|
signing_key:
|
81
80
|
specification_version: 4
|
82
81
|
summary: An extension of activerecord to display useful debug logs on errors
|