dblint 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a456608b04d3132f18e4c9de00ab708d799e0373
4
+ data.tar.gz: 17a007e706e33f5d7a72406d8c98dfebe3783c8d
5
+ SHA512:
6
+ metadata.gz: fe6ca2ea60ab241e5e680751ad05c96bf58045f0a0fa947812f4add848264dbc3f55adade3e92b041715d2a252ec6a1d5a34b074603998373124518c5f836caf
7
+ data.tar.gz: 838612d7f6f26f839228a115c5168ff00dc23ee9098de039dfa5c098e7f3164f31b38d3f4f15fddd62e166eed72ab92e374f5ae4f52fef4f0f8b1fd73e405a5a
data/.env.example ADDED
@@ -0,0 +1 @@
1
+ DATABASE_URL=postgresql://user@localhost:5432/dblint
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /.env
4
+ /Gemfile.lock
5
+ /_yardoc/
6
+ /coverage/
7
+ /doc/
8
+ /pkg/
9
+ /spec/reports/
10
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,26 @@
1
+ require: rubocop-rspec
2
+
3
+ AllCops:
4
+ Exclude:
5
+ - spec/**/*
6
+
7
+ Documentation:
8
+ Enabled: false
9
+
10
+ LineLength:
11
+ Enabled: false
12
+
13
+ MethodLength:
14
+ Enabled: false
15
+
16
+ ClassLength:
17
+ Enabled: false
18
+
19
+ Metrics/BlockNesting:
20
+ Enabled: false
21
+
22
+ Metrics/AbcSize:
23
+ Enabled: false
24
+
25
+ Style/ModuleFunction:
26
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2.0
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Lukas Fittl
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,91 @@
1
+ # dblint [ ![Codeship Status for lfittl/dblint](https://img.shields.io/codeship/db703270-cfa3-0132-a2bb-623bdb9b8d89.svg)](https://codeship.com/projects/76752)
2
+
3
+ Automatically checks all SQL queries that are executed during your tests, to find common mistakes, including missing indices and locking issues due to long transactions.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'dblint', group: :test
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ ## Usage
18
+
19
+ Run your tests as usual, `dblint` will raise an exception or output a warning should it detect a problem.
20
+
21
+ Note that it will check the callstack for the problematic query, and only count it as an error if the callstack first line from within your app is not the `test` or `spec` directory. Therefore, should you use non-optimized code directly in your tests (e.g. as part of a factory), `dblint` will not raise an error.
22
+
23
+ ## Missing indices
24
+
25
+ `dblint` will find SELECT queries that might be missing an index:
26
+
27
+ ```
28
+ Failures:
29
+
30
+ 1) FeedsController#show
31
+ Failure/Error: get :show, format: :atom
32
+ Dblint::Checks::MissingIndex::Error:
33
+ Missing index on oauth_applications for '((twitter_app_name)::text = 'My Feed App'::text)' in 'SELECT "oauth_applications".* FROM "oauth_applications" WHERE "oauth_applications"."twitter_app_name" = $1 LIMIT 1', called by app/controllers/feeds_controller.rb:6:in `show'
34
+ # ./app/controllers/feeds_controller.rb:6:in `show'
35
+ # ./spec/controllers/feeds_controller_spec.rb:12:in `block (3 levels) in <top (required)>'
36
+ # ./spec/spec_helper.rb:78:in `block (2 levels) in <top (required)>'
37
+ ```
38
+
39
+ This is done by `EXPLAIN`ing every SELECT statement run during your tests, and checking whether the execution plan contains a Sequential Scan that is filtered by a condition. Thus, if you were to do a count of all records, this check would not trigger.
40
+
41
+ Nonetheless, there might still be false positives or simply cases where you don't want an index - use the ignore list in those cases.
42
+
43
+ Note: `EXPLAIN` is run with `enable_seqscan = off` in order to avoid seeing a false positive Sequential Scan on indexed, but small tables (likely to happen with tests).
44
+
45
+ ## Long held locks
46
+
47
+ `dblint` will find long held locks in database transactions, causing delays and possibly deadlocks:
48
+
49
+ ```
50
+ 1) Invites::AcceptInvite test
51
+ Failure/Error: described_class.call(user: invited_user)
52
+ Dblint::LongHeldLock:
53
+ Lock on ["users", 3] held for 29 statements (0.13 ms) by 'UPDATE "users" SET "invited_by_id" = $1, "role" = $2, "updated_at" = $3 WHERE "users"."id" = $4', transaction started by app/services/invites/accept_invite.rb:20:in `run'
54
+ # ./app/services/invites/accept_invite.rb:20:in `run'
55
+ # ./app/services/invites/accept_invite.rb:7:in `call'
56
+ # ./spec/services/invites/accept_invite_spec.rb:8:in `accept_invite'
57
+ # ./spec/services/invites/accept_invite_spec.rb:64:in `block (3 levels) in <top (required)>'
58
+ # ./spec/spec_helper.rb:78:in `block (2 levels) in <top (required)>'
59
+ ```
60
+
61
+ In this case it means that the `users` row has been locked for 29 statements (which took `0.13ms` in test, but this would be much more on any cloud setup), which can lead to lock contention issues on the `users` table, assuming other transactions are also updating that same row.
62
+
63
+ The correct fix for this depends on whether this is in user written code (i.e. a manual `ActiveRecord::Base.transaction` call), or caused by Rails built-ins like `touch: true` and `counter_cache: true`. In general you want to move that `UPDATE` to happen towards the end of the transaction, or move it completely outside (if you don't need the atomicity guarantee of the transaction).
64
+
65
+ Note: Right now the lock check can't detect possible problems caused by non-DB activities (e.g. updating your search index inside the transaction).
66
+
67
+ ## Ignoring false positives
68
+
69
+ Since in some cases there might be a valid reason to not have an index, or to hold a lock for longer,
70
+ you can add ignores to the `.dblint.yml` file like this:
71
+
72
+ ```
73
+ IgnoreList:
74
+ MissingIndex:
75
+ # Explain why you ignore it
76
+ - app/models/my_model.rb:20:in `load'
77
+ LongHeldLock:
78
+ # Explain why you ignore it
79
+ - app/models/my_model.rb:20:in `load'
80
+ ```
81
+
82
+ The line you need to add is the first caller in the callstack from your main
83
+ application, also included in the error message for the check.
84
+
85
+ ## Contributing
86
+
87
+ 1. Fork it ( https://github.com/lfittl/dblint/fork )
88
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
89
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
90
+ 4. Push to the branch (`git push origin my-new-feature`)
91
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,11 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+ require 'rubocop/rake_task'
4
+ require 'dotenv/tasks'
5
+
6
+ RSpec::Core::RakeTask.new
7
+ RuboCop::RakeTask.new
8
+
9
+ task default: [:lint, :spec]
10
+ task test: :spec
11
+ task lint: :rubocop
data/dblint.gemspec ADDED
@@ -0,0 +1,31 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dblint/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'dblint'
8
+ spec.version = Dblint::VERSION
9
+ spec.authors = ['Lukas Fittl']
10
+ spec.email = ['lukas@fittl.com']
11
+
12
+ spec.summary = 'Automatically tests your Rails app for common database query mistakes'
13
+ spec.homepage = 'https://github.com/lfittl/dblint'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.require_paths = ['lib']
18
+
19
+ spec.add_runtime_dependency 'activerecord', '>= 4.0'
20
+ spec.add_runtime_dependency 'railties', '>= 4.0'
21
+ spec.add_runtime_dependency 'pg'
22
+
23
+ spec.add_development_dependency 'bundler', '~> 1.9'
24
+ spec.add_development_dependency 'rake', '~> 10.0'
25
+ spec.add_development_dependency 'rspec', '~> 3'
26
+ spec.add_development_dependency 'rspec-rails'
27
+ spec.add_development_dependency 'sqlite3'
28
+ spec.add_development_dependency 'dotenv'
29
+ spec.add_development_dependency 'rubocop', '~> 0.30'
30
+ spec.add_development_dependency 'rubocop-rspec'
31
+ end
@@ -0,0 +1,33 @@
1
+ require 'active_support/core_ext/string/inflections'
2
+
3
+ module Dblint
4
+ module Checks
5
+ class Base
6
+ def check_name
7
+ self.class.name.demodulize
8
+ end
9
+
10
+ def find_main_app_caller(callstack)
11
+ main_app_caller = callstack.find { |f| f.start_with?(Rails.root.to_s) }
12
+ main_app_caller.slice!(Rails.root.to_s + '/')
13
+ main_app_dir = main_app_caller[/^\w+/]
14
+ return if %w(spec test).include?(main_app_dir)
15
+ main_app_caller
16
+ end
17
+
18
+ def ignored?(main_app_caller)
19
+ return false unless config && config['IgnoreList']
20
+
21
+ ignores = config['IgnoreList'][check_name]
22
+ ignores.present? && ignores.include?(main_app_caller)
23
+ end
24
+
25
+ def config
26
+ @config ||= begin
27
+ config_file = Rails.root.join('.dblint.yml')
28
+ YAML.load(File.read(config_file)) if File.exist?(config_file)
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,94 @@
1
+ module Dblint
2
+ module Checks
3
+ class LongHeldLock < Base
4
+ class Error < StandardError; end
5
+
6
+ def initialize
7
+ @locks_held = {}
8
+ @existing_ids = {}
9
+ end
10
+
11
+ def statement_started(_name, _id, _payload)
12
+ # Ignored
13
+ end
14
+
15
+ def statement_finished(_name, _id, payload)
16
+ if payload[:sql] == 'BEGIN'
17
+ handle_begin
18
+ elsif payload[:sql] == 'COMMIT'
19
+ handle_commit
20
+ elsif payload[:sql] == 'ROLLBACK'
21
+ # do nothing
22
+ elsif @existing_ids.present?
23
+ increment_locks_held
24
+ add_new_locks_held(payload)
25
+ end
26
+ end
27
+
28
+ private
29
+
30
+ def increment_locks_held
31
+ @locks_held.each do |_, lock|
32
+ lock[:count] += 1
33
+ end
34
+ end
35
+
36
+ def add_new_locks_held(payload)
37
+ locked_table = payload[:sql].match(/^UPDATE\s+"?([\w.]+)"?/i).try(:[], 1)
38
+
39
+ return unless locked_table.present?
40
+
41
+ bind = payload[:binds].find { |b| b[0].name == 'id' }
42
+ return unless bind.present?
43
+
44
+ tuple = [locked_table, bind[1]]
45
+
46
+ # We only want tuples that were not created in this transaction
47
+ existing_ids = @existing_ids[tuple[0]]
48
+ return unless existing_ids.present? && existing_ids.include?(tuple[1])
49
+
50
+ # We've done two UPDATEs to the same row in this transaction
51
+ return if @locks_held[tuple].present?
52
+
53
+ @locks_held[tuple] = {}
54
+ @locks_held[tuple][:sql] = payload[:sql]
55
+ @locks_held[tuple][:count] = 0
56
+ @locks_held[tuple][:started_at] = Time.now
57
+ end
58
+
59
+ def handle_begin
60
+ @locks_held = {}
61
+ @existing_ids = {}
62
+
63
+ ActiveRecord::Base.connection.tables.each do |table|
64
+ next if table == 'schema_migrations'
65
+ @existing_ids[table] = ActiveRecord::Base.connection.select_values("SELECT id FROM #{table}", 'DBLINT').map(&:to_i)
66
+ end
67
+ end
68
+
69
+ def handle_commit
70
+ @locks_held.each do |table, details|
71
+ next if details[:count] < 10
72
+
73
+ main_app_caller = find_main_app_caller(caller)
74
+ next unless main_app_caller.present?
75
+
76
+ next if ignored?(main_app_caller)
77
+
78
+ error_msg = format("Lock on %s held for %d statements (%0.2f ms) by '%s', transaction started by %s",
79
+ table.inspect, details[:count], Time.now - details[:started_at], details[:sql],
80
+ main_app_caller)
81
+
82
+ next unless details[:count] > 15
83
+
84
+ # We need an explicit begin here since we're interrupting the transaction flow
85
+ ActiveRecord::Base.connection.execute('BEGIN')
86
+ fail Error, error_msg
87
+
88
+ # TODO: Add a config setting for enabling this as a warning
89
+ # puts format('Warning: %s', error_msg)
90
+ end
91
+ end
92
+ end
93
+ end
94
+ end
@@ -0,0 +1,46 @@
1
+ module Dblint
2
+ module Checks
3
+ class MissingIndex < Base
4
+ class Error < StandardError; end
5
+
6
+ def statement_started(_name, _id, payload)
7
+ return if payload[:sql].include?(';')
8
+ return unless payload[:sql].starts_with?('SELECT')
9
+
10
+ ActiveRecord::Base.connection.execute 'SET enable_seqscan = off', 'DBLINT'
11
+ plan = explain(payload)
12
+ raise_on_seqscan(plan[0]['Plan'], payload)
13
+ ActiveRecord::Base.connection.execute 'SET enable_seqscan = on', 'DBLINT'
14
+ end
15
+
16
+ def statement_finished(_name, _id, _payload)
17
+ # Ignored
18
+ end
19
+
20
+ private
21
+
22
+ def explain(payload)
23
+ plan = ActiveRecord::Base.connection.select_value(format('EXPLAIN (FORMAT JSON) %s', payload[:sql]),
24
+ 'DBLINT', payload[:binds])
25
+ JSON.parse(plan)
26
+ end
27
+
28
+ def raise_on_seqscan(plan, payload)
29
+ if plan['Node Type'] == 'Seq Scan' && plan['Filter'].present?
30
+ main_app_caller = find_main_app_caller(caller)
31
+ return unless main_app_caller.present?
32
+
33
+ return if ignored?(main_app_caller)
34
+
35
+ error_msg = format("Missing index on %s for '%s' in '%s', called by %s",
36
+ plan['Relation Name'], plan['Filter'], payload[:sql], main_app_caller)
37
+ fail Error, error_msg
38
+ end
39
+
40
+ (plan['Plans'] || []).each do |subplan|
41
+ raise_on_seqscan(subplan, payload)
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,36 @@
1
+ require 'active_support/notifications'
2
+
3
+ module Dblint
4
+ class RailsIntegration
5
+ CHECKS = [
6
+ Dblint::Checks::LongHeldLock,
7
+ Dblint::Checks::MissingIndex
8
+ ]
9
+
10
+ def check_instance_for_connection(connid, klass)
11
+ @checks ||= {}
12
+ @checks[connid] ||= {}
13
+ @checks[connid][klass] ||= klass.new
14
+ end
15
+
16
+ def start(name, id, payload)
17
+ return if %w(CACHE DBLINT SCHEMA).include?(payload[:name])
18
+
19
+ CHECKS.each do |check_klass|
20
+ check = check_instance_for_connection(payload[:connection_id], check_klass)
21
+ check.statement_started(name, id, payload)
22
+ end
23
+ end
24
+
25
+ def finish(name, id, payload)
26
+ return if %w(CACHE DBLINT SCHEMA).include?(payload[:name])
27
+
28
+ CHECKS.each do |check_klass|
29
+ check = check_instance_for_connection(payload[:connection_id], check_klass)
30
+ check.statement_finished(name, id, payload)
31
+ end
32
+ end
33
+ end
34
+
35
+ ActiveSupport::Notifications.subscribe('sql.active_record', RailsIntegration.new)
36
+ end
@@ -0,0 +1,3 @@
1
+ module Dblint
2
+ VERSION = '0.1.0'
3
+ end
data/lib/dblint.rb ADDED
@@ -0,0 +1,9 @@
1
+ require 'active_record'
2
+
3
+ require 'dblint/version'
4
+
5
+ require 'dblint/checks/base'
6
+ require 'dblint/checks/long_held_lock'
7
+ require 'dblint/checks/missing_index'
8
+
9
+ require 'dblint/rails_integration'
metadata ADDED
@@ -0,0 +1,215 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dblint
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Lukas Fittl
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-05-04 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: activerecord
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '4.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '4.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: railties
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pg
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.9'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.9'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rspec-rails
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sqlite3
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: dotenv
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rubocop
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: '0.30'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: '0.30'
153
+ - !ruby/object:Gem::Dependency
154
+ name: rubocop-rspec
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description:
168
+ email:
169
+ - lukas@fittl.com
170
+ executables: []
171
+ extensions: []
172
+ extra_rdoc_files: []
173
+ files:
174
+ - ".env.example"
175
+ - ".gitignore"
176
+ - ".rspec"
177
+ - ".rubocop.yml"
178
+ - ".travis.yml"
179
+ - CODE_OF_CONDUCT.md
180
+ - Gemfile
181
+ - LICENSE.txt
182
+ - README.md
183
+ - Rakefile
184
+ - dblint.gemspec
185
+ - lib/dblint.rb
186
+ - lib/dblint/checks/base.rb
187
+ - lib/dblint/checks/long_held_lock.rb
188
+ - lib/dblint/checks/missing_index.rb
189
+ - lib/dblint/rails_integration.rb
190
+ - lib/dblint/version.rb
191
+ homepage: https://github.com/lfittl/dblint
192
+ licenses:
193
+ - MIT
194
+ metadata: {}
195
+ post_install_message:
196
+ rdoc_options: []
197
+ require_paths:
198
+ - lib
199
+ required_ruby_version: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ required_rubygems_version: !ruby/object:Gem::Requirement
205
+ requirements:
206
+ - - ">="
207
+ - !ruby/object:Gem::Version
208
+ version: '0'
209
+ requirements: []
210
+ rubyforge_project:
211
+ rubygems_version: 2.4.5
212
+ signing_key:
213
+ specification_version: 4
214
+ summary: Automatically tests your Rails app for common database query mistakes
215
+ test_files: []