whoisonline 0.1.4 → 0.1.5

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: dcd954e1560a78b4047064f6b1359d22f159b08fd86f3c8cea97283f8a7f2210
4
- data.tar.gz: '06558961aad1873ceb47cf7799049603a9994376a9a2a9ed0b54eeb43b688207'
3
+ metadata.gz: 1c2361beee02a6a91a23097459adb4849f353eeff4f6744f11b94b21cf1bd220
4
+ data.tar.gz: 3235a46c5a744cc335f026eb0f0fdde4aa9418cf0a99ade06733c78800f699c6
5
5
  SHA512:
6
- metadata.gz: 139becc8c6d5cdd18578023ba4a9c751a6f9803ec2396d73a229e6421d4b21543d3de4327b37513cc9075c3c5f9deb21d1f4e0900a03e84ac24db374d219af71
7
- data.tar.gz: a2bd79ab7b77f9524865030f2af74cc011187191d1403968e094a26ed663866fa83d6e2a9a1a41512e3bfb805e2c7f61afa43a46e76dc98e2b7a6aede6b8096c
6
+ metadata.gz: 7a6f8be97cbc53e0ff63ebc42f338faab608e40258a8818cf8414ed46af7d1d0d64a3891c9d86402c07d102e04415af751b9d3e04131d4b89f9d6e60189a5853
7
+ data.tar.gz: e724370b8e7893ca9347d773e2b7b0bd634b5796b302033930b508413099c6cc051a4f519d0967e0d5fe38eb2eec67f53a0c2fd1962b840b508f282107a44c0f
@@ -6,6 +6,12 @@ module WhoIsOnline
6
6
  class Engine < ::Rails::Engine
7
7
  isolate_namespace WhoIsOnline
8
8
 
9
+ # Load helper before initializers run (for Zeitwerk compatibility)
10
+ config.to_prepare do
11
+ helper_path = File.expand_path("../../app/helpers/whoisonline/application_helper", __FILE__)
12
+ require helper_path if File.exist?(helper_path)
13
+ end
14
+
9
15
  initializer "whoisonline.controller" do
10
16
  ActiveSupport.on_load(:action_controller) do
11
17
  include WhoIsOnline::Controller
@@ -21,10 +27,10 @@ module WhoIsOnline
21
27
 
22
28
  initializer "whoisonline.helpers" do
23
29
  ActiveSupport.on_load(:action_view) do
24
- # Explicitly require the helper module from app directory
25
- helper_path = File.join(Engine.root, "app", "helpers", "whoisonline", "application_helper.rb")
26
- require helper_path if File.exist?(helper_path)
27
- include WhoIsOnline::ApplicationHelper
30
+ # Helper should already be loaded via config.to_prepare
31
+ if defined?(WhoIsOnline::ApplicationHelper)
32
+ include WhoIsOnline::ApplicationHelper
33
+ end
28
34
  end
29
35
  end
30
36
  end
@@ -1,5 +1,5 @@
1
1
  module WhoIsOnline
2
- VERSION = "0.1.4"
2
+ VERSION = "0.1.5"
3
3
  end
4
4
 
5
5
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: whoisonline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kapil Dev Pal