spring_onion 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 797e6837cbc8fb508afac284d54509ce175ac77346320bcc0697c0cd54b49a06
4
- data.tar.gz: 487f8a88353cce686f0b259cd83f2401cb3d599a4d05e403250018b2e3ae4fdc
3
+ metadata.gz: f81f2b07f2a586b8e02444106908d6d8eb8631d772db5bff80dd0fa6ee72b550
4
+ data.tar.gz: 0e23da7945c119c5c5dcf90f2ead4985647536d0c7f3cb091b47e8f2c94ae168
5
5
  SHA512:
6
- metadata.gz: bc53955a16cd100e68ef306b798966f62937963ce8a3a67b819779379892fa50125b61c30e127cd1d1c3c0bd23cf58b9961a13a196430b15f55705b553ec9f0e
7
- data.tar.gz: d0c482e0864d25b05d3dc002de0b36d6b6b2d5414d8af7402bf86390f7a1182dc2d0cd745afb6cd8dcfe5d4c889141c351f4d3f6414acd957c4d2bd43322af41
6
+ metadata.gz: 115c03712806b8b97d9ff1e65f512db06e8ebc9f4e555b743d97c57b9159c58dc4f43410b7fb73db178a584425e22b403f6005ed3be6cb9a01c57b3295c686e3
7
+ data.tar.gz: 4aa1951677c97b2fa2b45e2eeb3d49b51543e1632537c316a9d73d775b73b95472ced9074e06adc32d4c523bef5f069b9c4826c1f4bdf0a1e638e61d458dc2e1
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spring_onion (0.2.0)
4
+ spring_onion (0.2.1)
5
5
  activerecord
6
6
  coderay
7
7
  mysql2
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
  ```
@@ -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 = Regexp.union(
46
- [%r{/app/}].tap do |ary|
47
- re = ENV['SPRING_ONION_SOURCE_FILTER_RE']
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SpringOnion
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
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.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel