rails-image-post-solution 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9509b647fc4754ab678ba3ec61d981770dd74a3a004d101b5199f63b0b25ad47
4
- data.tar.gz: 3255a0da4ea9db4b32560abfac145a5b018ab367d830550c84b92a4b805e60c3
3
+ metadata.gz: 658c71c39ad56304e65bd91b5836c22b9a62c0c6850f928c90d38c7e59befc95
4
+ data.tar.gz: 6adc604cb0b0a31fcca15a32949dd0e1abc5db22fda7fa4a7bf3136d086c155c
5
5
  SHA512:
6
- metadata.gz: 363365fb52b8b43344d2d2850ca13f684bc401bb3991aac6da46335213a201e9b57087a3ef4f1b0daaee0fe1bbb8127955cb6fe43f2edc4234f7bb605c5fc473
7
- data.tar.gz: b0a6e9a4bfc78842ad43ee56856985a60943d9c25d90bed2b885b1f241bb7290374d20dbde13725ccf99c5ec07b67632c767565386348a8e6f8da170db4d4357
6
+ metadata.gz: 7f3d08bf7970740fb04fc4bef3633c88e9e66f15cd7c48b9b7970792fcf59dab2124b4b2e56209c6a0dc38062315f71e0c5c4026e12382fa8f21d253d1e9017a
7
+ data.tar.gz: 67dc5bab3ebd8704884fe3e3008284c54153db07e282e038b5e5d581b6e5249f83121029590116e74b99d69ddd0a9d7d8b21eed01e26454cb782574c1fb2d6b0
@@ -6,6 +6,29 @@ module RailsImagePostSolution
6
6
  class Engine < ::Rails::Engine
7
7
  isolate_namespace RailsImagePostSolution
8
8
 
9
+ # Explicitly set engine root
10
+ config.root = File.expand_path('../..', __dir__)
11
+
12
+ # Load routes when engine is initialized
13
+ config.after_initialize do
14
+ routes_path = RailsImagePostSolution::Engine.root.join("config", "routes.rb")
15
+ if File.exist?(routes_path)
16
+ RailsImagePostSolution::Engine.class_eval do
17
+ load routes_path
18
+ end
19
+
20
+ # After routes are loaded, make helpers available
21
+ ActiveSupport.on_load(:action_controller_base) do
22
+ include RailsImagePostSolution::Engine.routes.url_helpers
23
+ helper RailsImagePostSolution::Engine.routes.url_helpers
24
+ end
25
+
26
+ ActiveSupport.on_load(:action_view) do
27
+ include RailsImagePostSolution::Engine.routes.url_helpers
28
+ end
29
+ end
30
+ end
31
+
9
32
  config.generators do |g|
10
33
  g.test_framework :rspec
11
34
  g.fixture_replacement :factory_bot
@@ -18,17 +41,5 @@ module RailsImagePostSolution
18
41
  initializer "rails_image_post_solution.assets" do |app|
19
42
  app.config.assets.paths << root.join("app/assets")
20
43
  end
21
-
22
- # Make engine route helpers available in the main application
23
- initializer "rails_image_post_solution.helpers" do
24
- ActiveSupport.on_load(:action_controller_base) do
25
- include RailsImagePostSolution::Engine.routes.url_helpers
26
- helper RailsImagePostSolution::Engine.routes.url_helpers
27
- end
28
-
29
- ActiveSupport.on_load(:action_view) do
30
- include RailsImagePostSolution::Engine.routes.url_helpers
31
- end
32
- end
33
44
  end
34
45
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RailsImagePostSolution
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-image-post-solution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - dhq_boiler