rails-route-checker 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rails-route-checker/loaded_app.rb +13 -2
- data/lib/rails-route-checker/version.rb +1 -1
- data/rails-route-checker.gemspec +4 -1
- metadata +31 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5f4afc2aa6446dce803f66ee1f800e0ceabdc6bda39eb9ca650bc06fa3b0a090
|
4
|
+
data.tar.gz: 31e9204229f39fea31a563220f34f85afb86c4eae2f5fe0b1089305106ee2aa1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0dfbdaaa247be61613980079b3e065e689c5d0ce71d0310a1dd51ab933a340bb6f2c3a9d1076eadb4977aa079ae47f13fc0284dc10af0a75ee0e63d61672628
|
7
|
+
data.tar.gz: 43d372019c0bec95b29dabce39eecb3fa91387cbf18d5e0d9295c606543698f13baea326484e5d99452199086b59d3cb86fefc3fbc610313676183185d6ec3b1
|
@@ -48,13 +48,24 @@ module RailsRouteChecker
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def controller_information
|
51
|
-
@controller_information
|
51
|
+
return @controller_information if @controller_information
|
52
|
+
|
53
|
+
base_controllers_descendants = [ActionController::Base, ActionController::API].flat_map(&:descendants)
|
54
|
+
|
55
|
+
@controller_information = base_controllers_descendants.map do |controller|
|
52
56
|
next if controller.controller_path.nil? || controller.controller_path.start_with?('rails/')
|
53
57
|
|
58
|
+
controller_helper_methods =
|
59
|
+
if controller.respond_to?(:helpers)
|
60
|
+
controller.helpers.methods.map(&:to_s)
|
61
|
+
else
|
62
|
+
[]
|
63
|
+
end
|
64
|
+
|
54
65
|
[
|
55
66
|
controller.controller_path,
|
56
67
|
{
|
57
|
-
helpers:
|
68
|
+
helpers: controller_helper_methods,
|
58
69
|
actions: controller.action_methods.to_a,
|
59
70
|
instance_methods: instance_methods(controller),
|
60
71
|
lookup_context: lookup_context(controller)
|
data/rails-route-checker.gemspec
CHANGED
@@ -23,9 +23,12 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ['lib']
|
25
25
|
|
26
|
+
spec.add_dependency 'rails'
|
27
|
+
|
26
28
|
spec.add_development_dependency 'bundler', '~> 2.1'
|
27
29
|
spec.add_development_dependency 'rake', '~> 13.0'
|
28
30
|
spec.add_development_dependency 'rubocop', '~> 0.86'
|
29
31
|
spec.add_development_dependency 'appraisal', '~> 2.5.0'
|
30
32
|
spec.add_development_dependency 'minitest'
|
31
|
-
|
33
|
+
spec.add_development_dependency 'propshaft'
|
34
|
+
end
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-route-checker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Allie
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +94,20 @@ dependencies:
|
|
80
94
|
- - ">="
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: propshaft
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
83
111
|
description: A linting tool that helps you find any routes defined in your routes.rb
|
84
112
|
file that don't have a corresponding controller action, and find any _path or _url
|
85
113
|
calls that don't have a corresponding route in the routes.rb file.
|
@@ -130,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
158
|
- !ruby/object:Gem::Version
|
131
159
|
version: '0'
|
132
160
|
requirements: []
|
133
|
-
rubygems_version: 3.
|
161
|
+
rubygems_version: 3.5.9
|
134
162
|
signing_key:
|
135
163
|
specification_version: 4
|
136
164
|
summary: A linting tool for your Rails routes
|