dead_code_detector 0.0.8 → 0.0.9

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: dce82eaea034f691d31a834798cdb2d92cc8fdfb0b204f7e719f82b95a95b95d
4
- data.tar.gz: dba4ecbc2b237afa42f7c45837455865d85817c26546d7eb03eb0f82cbdb9ed8
3
+ metadata.gz: 3cbda8c4192c6fdb3de42f27b5a71fa4a6b76d4508da317a1407c85ac52356ae
4
+ data.tar.gz: 23aa9deecb70ed1e0668f07900eab70b8fb88c0e43cd6b2c2bb6783f599c896f
5
5
  SHA512:
6
- metadata.gz: 885bfe14c814f7f36782f57230eded98707723154d7efb2843caa97113dd30dea8c1d26634269ab45f4c9c92b4e387cf1956831e7fd26dafff996be39b2b18f3
7
- data.tar.gz: 71ac7c3bf746b4b18f34a18d6cb78666dadf55f62fe1bfa91625c4cde3ccbfd12e2bf3860bfad5d44d00c4c7589cb1c55e8e0008eef563af04307302159596df
6
+ metadata.gz: 3102bcebe94b492da8982a93dcddda32ee7637e767569050944ffe29202035eb6ad3dfa4e20d37b8532a73159084551967a5163840347e1c6f7aac6f7881e284
7
+ data.tar.gz: 77404aa0709a6a937116df52f1bfdee1fe44d74d78a6429e6ee2236a768ed53ec9ac497a441c592a21fbe0996476f39e50a1891035795bddc76feeb811722a88
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dead_code_detector (0.0.7.alpha)
4
+ dead_code_detector (0.0.9)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -29,9 +29,9 @@ PLATFORMS
29
29
  DEPENDENCIES
30
30
  bundler (~> 1.17)
31
31
  byebug
32
+ dead_code_detector!
32
33
  rake (~> 10.0)
33
34
  rspec (~> 3.0)
34
- dead_code_detector!
35
35
 
36
36
  BUNDLED WITH
37
37
  1.17.3
data/README.md CHANGED
@@ -84,6 +84,7 @@ DeadCodeDetector.configure do |config|
84
84
 
85
85
  # DeadCodeDetector will filter out methods whose source_location matches this regular expression.
86
86
  # This is useful for filtering out methods from gems (such as the methods from ActiveRecord::Base)
87
+ # Specifying a value here will cause DeadCodeDetector to ignore methods defined in C
87
88
  # config.ignore_paths = /\/vendor\//
88
89
 
89
90
  # A list of classes that DeadCodeDetector will monitor method usage on.
@@ -52,6 +52,7 @@ module DeadCodeDetector
52
52
  def target_directory?(method_name)
53
53
  return true if DeadCodeDetector.config.ignore_paths.nil?
54
54
  source_location = klass.method(method_name).source_location&.first
55
+ return false if source_location.nil?
55
56
  source_location !~ DeadCodeDetector.config.ignore_paths
56
57
  end
57
58
 
@@ -46,6 +46,7 @@ module DeadCodeDetector
46
46
  def target_directory?(method_name)
47
47
  return true if DeadCodeDetector.config.ignore_paths.nil?
48
48
  source_location = klass.instance_method(method_name).source_location&.first
49
+ return false if source_location.nil?
49
50
  source_location !~ DeadCodeDetector.config.ignore_paths
50
51
  end
51
52
 
@@ -1,3 +1,3 @@
1
1
  module DeadCodeDetector
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dead_code_detector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kyle d'Oliveira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-04-17 00:00:00.000000000 Z
11
+ date: 2019-05-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler