plan_my_stuff 1.0.0 → 1.0.1
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/lib/plan_my_stuff/engine.rb +8 -7
- data/lib/plan_my_stuff/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: fb9b79b7a7ef0890f6cfe2d4be9f5886afaaeec2a032e11fc44b0948a41c680b
|
|
4
|
+
data.tar.gz: 6582b1c90d2a78dd0c07e7789efba2d1938f6ce62c0a986778d0001e1c073ea5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9e2c0221e7396240f4b5452b000caae6c5a180b474250c2dedebb8e4a899e5c7c6eccad178a242858f1e5a2f04a37c778c23b4a7f973198db59e4c8d8aa04ea6
|
|
7
|
+
data.tar.gz: c91d0a3aec30798acff56582232baa332c1e556a98e78844ea7c05ff82abde81e65e953c56a6ac3c248be33c789030963b7918fe1fc5a1286ab5d40fe5196837
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.1
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- `eager_load_controllers_on_boot` no longer crashes host-app boot with `NameError: uninitialized constant
|
|
8
|
+
PlanMyStuff::Issues` when `config.eager_load` is `false` (dev/test/console/rake) on zeitwerk 2.6.x, as shipped with
|
|
9
|
+
Rails 7.1. The engine now requires its controller files directly instead of driving zeitwerk's `eager_load_dir`,
|
|
10
|
+
which fails to register child autoloads on the gem-defined `PlanMyStuff` namespace on those versions (closes #104).
|
|
11
|
+
|
|
3
12
|
## 1.0.0
|
|
4
13
|
|
|
5
14
|
Official release.
|
data/lib/plan_my_stuff/engine.rb
CHANGED
|
@@ -10,14 +10,15 @@ module PlanMyStuff
|
|
|
10
10
|
config.after_initialize do
|
|
11
11
|
next unless PlanMyStuff.configuration.eager_load_controllers_on_boot
|
|
12
12
|
|
|
13
|
+
# Require the controller files directly rather than going through zeitwerk's +eager_load_dir+ /
|
|
14
|
+
# +eager_load_namespace+. +PlanMyStuff+ is an external namespace pre-defined by the gem's +lib/+, and some
|
|
15
|
+
# zeitwerk versions (notably 2.6.12, shipped with Rails 7.1) never register child autoloads on it. On those
|
|
16
|
+
# versions the namespace-aware loaders raise +NameError+ descending into +PlanMyStuff::Issues+ / +::Webhooks+
|
|
17
|
+
# -- and so does a plain +constantize+. Requiring the files defines the constants directly and works on every
|
|
18
|
+
# supported zeitwerk version: zeitwerk's +require+ decoration keeps its bookkeeping in sync on versions that do
|
|
19
|
+
# manage these files, and in eager-loading hosts the files are already loaded so +require+ is a no-op.
|
|
13
20
|
controllers_dir = File.expand_path('../../app/controllers', __dir__)
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
if loader.respond_to?(:eager_load_dir)
|
|
17
|
-
loader.eager_load_dir(controllers_dir)
|
|
18
|
-
else
|
|
19
|
-
Dir.glob(File.join(controllers_dir, '**/*.rb')).each { |path| require path }
|
|
20
|
-
end
|
|
21
|
+
Dir.glob(File.join(controllers_dir, '**/*.rb')).each { |path| require(path) }
|
|
21
22
|
end
|
|
22
23
|
end
|
|
23
24
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: plan_my_stuff
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Brands Insurance
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-06-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|