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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da91d2ad33b30bd8ac659196f3e45ffbb216718202955b9edec862eeb3657595
4
- data.tar.gz: 5cff1fcd45f2728651aa0be40858d17491f558a6530d8d71ef1352cb70efd6e8
3
+ metadata.gz: f2f6bedffa09d9bd260844adb01a8180aed5c66c6717d0dbb3a15eadf301d5f3
4
+ data.tar.gz: 70a431a4cf586a45780a54cc451d46118b018ece04e824f0b65b65653c31ccee
5
5
  SHA512:
6
- metadata.gz: 7a982545c7b10fffd01a3ffd3f246f0a0af53a31f9b1eacbe64a18861963c2bce24c6683af8eefae1a8f12e3b66fc26d09b15deef54ac17c3c1ccbfac01e4109
7
- data.tar.gz: 2ee8488020bda34d7d60dca2768ce46c15dce41208651174f9bdc8d17c77b94e6d4d26d5171981eaa718e31753839fd40c0aa58a9ba2f6015982a7845e1059bd
6
+ metadata.gz: 02a5fb6e570214b74b5c4754155a15ffb6d3edba40cf70382b7167eeabae6e69d549139ae82bef91507af30b3c9b8c8b1859baabe9c03be239c8d7669ebcdc9d
7
+ data.tar.gz: 6bcec1dce1cc2334697ccb82f480ebfcaf1123663dbc14ba819fb05a0c4aab0ea7ab2fd73ce6b1983b3df46ffb8c96845afe8f641524a3ef5c68c63b76c60933
@@ -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
- - '6'
22
- - '7'
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
- - # activerecord-7 doesn't support Ruby 2.6
25
- ruby-version: '2.6'
26
- activerecord-version: '7'
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:5.7
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@v2
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: Build and test with Rake
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/CI/badge.svg?branch=master)
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 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'
@@ -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(">= 2.6.0")
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", "< 8"
25
+ spec.add_runtime_dependency "activerecord", ">= 6.1"
26
26
  end
@@ -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"
@@ -0,0 +1,2 @@
1
+ eval_gemfile("../Gemfile")
2
+ gem "activerecord", "~> 7.2.0"
@@ -0,0 +1,2 @@
1
+ eval_gemfile("../Gemfile")
2
+ gem "activerecord", "~> 8.0.0"
@@ -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
- 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.4"
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.4
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-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/activerecord_6.gemfile
52
- - gemfiles/activerecord_7.gemfile
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: 2.6.0
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.2.22
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
@@ -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"