trace_location 0.9.4 → 0.9.5

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: 817d28023dff620c6bb78710a62967fd1f94dfb7a1fdc04dff3c0a4ff47fff07
4
- data.tar.gz: f4f809a8336a235481feb8df53c60243cea751b817944b2399418d77daedd3ec
3
+ metadata.gz: 7e9b33c09f5c3d68d4afe6d719568a7e316847910efa360443d7761ebaf622f0
4
+ data.tar.gz: 2d8f4e0f8ccd193a9b5339a3d15e26aca2a50dace835ca546a78997a25fde082
5
5
  SHA512:
6
- metadata.gz: 8d7268242f9cd266e94ca88d60d7957956e8a37493cc84b6b2afa52490a6cce6b7e3aee4fd468122b81712126be22155821fbdb3118bf86431b85f1b101b75dc
7
- data.tar.gz: 58fd06b4181e14948e646fa210b3f7ffc9921f913a4742fd78155dd64d13aff42f08ee121d089e029a1070358b6a75dbef55ce33746cb41b7b50dc2c2114b415
6
+ metadata.gz: f840deed9afc1a0494485b6de9b3da8de04d2cd2d596c62ddfd9cbcda2f3d5262e4ff8c5fb2062da9038ca4772f3b99d6c404317416ec97bb64457893ebbe00f
7
+ data.tar.gz: 80aa24a9ff34163d5294e44d280f4d5d5980f2f7a5e92640066300d6ffc0f810f0442101fa1d010d59ae3262891ce2e3741d12f4a34f8120927c977f2bb9f8a4
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trace_location (0.9.4)
4
+ trace_location (0.9.5)
5
5
  binding_of_caller
6
6
  method_source
7
7
 
data/README.md CHANGED
@@ -38,8 +38,8 @@ Then you can get logs like this: [.md](https://github.com/yhirano55/trace_locati
38
38
  | name | content | example |
39
39
  |:-----|:--------|:--------|
40
40
  | format | `:markdown`, `:log`, `:csv` (default: `:markdown`) | `:markdown` |
41
- | match | Regexp for allow list | `/activerecord/` |
42
- | ignore | Regexp for deny list | `/bootsnap\|activesupport/` |
41
+ | match | Regexp, Symbol, String or Array for allow list | `[:activerecord, :activesupport]` |
42
+ | ignore | Regexp, Symbol, String or Array for deny list | `/bootsnap\|activesupport/` |
43
43
 
44
44
  ## More examples
45
45
 
@@ -16,8 +16,8 @@ module TraceLocation
16
16
  cache = {}
17
17
 
18
18
  tracer = TracePoint.new(:call, :return) do |trace_point|
19
- next if match && !trace_point.path.to_s.match?(/#{match}/)
20
- next if ignore && trace_point.path.to_s.match?(/#{ignore}/)
19
+ next if match && !trace_point.path.to_s.match?(/#{Array(match).join('|')}/)
20
+ next if ignore && trace_point.path.to_s.match?(/#{Array(ignore).join('|')}/)
21
21
 
22
22
  id += 1
23
23
  caller_path, caller_lineno = trace_point.binding.of_caller(2).source_location
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TraceLocation
4
- VERSION = '0.9.4'
4
+ VERSION = '0.9.5'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trace_location
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yoshiyuki Hirano
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-07-05 00:00:00.000000000 Z
12
+ date: 2019-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: binding_of_caller