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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cbda8c4192c6fdb3de42f27b5a71fa4a6b76d4508da317a1407c85ac52356ae
|
4
|
+
data.tar.gz: 23aa9deecb70ed1e0668f07900eab70b8fb88c0e43cd6b2c2bb6783f599c896f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|
|
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.
|
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-
|
11
|
+
date: 2019-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|