rails-route-checker 0.2.7 → 0.2.8
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 +20 -9
- data/lib/rails-route-checker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 83a8db628f8a08403d87c03eb0b33bd1b6de966761b4685d6e0d63b03f39cbb7
|
4
|
+
data.tar.gz: 4c26964a8ebc9494fbb17c20cee37ab71752c41830a53850a495a49c48d232f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 740e34c8e804283c61a8f5d38c0a08ef66d463c06780720bec0bb4cfa18ba4cdb6b2cab24ebf031c1c5fadfb0ac48639a95b25fc20013f65b8c689e1558518d9
|
7
|
+
data.tar.gz: f23cc07438b3cd24a1748ddb64124557066b36d0aceebaeb7e293323901991bafa8a7bc897ada5ec8172e7bb68a8574a67e769ba504f6fbe08b27261054e7f04
|
@@ -3,18 +3,29 @@
|
|
3
3
|
module RailsRouteChecker
|
4
4
|
class LoadedApp
|
5
5
|
def initialize
|
6
|
-
|
7
|
-
|
6
|
+
app_base_path = Dir.pwd
|
7
|
+
suppress_output do
|
8
8
|
require_relative "#{app_base_path}/config/boot"
|
9
|
-
|
9
|
+
end
|
10
10
|
|
11
|
-
|
12
|
-
|
11
|
+
begin
|
12
|
+
suppress_output do
|
13
|
+
require_relative "#{Dir.pwd}/config/environment"
|
14
|
+
end
|
15
|
+
rescue Exception => e
|
16
|
+
puts "Requiring your config/environment.rb file failed."
|
17
|
+
puts "This means that something raised while trying to start Rails."
|
18
|
+
puts ""
|
19
|
+
puts e.backtrace
|
20
|
+
raise(e)
|
21
|
+
end
|
22
|
+
|
23
|
+
suppress_output do
|
24
|
+
@app = Rails.application
|
25
|
+
@app.eager_load!
|
13
26
|
attempt_to_load_default_controllers
|
14
|
-
|
27
|
+
@app.reload_routes!
|
15
28
|
Rails::Engine.subclasses.each(&:eager_load!)
|
16
|
-
|
17
|
-
a
|
18
29
|
end
|
19
30
|
end
|
20
31
|
|
@@ -25,7 +36,7 @@ module RailsRouteChecker
|
|
25
36
|
reject_route?(r)
|
26
37
|
end.uniq
|
27
38
|
|
28
|
-
return @routes unless
|
39
|
+
return @routes unless app.config.respond_to?(:assets)
|
29
40
|
|
30
41
|
use_spec = defined?(ActionDispatch::Journey::Route) || defined?(Journey::Route)
|
31
42
|
@routes.reject do |route|
|
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.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Allie
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|