spring_onion 0.2.4 → 0.2.5

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: c1595c8062e3c68c43d22fcdef65de9009563866bc376e6e3fc38ad271be8570
4
- data.tar.gz: fed541d24b204eb19329cd912322c03703ba0783988d6b9549bbd4226ee0b70b
3
+ metadata.gz: b40885dd3b876b902fa6670cde6f312362239a5d65da300297f9240cee05afbc
4
+ data.tar.gz: 3193d9ab4417169c380bb9fe1bf788752b4f347d9c0bdb34b5237a9f5e2c674f
5
5
  SHA512:
6
- metadata.gz: 16c450c694a7379b03eb2d09652b1189ad96d243a3d0608e7506aa78ea01916f4896b7fbbbf025deeda7bf643c75846d50ae4612197f91b2d979b97a849cce61
7
- data.tar.gz: eaf72fcb1ad6c1fc4ecb76fc7b28bbd7f0e6c4a2921f4c321405c0aca86f8433035fd3b019b28a74fce8827dfce7b5d6608556f73ac90cb821b9cfaf30d83414
6
+ metadata.gz: e1f37308e5b4dbc00112b4cc7e12a1060fe4c39a8dbb379bb5d10bf3c689151d590095a39e4f732c236993f19efccd8b624bd5baf7f162c3422646f49a377728
7
+ data.tar.gz: 73aafec72dad64c8e54daa129dd65bbd419f7dc013b94da830228825211a2e3693627185c5e9f50f02b4217f24a244feec7a324a14267c32f0e063c7149febb2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spring_onion (0.2.4)
4
+ spring_onion (0.2.5)
5
5
  activerecord
6
6
  coderay
7
7
  mysql2
@@ -3,14 +3,14 @@
3
3
  module SpringOnion
4
4
  module Explainer
5
5
  def execute(*args)
6
- _with_explain(args.first) do
6
+ _with_explain(sql: args.first) do
7
7
  super
8
8
  end
9
9
  end
10
10
 
11
11
  private
12
12
 
13
- def _with_explain(sql)
13
+ def _with_explain(sql:)
14
14
  begin
15
15
  if SpringOnion.enabled && sql =~ /\A\s*SELECT\b/i && SpringOnion.sql_filter.call(sql)
16
16
  trace = SpringOnion.source_filter.call(caller)
@@ -21,7 +21,7 @@ module SpringOnion
21
21
 
22
22
  exp = conn.query("EXPLAIN #{sql}", as: :hash).to_a
23
23
  exp.each { |r| r.delete('id') }
24
- _validate_explain(exp, sql, trace)
24
+ _validate_explain(sql: sql, exp: exp, trace: trace)
25
25
  end
26
26
  end
27
27
  rescue StandardError => e
@@ -31,7 +31,7 @@ module SpringOnion
31
31
  yield
32
32
  end
33
33
 
34
- def _validate_explain(exp, sql, trace)
34
+ def _validate_explain(sql:, exp:, trace:)
35
35
  warnings = SpringOnion.warnings
36
36
  warning_names_by_index = {}
37
37
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpringOnion
4
- VERSION = '0.2.4'
4
+ VERSION = '0.2.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spring_onion
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel