spring_onion 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/spring_onion/config.rb +3 -6
- data/lib/spring_onion/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f81f2b07f2a586b8e02444106908d6d8eb8631d772db5bff80dd0fa6ee72b550
|
4
|
+
data.tar.gz: 0e23da7945c119c5c5dcf90f2ead4985647536d0c7f3cb091b47e8f2c94ae168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 115c03712806b8b97d9ff1e65f512db06e8ebc9f4e555b743d97c57b9159c58dc4f43410b7fb73db178a584425e22b403f6005ed3be6cb9a01c57b3295c686e3
|
7
|
+
data.tar.gz: 4aa1951677c97b2fa2b45e2eeb3d49b51543e1632537c316a9d73d775b73b95472ced9074e06adc32d4c523bef5f069b9c4826c1f4bdf0a1e638e61d458dc2e1
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -39,7 +39,7 @@ SpringOnion.source_filter_re = //
|
|
39
39
|
|
40
40
|
class Employee < ActiveRecord::Base; end
|
41
41
|
|
42
|
-
Employee.all.to_a.count
|
42
|
+
p Employee.all.to_a.count
|
43
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}],"warnings":{"line 1":["slow_type"]},"backtrace":["/foo/bar/zoo/baz.rb:18:in `\u003ctop (required)\u003e'"]}
|
44
44
|
#=> 300024
|
45
45
|
```
|
data/lib/spring_onion/config.rb
CHANGED
@@ -42,12 +42,9 @@ module SpringOnion
|
|
42
42
|
@ignore_sql_filter_re !~ sql && @sql_filter_re =~ sql
|
43
43
|
end
|
44
44
|
|
45
|
-
@source_filter_re =
|
46
|
-
|
47
|
-
|
48
|
-
ary << Regexp.new(re) if re
|
49
|
-
end
|
50
|
-
)
|
45
|
+
@source_filter_re = ENV['SPRING_ONION_SOURCE_FILTER_RE'].yield_self do |re|
|
46
|
+
re ? Regexp.new(re) : %r{/app/}
|
47
|
+
end
|
51
48
|
|
52
49
|
@ignore_source_filter_re = Regexp.union(
|
53
50
|
[RbConfig::TOPDIR, *Gem.path, '/.rbenv/versions/'].tap do |ary|
|
data/lib/spring_onion/version.rb
CHANGED