routes_lazy_routes 0.3.1 → 0.3.2

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: 8b8020bcd3fda43867d90592b8b2a273b64e599e5f11952df0d3f475f047acfd
4
- data.tar.gz: c4ba0b1fec98f499e56f6a1894b6e20de026b6b1691d314f0e14729dcca48a85
3
+ metadata.gz: 42dc2d648b62fa9cd998e40202f42040ce54444da6b82263e7800f8d3310e77c
4
+ data.tar.gz: 4b9a49cafb3ba8fe1674cb07b429a19148297d46e5fc44ee4b8985dc7fbd8803
5
5
  SHA512:
6
- metadata.gz: 1991e3087a36eb71fac2ebb19f2b5f5ef08b45897dcd817bd54a5aebca25268e0f36e14617e0416a8f2a647aaeacaeff52643c6153627ced198725e39ba8047d
7
- data.tar.gz: 60392a385fc22a5a0e6c6808e09c23a73c887ebbfb02e44d1680ee4f66f064ef011d9dee2174e6f39b88724491b2c0063b69d614484c9850b10c8159204deb40
6
+ metadata.gz: 7355e4871cc24432e36b5eb04c50f9f1cc6deac95369911d02eccbb40b45d6d02da096fb3949afadbba34dfaf4622a21b1c3c9e6cd97df6ca1f0c00357565e5f
7
+ data.tar.gz: 7462450f3b45ec54bdce4085911448c1978de81edbcf017f4a3bdbd2be37f687808cf1d88ff7071ebaaec920b614b51f08c1dd98ae04464fbd5b17bb92c8b369
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RoutesLazyRoutes
4
+ module Command
5
+ module RoutesCommand
6
+ def require_environment!
7
+ super
8
+
9
+ RoutesLazyRoutes.eager_load!
10
+ end
11
+ end
12
+ end
13
+ end
@@ -4,9 +4,14 @@ require_relative 'application'
4
4
 
5
5
  module RoutesLazyRoutes
6
6
  class Railtie < ::Rails::Railtie
7
- # Extending `load_tasks` has to be done very early, like before executing any initializer, so here it is
7
+ # Extending the following modules have to be done very early, like before executing any initializer, so here it is
8
8
  Rails::Application.prepend RoutesLazyRoutes::Application::TaskLoader
9
9
 
10
+ if defined? Rails::Command::RoutesCommand
11
+ require_relative 'command/routes_command'
12
+ Rails::Command::RoutesCommand.prepend RoutesLazyRoutes::Command::RoutesCommand
13
+ end
14
+
10
15
  initializer :routes_lazy_routes, before: :add_routing_paths do
11
16
  RoutesLazyRoutes.arise!
12
17
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RoutesLazyRoutes
4
- VERSION = '0.3.1'
4
+ VERSION = '0.3.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: routes_lazy_routes
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akira Matsuda
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-21 00:00:00.000000000 Z
11
+ date: 2020-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -56,6 +56,7 @@ files:
56
56
  - bin/setup
57
57
  - lib/routes_lazy_routes.rb
58
58
  - lib/routes_lazy_routes/application.rb
59
+ - lib/routes_lazy_routes/command/routes_command.rb
59
60
  - lib/routes_lazy_routes/lazy_routes_middleware.rb
60
61
  - lib/routes_lazy_routes/railtie.rb
61
62
  - lib/routes_lazy_routes/routes_reloader_wrapper.rb
@@ -83,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
84
  - !ruby/object:Gem::Version
84
85
  version: '0'
85
86
  requirements: []
86
- rubygems_version: 3.2.0
87
+ rubygems_version: 3.2.3
87
88
  signing_key:
88
89
  specification_version: 4
89
90
  summary: A Rails routes lazy loader