dblint 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -0
- data/CHANGELOG.md +5 -0
- data/lib/dblint/checks/long_held_lock.rb +1 -1
- data/lib/dblint/rails_integration.rb +10 -1
- data/lib/dblint/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f5eacd08e69f907b7bcac11162a2ef2d270321
|
4
|
+
data.tar.gz: 1de50cef76aceccdaf9a7f4b5bc32839b90e3d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d61a6924fd91595b8f456332108c4ffdef1b20e4fb55b73ae79306f4fdff20db778cae8aab81d5bff7e8db394d50f393e30262aafe1628e7be371a5a5dcfeab
|
7
|
+
data.tar.gz: cd397ed2568760db4aafa1b66a2eb5f89d757691d0009147a272c74e511c0a9831b926a111cdc8bc30a599434a95b2d322ddae68cc0e4906f1faf110f04213b8
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 0.2.0 2016-07-29
|
4
|
+
|
5
|
+
* Rails 5 support [#2](https://github.com/lfittl/dblint/pull/2) [@ksykulev](https://github.com/ksykulev)
|
6
|
+
|
7
|
+
|
3
8
|
## 0.1.1 2016-04-27
|
4
9
|
|
5
10
|
* Fix handling of vendored gems [#1](https://github.com/lfittl/dblint/pull/1) [@ksykulev](https://github.com/ksykulev)
|
@@ -61,7 +61,7 @@ module Dblint
|
|
61
61
|
@existing_ids = {}
|
62
62
|
|
63
63
|
ActiveRecord::Base.connection.tables.each do |table|
|
64
|
-
next if table
|
64
|
+
next if %w(schema_migrations ar_internal_metadata).include?(table)
|
65
65
|
@existing_ids[table] = ActiveRecord::Base.connection.select_values("SELECT id FROM #{table}", 'DBLINT').map(&:to_i)
|
66
66
|
end
|
67
67
|
end
|
@@ -27,9 +27,18 @@ module Dblint
|
|
27
27
|
|
28
28
|
CHECKS.each do |check_klass|
|
29
29
|
check = check_instance_for_connection(payload[:connection_id], check_klass)
|
30
|
-
check.statement_finished(name, id, payload)
|
30
|
+
check.statement_finished(name, id, payload_from_version(ActiveRecord::VERSION::MAJOR, payload))
|
31
31
|
end
|
32
32
|
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def payload_from_version(version, payload)
|
37
|
+
return payload if version == 4
|
38
|
+
|
39
|
+
compatible_binds = payload[:binds].map { |bind| [bind, bind.value] }
|
40
|
+
payload.merge(binds: compatible_binds)
|
41
|
+
end
|
33
42
|
end
|
34
43
|
|
35
44
|
ActiveSupport::Notifications.subscribe('sql.active_record', RailsIntegration.new)
|
data/lib/dblint/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dblint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lukas Fittl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -179,6 +179,7 @@ files:
|
|
179
179
|
- CHANGELOG.md
|
180
180
|
- CODE_OF_CONDUCT.md
|
181
181
|
- Gemfile
|
182
|
+
- Gemfile.lock
|
182
183
|
- LICENSE.txt
|
183
184
|
- README.md
|
184
185
|
- Rakefile
|