activerecord-explainer 0.2.3 → 0.2.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: 95e7887cda89f2810cfbdacf768c0570a8bee37c5a0fc11926f6e7be9e0dbe0b
4
- data.tar.gz: 61c14b0a374963bec99184f7af4a88d2a4a6786637c19c8bed3ec0c7017b769a
3
+ metadata.gz: 464d46b48157dceb5a8814621d0db7140edb054a09e59a15c799c1593000f160
4
+ data.tar.gz: ab68ee5445377684a9188d927d29bee882c0611067266e9c6fcbbf97f1b22155
5
5
  SHA512:
6
- metadata.gz: 2ccb4f8278aed056e10fec8e6feca01bbc8b0156a58c8c28b70fed611105493bc71fd552d5d94002c3a38f0111256d0ab9349048980530bdc5d00078f8f9581f
7
- data.tar.gz: 212f5b40948a74f852929194aaa61a1d94dd04c33fa8eec1ed565b8fd6ed7148aef92ed1ed5fdd464bf584f0e14d10e1778aa1a09f466e587bb7ddc7000e91dd
6
+ metadata.gz: fa6da605bbdf6ea4a6132ba9f380a66f13bc0921bcc063412fc5ac69797d72ba3027d19fc9f95a8a20adb8e8bb77e1b1273f6b90b8f2751554daf0496575850a
7
+ data.tar.gz: 185c0840903970bf709c4cb5aeb61b0cdab155d0af61c32b236666ba91576a2ceb03e331b27270ed50e1d0e98fc0fc002d25d031656ad143a7005df8ae2a427e
@@ -1,36 +1,36 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activerecord-explainer (0.2.3)
4
+ activerecord-explainer (0.2.4)
5
5
  activerecord (>= 5.1)
6
6
  activesupport (>= 5.1)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (6.0.2.1)
12
- activesupport (= 6.0.2.1)
13
- activerecord (6.0.2.1)
14
- activemodel (= 6.0.2.1)
15
- activesupport (= 6.0.2.1)
16
- activesupport (6.0.2.1)
11
+ activemodel (6.0.3.4)
12
+ activesupport (= 6.0.3.4)
13
+ activerecord (6.0.3.4)
14
+ activemodel (= 6.0.3.4)
15
+ activesupport (= 6.0.3.4)
16
+ activesupport (6.0.3.4)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 0.7, < 2)
19
19
  minitest (~> 5.1)
20
20
  tzinfo (~> 1.1)
21
- zeitwerk (~> 2.2)
21
+ zeitwerk (~> 2.2, >= 2.2.2)
22
22
  ast (2.4.0)
23
- concurrent-ruby (1.1.5)
23
+ concurrent-ruby (1.1.7)
24
24
  diff-lcs (1.3)
25
- i18n (1.8.2)
25
+ i18n (1.8.5)
26
26
  concurrent-ruby (~> 1.0)
27
27
  jaro_winkler (1.5.2)
28
- minitest (5.14.0)
28
+ minitest (5.14.2)
29
29
  parallel (1.17.0)
30
30
  parser (2.6.3.0)
31
31
  ast (~> 2.4.0)
32
32
  rainbow (3.0.0)
33
- rake (10.5.0)
33
+ rake (13.0.1)
34
34
  rspec (3.8.0)
35
35
  rspec-core (~> 3.8.0)
36
36
  rspec-expectations (~> 3.8.0)
@@ -52,11 +52,12 @@ GEM
52
52
  ruby-progressbar (~> 1.7)
53
53
  unicode-display_width (>= 1.4.0, < 1.6)
54
54
  ruby-progressbar (1.10.0)
55
+ sqlite3 (1.4.2)
55
56
  thread_safe (0.3.6)
56
- tzinfo (1.2.6)
57
+ tzinfo (1.2.7)
57
58
  thread_safe (~> 0.1)
58
59
  unicode-display_width (1.5.0)
59
- zeitwerk (2.2.2)
60
+ zeitwerk (2.4.0)
60
61
 
61
62
  PLATFORMS
62
63
  ruby
@@ -64,9 +65,10 @@ PLATFORMS
64
65
  DEPENDENCIES
65
66
  activerecord-explainer!
66
67
  bundler (~> 2.0)
67
- rake (~> 10.0)
68
+ rake (~> 13.0)
68
69
  rspec (~> 3.0)
69
70
  rubocop
71
+ sqlite3
70
72
 
71
73
  BUNDLED WITH
72
74
  2.1.4
@@ -30,6 +30,7 @@ Gem::Specification.new do |s|
30
30
  s.add_dependency 'activesupport', '>= 5.1'
31
31
 
32
32
  s.add_development_dependency 'bundler', '~> 2.0'
33
- s.add_development_dependency 'rake', '~> 10.0'
33
+ s.add_development_dependency 'rake', '~> 13.0'
34
34
  s.add_development_dependency 'rspec', '~> 3.0'
35
+ s.add_development_dependency 'sqlite3'
35
36
  end
@@ -7,7 +7,12 @@ module ActiveRecord
7
7
  payload = event.payload
8
8
  return if ignore_payload?(payload) || !ActiveRecord::Base.connection.supports_explain?
9
9
 
10
+ # Save `affected_rows` and restore after issuing EXPLAIN query because
11
+ # the query will resets `affected_rows` to 0.
12
+ original_affectet_rows = affected_rows
10
13
  debug exec_explain(sql: payload[:sql], binds: payload[:binds])
14
+ ensure
15
+ affectet_rows = original_affectet_rows
11
16
  end
12
17
 
13
18
  private
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Explainer
3
- VERSION = '0.2.3'.freeze
3
+ VERSION = '0.2.4'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-explainer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiyuki Hirano
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-05 00:00:00.000000000 Z
11
+ date: 2020-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '10.0'
61
+ version: '13.0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '10.0'
68
+ version: '13.0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: sqlite3
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description: This gem automatically logs SQL EXPLAIN of every queries. You can check
84
98
  naturally every SQL EXPLAIN from development log, without manually executions.
85
99
  email:
@@ -125,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
125
139
  - !ruby/object:Gem::Version
126
140
  version: 1.8.11
127
141
  requirements: []
128
- rubygems_version: 3.0.3
142
+ rubygems_version: 3.1.4
129
143
  signing_key:
130
144
  specification_version: 4
131
145
  summary: This gem automatically logs SQL EXPLAIN of every queries