rails-route-checker 0.2.2 → 0.2.3
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19d68dcbdd849a080cf1e5d99f1ae4a5835ad770
|
4
|
+
data.tar.gz: eb811f79a36bdf90e44cc440549dd279cc1d8a73
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 545ed87d3c89646a04cf3a7e7aee7b90ee48a16d33d7d8fce0699ec0c0ea01a211b2bd659dd5a85740a2c5ebeadd92cb017cfca426384fd09844700b4149d94c
|
7
|
+
data.tar.gz: 75ea1b5e8b936cb03925fb4c79369e86b9be5643401adda5bc0878689c8f3f6a16494fd74dec7f63307e582b86bd31c083805ed575466b87fa5ba33e56e8b058
|
@@ -10,7 +10,12 @@ module RailsRouteChecker
|
|
10
10
|
action = r.requirements[:action]
|
11
11
|
|
12
12
|
next if options[:ignored_controllers].include?(controller)
|
13
|
-
|
13
|
+
|
14
|
+
if controller_information.key?(controller)
|
15
|
+
info = controller_information[controller]
|
16
|
+
next if info[:actions].include?(action)
|
17
|
+
next if info[:lookup_context] && info[:lookup_context].template_exists?("#{controller}/#{action}")
|
18
|
+
end
|
14
19
|
|
15
20
|
{
|
16
21
|
controller: controller,
|
@@ -41,13 +41,17 @@ module RailsRouteChecker
|
|
41
41
|
next if controller.controller_path.start_with?('rails/')
|
42
42
|
|
43
43
|
instance_methods = (controller.instance_methods.map(&:to_s) + controller.private_instance_methods.map(&:to_s))
|
44
|
+
lookup_context = ActionView::LookupContext.new(
|
45
|
+
controller._view_paths, {}, controller._prefixes
|
46
|
+
) if controller.instance_methods.include?(:default_render)
|
44
47
|
|
45
48
|
[
|
46
49
|
controller.controller_path,
|
47
50
|
{
|
48
51
|
helpers: controller.helpers.methods.map(&:to_s),
|
49
52
|
actions: controller.action_methods.to_a,
|
50
|
-
instance_methods: instance_methods.compact.uniq
|
53
|
+
instance_methods: instance_methods.compact.uniq,
|
54
|
+
lookup_context: lookup_context
|
51
55
|
}
|
52
56
|
]
|
53
57
|
end.compact.to_h
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-route-checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Allie
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-04-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.6.
|
106
|
+
rubygems_version: 2.6.8
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: A linting tool for your Rails routes
|