spring_onion 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +14 -0
- data/.rspec +3 -0
- data/.rubocop.yml +63 -0
- data/.travis.yml +6 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +84 -0
- data/LICENSE.txt +21 -0
- data/README.md +77 -0
- data/Rakefile +8 -0
- data/lib/spring_onion.rb +14 -0
- data/lib/spring_onion/config.rb +76 -0
- data/lib/spring_onion/error.rb +6 -0
- data/lib/spring_onion/explainer.rb +54 -0
- data/lib/spring_onion/version.rb +5 -0
- data/spring_onion.gemspec +33 -0
- metadata +156 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: cfc3f0d5560a94e94ae9e4c0e4801b9a9a02e4fd9b5bb74b6b59d9569a6d8613
|
4
|
+
data.tar.gz: 1d12d7b4b1e984eb1b9c0383b0a82a49f79ee5d47e5ccb12b342a0182dda572d
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0eff35cb7949993b9161dae0d4d89b3714d513e8b6a80272c214e8a19d4b56381382fc52640773c324d896e0f7f2d9ea50ff992306cf6272506334d3f0ab5dbe
|
7
|
+
data.tar.gz: 1fcd2d6d57328bc7272cdff88626fd9396837faad035b6c5f1377687a97d502ea357798889b6011d6dcb68e59ad03b112ee08bb27ea7a3aceb2ce313fd074872
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
AllCops:
|
2
|
+
Exclude:
|
3
|
+
- "gemfiles/**/*"
|
4
|
+
TargetRubyVersion: 2.5
|
5
|
+
Style/Documentation:
|
6
|
+
Enabled: false
|
7
|
+
Style/TrailingCommaInHashLiteral:
|
8
|
+
EnforcedStyleForMultiline: consistent_comma
|
9
|
+
Metrics/AbcSize:
|
10
|
+
Enabled: false
|
11
|
+
Metrics/CyclomaticComplexity:
|
12
|
+
Enabled: false
|
13
|
+
Metrics/MethodLength:
|
14
|
+
Enabled: false
|
15
|
+
Layout/LineLength:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Layout/EmptyLinesAroundAttributeAccessor:
|
19
|
+
Enabled: true
|
20
|
+
Layout/SpaceAroundMethodCallOperator:
|
21
|
+
Enabled: true
|
22
|
+
Lint/DeprecatedOpenSSLConstant:
|
23
|
+
Enabled: true
|
24
|
+
Lint/DuplicateElsifCondition:
|
25
|
+
Enabled: true
|
26
|
+
Lint/MixedRegexpCaptureTypes:
|
27
|
+
Enabled: true
|
28
|
+
Lint/RaiseException:
|
29
|
+
Enabled: true
|
30
|
+
Lint/StructNewOverride:
|
31
|
+
Enabled: true
|
32
|
+
Style/AccessorGrouping:
|
33
|
+
Enabled: true
|
34
|
+
Style/ArrayCoercion:
|
35
|
+
Enabled: true
|
36
|
+
Style/BisectedAttrAccessor:
|
37
|
+
Enabled: true
|
38
|
+
Style/CaseLikeIf:
|
39
|
+
Enabled: true
|
40
|
+
Style/ExponentialNotation:
|
41
|
+
Enabled: true
|
42
|
+
Style/HashAsLastArrayItem:
|
43
|
+
Enabled: true
|
44
|
+
Style/HashEachMethods:
|
45
|
+
Enabled: true
|
46
|
+
Style/HashLikeCase:
|
47
|
+
Enabled: true
|
48
|
+
Style/HashTransformKeys:
|
49
|
+
Enabled: true
|
50
|
+
Style/HashTransformValues:
|
51
|
+
Enabled: true
|
52
|
+
Style/RedundantAssignment:
|
53
|
+
Enabled: true
|
54
|
+
Style/RedundantFetchBlock:
|
55
|
+
Enabled: true
|
56
|
+
Style/RedundantFileExtensionInRequire:
|
57
|
+
Enabled: true
|
58
|
+
Style/RedundantRegexpCharacterClass:
|
59
|
+
Enabled: true
|
60
|
+
Style/RedundantRegexpEscape:
|
61
|
+
Enabled: true
|
62
|
+
Style/SlicingWithRange:
|
63
|
+
Enabled: true
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
spring_onion (0.1.0)
|
5
|
+
activerecord
|
6
|
+
mysql2
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activemodel (6.0.3.2)
|
12
|
+
activesupport (= 6.0.3.2)
|
13
|
+
activerecord (6.0.3.2)
|
14
|
+
activemodel (= 6.0.3.2)
|
15
|
+
activesupport (= 6.0.3.2)
|
16
|
+
activesupport (6.0.3.2)
|
17
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
18
|
+
i18n (>= 0.7, < 2)
|
19
|
+
minitest (~> 5.1)
|
20
|
+
tzinfo (~> 1.1)
|
21
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
22
|
+
appraisal (2.3.0)
|
23
|
+
bundler
|
24
|
+
rake
|
25
|
+
thor (>= 0.14.0)
|
26
|
+
ast (2.4.1)
|
27
|
+
concurrent-ruby (1.1.6)
|
28
|
+
diff-lcs (1.4.4)
|
29
|
+
i18n (1.8.3)
|
30
|
+
concurrent-ruby (~> 1.0)
|
31
|
+
minitest (5.14.1)
|
32
|
+
mysql2 (0.5.3)
|
33
|
+
parallel (1.19.2)
|
34
|
+
parser (2.7.1.4)
|
35
|
+
ast (~> 2.4.1)
|
36
|
+
rainbow (3.0.0)
|
37
|
+
rake (12.3.3)
|
38
|
+
regexp_parser (1.7.1)
|
39
|
+
rexml (3.2.4)
|
40
|
+
rspec (3.9.0)
|
41
|
+
rspec-core (~> 3.9.0)
|
42
|
+
rspec-expectations (~> 3.9.0)
|
43
|
+
rspec-mocks (~> 3.9.0)
|
44
|
+
rspec-core (3.9.2)
|
45
|
+
rspec-support (~> 3.9.3)
|
46
|
+
rspec-expectations (3.9.2)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.9.0)
|
49
|
+
rspec-mocks (3.9.1)
|
50
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
51
|
+
rspec-support (~> 3.9.0)
|
52
|
+
rspec-support (3.9.3)
|
53
|
+
rubocop (0.88.0)
|
54
|
+
parallel (~> 1.10)
|
55
|
+
parser (>= 2.7.1.1)
|
56
|
+
rainbow (>= 2.2.2, < 4.0)
|
57
|
+
regexp_parser (>= 1.7)
|
58
|
+
rexml
|
59
|
+
rubocop-ast (>= 0.1.0, < 1.0)
|
60
|
+
ruby-progressbar (~> 1.7)
|
61
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
62
|
+
rubocop-ast (0.1.0)
|
63
|
+
parser (>= 2.7.0.1)
|
64
|
+
ruby-progressbar (1.10.1)
|
65
|
+
thor (1.0.1)
|
66
|
+
thread_safe (0.3.6)
|
67
|
+
tzinfo (1.2.7)
|
68
|
+
thread_safe (~> 0.1)
|
69
|
+
unicode-display_width (1.7.0)
|
70
|
+
zeitwerk (2.4.0)
|
71
|
+
|
72
|
+
PLATFORMS
|
73
|
+
ruby
|
74
|
+
|
75
|
+
DEPENDENCIES
|
76
|
+
appraisal
|
77
|
+
bundler
|
78
|
+
rake (~> 12.0)
|
79
|
+
rspec (~> 3.0)
|
80
|
+
rubocop
|
81
|
+
spring_onion!
|
82
|
+
|
83
|
+
BUNDLED WITH
|
84
|
+
2.1.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 winebarrel
|
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,77 @@
|
|
1
|
+
# SpringOnion
|
2
|
+
|
3
|
+
Log MySQL queries with EXPLAIN that may be slow.
|
4
|
+
Inspired by [MySQLCasualLog.pm](https://gist.github.com/kamipo/839e8a5b6d12bddba539).
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add this line to your application's Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'spring_onion'
|
12
|
+
```
|
13
|
+
|
14
|
+
And then execute:
|
15
|
+
|
16
|
+
$ bundle install
|
17
|
+
|
18
|
+
Or install it yourself as:
|
19
|
+
|
20
|
+
$ gem install spring_onion
|
21
|
+
|
22
|
+
## Usage
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
#!/usr/bin/env ruby
|
26
|
+
require 'active_record'
|
27
|
+
require 'spring_onion'
|
28
|
+
require 'logger'
|
29
|
+
|
30
|
+
ActiveRecord::Base.establish_connection(
|
31
|
+
adapter: 'mysql2',
|
32
|
+
username: 'root',
|
33
|
+
database: 'employees',
|
34
|
+
)
|
35
|
+
|
36
|
+
SpringOnion.enabled = true
|
37
|
+
SpringOnion.connection = ActiveRecord::Base.connection.raw_connection
|
38
|
+
SpringOnion.source_filter_re = //
|
39
|
+
|
40
|
+
class Employee < ActiveRecord::Base; end
|
41
|
+
|
42
|
+
Employee.all.to_a.count
|
43
|
+
#=> SpringOnion INFO 2020-07-18 01:53:27 +0900 {"sql":"SELECT `employees`.* FROM `employees`","explain":[{"line":1,"select_type":"SIMPLE","table":"employees","partitions":null,"type":"ALL","possible_keys":null,"key":null,"key_len":null,"ref":null,"rows":298936,"filtered":100.0,"Extra":null}],"violations":{"line 1":["slow_type"]},"backtrace":["/foo/bar/zoo/baz.rb:18:in `\u003ctop (required)\u003e'"]}
|
44
|
+
#=> 300024
|
45
|
+
```
|
46
|
+
|
47
|
+
## Log Output
|
48
|
+
|
49
|
+
```json
|
50
|
+
{
|
51
|
+
"sql": "SELECT `employees`.* FROM `employees`",
|
52
|
+
"explain": [
|
53
|
+
{
|
54
|
+
"line": 1,
|
55
|
+
"select_type": "SIMPLE",
|
56
|
+
"table": "employees",
|
57
|
+
"partitions": null,
|
58
|
+
"type": "ALL",
|
59
|
+
"possible_keys": null,
|
60
|
+
"key": null,
|
61
|
+
"key_len": null,
|
62
|
+
"ref": null,
|
63
|
+
"rows":298936,
|
64
|
+
"filtered": 100.0,
|
65
|
+
"Extra": null
|
66
|
+
}
|
67
|
+
],
|
68
|
+
"violations": {
|
69
|
+
"line 1": [
|
70
|
+
"slow_type"
|
71
|
+
]
|
72
|
+
},
|
73
|
+
"backtrace": [
|
74
|
+
"/foo/bar/zoo/baz.rb:18:in `\u003ctop (required)\u003e'"
|
75
|
+
]
|
76
|
+
}
|
77
|
+
```
|
data/Rakefile
ADDED
data/lib/spring_onion.rb
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'logger'
|
4
|
+
require 'active_support'
|
5
|
+
|
6
|
+
require 'spring_onion/config'
|
7
|
+
require 'spring_onion/error'
|
8
|
+
require 'spring_onion/explainer'
|
9
|
+
require 'spring_onion/version'
|
10
|
+
|
11
|
+
ActiveSupport.on_load :active_record do
|
12
|
+
require 'active_record/connection_adapters/abstract_mysql_adapter'
|
13
|
+
ActiveRecord::ConnectionAdapters::AbstractMysqlAdapter.prepend SpringOnion::Explainer
|
14
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SpringOnion
|
4
|
+
SLOW_SELECT_TYPE_RE = Regexp.union(
|
5
|
+
'DEPENDENT UNION',
|
6
|
+
'DEPENDENT SUBQUERY',
|
7
|
+
'UNCACHEABLE UNION',
|
8
|
+
'UNCACHEABLE SUBQUERY'
|
9
|
+
)
|
10
|
+
|
11
|
+
SLOW_TYPE_RE = Regexp.union('index', 'ALL')
|
12
|
+
SLOW_POSSIBLE_KEYS_RE = Regexp.union('NULL')
|
13
|
+
SLOW_KEY_RE = Regexp.union('NULL')
|
14
|
+
|
15
|
+
SLOW_EXTRA_RE = Regexp.union(
|
16
|
+
'Using filesort',
|
17
|
+
'Using temporary'
|
18
|
+
)
|
19
|
+
|
20
|
+
@violations = {
|
21
|
+
slow_select_type: ->(exp) { SLOW_SELECT_TYPE_RE =~ exp['select_type'] },
|
22
|
+
slow_type: ->(exp) { SLOW_TYPE_RE =~ exp['type'] },
|
23
|
+
slow_possible_keys: ->(exp) { SLOW_POSSIBLE_KEYS_RE =~ exp['possible_keys'] },
|
24
|
+
slow_key: ->(exp) { SLOW_KEY_RE =~ exp['key'] },
|
25
|
+
slow_extra: ->(exp) { SLOW_EXTRA_RE =~ exp['Extra'] },
|
26
|
+
}
|
27
|
+
|
28
|
+
@enabled = ENV.fetch('SPRING_ONION_ENABLED', '') =~ /\A(1|true)\z/i
|
29
|
+
|
30
|
+
@sql_filter_re = if ENV.fetch('SPRING_ONION_SQL_FILTER_RE', '').empty?
|
31
|
+
//
|
32
|
+
else
|
33
|
+
Regexp.new(ENV['SPRING_ONION_SQL_FILTER_RE'])
|
34
|
+
end
|
35
|
+
|
36
|
+
@ignore_sql_filter_re = Regexp.union(
|
37
|
+
/\binformation_schema\b/,
|
38
|
+
*(ENV.fetch('SPRING_ONION_IGNORE_SQL_FILTER_RE', '').empty? ? nil : Regexp.new(ENV['SPRING_ONION_IGNORE_SQL_FILTER_RE']))
|
39
|
+
)
|
40
|
+
|
41
|
+
@sql_filter = lambda do |sql|
|
42
|
+
@ignore_sql_filter_re !~ sql && @sql_filter_re =~ sql
|
43
|
+
end
|
44
|
+
|
45
|
+
@source_filter_re = Regexp.union(
|
46
|
+
%r{/app/},
|
47
|
+
*(ENV.fetch('SPRING_ONION_SOURCE_FILTER_RE', '').empty? ? nil : Regexp.new(ENV['SPRING_ONION_SOURCE_FILTER_RE']))
|
48
|
+
)
|
49
|
+
|
50
|
+
@ignore_source_filter_re = Regexp.union(
|
51
|
+
Regexp.union(RbConfig::TOPDIR, *Gem.path),
|
52
|
+
*(ENV.fetch('SPRING_ONION_IGNORE_SOURCE_FILTER_RE', '').empty? ? nil : Regexp.new(ENV['SPRING_ONION_IGNORE_SOURCE_FILTER_RE']))
|
53
|
+
)
|
54
|
+
|
55
|
+
@source_filter = lambda do |backtrace_lines|
|
56
|
+
backtrace_lines.grep_v(@ignore_source_filter_re).grep(@source_filter_re)
|
57
|
+
end
|
58
|
+
|
59
|
+
@logger = Logger.new($stdout).tap do |logger|
|
60
|
+
logger.formatter = lambda { |severity, datetime, _progname, msg|
|
61
|
+
"\n#{self}\t#{severity}\t#{datetime}\t#{msg}\n"
|
62
|
+
}
|
63
|
+
end
|
64
|
+
|
65
|
+
@trace_len = 3
|
66
|
+
|
67
|
+
class << self
|
68
|
+
attr_accessor :enabled,
|
69
|
+
:connection,
|
70
|
+
:violations,
|
71
|
+
:sql_filter_re, :ignore_sql_filter_re, :sql_filter,
|
72
|
+
:source_filter_re, :ignore_source_filter_re, :source_filter,
|
73
|
+
:logger,
|
74
|
+
:trace_len
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module SpringOnion
|
4
|
+
module Explainer
|
5
|
+
def execute(*args)
|
6
|
+
_with_explain(args.first) do
|
7
|
+
super
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
def _with_explain(sql)
|
12
|
+
begin
|
13
|
+
if SpringOnion.enabled && sql =~ /^SELECT\b/ && SpringOnion.sql_filter.call(sql)
|
14
|
+
trace = SpringOnion.source_filter.call(caller)
|
15
|
+
|
16
|
+
unless trace.length.zero?
|
17
|
+
conn = SpringOnion.connection
|
18
|
+
raise SpringOnion::Error, 'MySQL connection is not set' unless conn
|
19
|
+
|
20
|
+
exp = conn.query("EXPLAIN #{sql}", as: :hash).to_a
|
21
|
+
exp.each { |r| r.delete('id') }
|
22
|
+
_validate(exp, sql, trace)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
rescue StandardError => e
|
26
|
+
SpringOnion.logger.error(e)
|
27
|
+
end
|
28
|
+
|
29
|
+
yield
|
30
|
+
end
|
31
|
+
|
32
|
+
def _validate(exp, sql, trace)
|
33
|
+
violations = SpringOnion.violations
|
34
|
+
violation_names_by_line = {}
|
35
|
+
|
36
|
+
exp.each_with_index do |row, i|
|
37
|
+
violation_names = violations.select do |_name, validator|
|
38
|
+
validator.call(row)
|
39
|
+
end.keys
|
40
|
+
|
41
|
+
violation_names_by_line["line #{i + 1}"] = violation_names unless violation_names.empty?
|
42
|
+
end
|
43
|
+
|
44
|
+
return if violation_names_by_line.empty?
|
45
|
+
|
46
|
+
SpringOnion.logger.info({
|
47
|
+
sql: sql,
|
48
|
+
explain: exp.each_with_index.map { |r, i| { line: i + 1 }.merge(r) },
|
49
|
+
violations: violation_names_by_line,
|
50
|
+
backtrace: trace.slice(0, SpringOnion.trace_len),
|
51
|
+
}.to_json)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/spring_onion/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'spring_onion'
|
7
|
+
spec.version = SpringOnion::VERSION
|
8
|
+
spec.authors = ['winebarrel']
|
9
|
+
spec.email = ['sugawara@winebarrel.jp']
|
10
|
+
|
11
|
+
spec.summary = 'Log MySQL queries with EXPLAIN that may be slow.'
|
12
|
+
spec.description = 'Log MySQL queries with EXPLAIN that may be slow.'
|
13
|
+
spec.homepage = 'https://github.com/winebarrel/spring_onion'
|
14
|
+
spec.license = 'MIT'
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
16
|
+
|
17
|
+
# Specify which files should be added to the gem when it is released.
|
18
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
19
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
20
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
21
|
+
end
|
22
|
+
spec.bindir = 'exe'
|
23
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
|
+
spec.require_paths = ['lib']
|
25
|
+
|
26
|
+
spec.add_dependency 'activerecord'
|
27
|
+
spec.add_dependency 'mysql2'
|
28
|
+
spec.add_development_dependency 'appraisal'
|
29
|
+
spec.add_development_dependency 'bundler'
|
30
|
+
spec.add_development_dependency 'rake'
|
31
|
+
spec.add_development_dependency 'rspec'
|
32
|
+
spec.add_development_dependency 'rubocop'
|
33
|
+
end
|
metadata
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: spring_onion
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- winebarrel
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-17 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: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mysql2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: appraisal
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
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: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '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: '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'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
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
|
+
description: Log MySQL queries with EXPLAIN that may be slow.
|
112
|
+
email:
|
113
|
+
- sugawara@winebarrel.jp
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- ".rubocop.yml"
|
121
|
+
- ".travis.yml"
|
122
|
+
- Gemfile
|
123
|
+
- Gemfile.lock
|
124
|
+
- LICENSE.txt
|
125
|
+
- README.md
|
126
|
+
- Rakefile
|
127
|
+
- lib/spring_onion.rb
|
128
|
+
- lib/spring_onion/config.rb
|
129
|
+
- lib/spring_onion/error.rb
|
130
|
+
- lib/spring_onion/explainer.rb
|
131
|
+
- lib/spring_onion/version.rb
|
132
|
+
- spring_onion.gemspec
|
133
|
+
homepage: https://github.com/winebarrel/spring_onion
|
134
|
+
licenses:
|
135
|
+
- MIT
|
136
|
+
metadata: {}
|
137
|
+
post_install_message:
|
138
|
+
rdoc_options: []
|
139
|
+
require_paths:
|
140
|
+
- lib
|
141
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 2.3.0
|
146
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - ">="
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
requirements: []
|
152
|
+
rubygems_version: 3.0.3
|
153
|
+
signing_key:
|
154
|
+
specification_version: 4
|
155
|
+
summary: Log MySQL queries with EXPLAIN that may be slow.
|
156
|
+
test_files: []
|