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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f97ee66f59a03025db7fab6e63fa8b0ff74f9b058b5f57fd87d3da88bed310e3
4
- data.tar.gz: 0c5ecf132b1a53cf812fe4af8404658b097e2058859afeb6114531321e42d9f8
3
+ metadata.gz: 83a8db628f8a08403d87c03eb0b33bd1b6de966761b4685d6e0d63b03f39cbb7
4
+ data.tar.gz: 4c26964a8ebc9494fbb17c20cee37ab71752c41830a53850a495a49c48d232f0
5
5
  SHA512:
6
- metadata.gz: 14840d1099677ef965aaf077c33b043527ea6a95d1591c53683b38782ba275d460ae5701b4f284dd34513cafde6a5cda6a94476477f5f7ebbd7604df641a2420
7
- data.tar.gz: 01361ddc934b7e73351dc3294bc5e584339b6125ecadc6d1807ccbac25acc632ee14f1da9a94df7044e85e7fd2eb7286d9ffda11ebb32ba840eaf9116e6b8d1a
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
- @app = suppress_output do
7
- app_base_path = Dir.pwd
6
+ app_base_path = Dir.pwd
7
+ suppress_output do
8
8
  require_relative "#{app_base_path}/config/boot"
9
- require_relative "#{Dir.pwd}/config/environment"
9
+ end
10
10
 
11
- a = Rails.application
12
- a.eager_load!
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
- a.reload_routes!
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 @app.config.respond_to?(:assets)
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|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsRouteChecker
4
- VERSION = '0.2.7'
4
+ VERSION = '0.2.8'
5
5
  end
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.7
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-10-26 00:00:00.000000000 Z
11
+ date: 2020-11-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler