where_is_waldo 0.1.2 → 0.1.3
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 +25 -4
- data/VERSION +1 -1
- data/lib/where_is_waldo/engine.rb +18 -0
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b49938f0c49191db60463517da2d41115da11af0f7bb1c62f27065bb4598afc5
|
|
4
|
+
data.tar.gz: a247e74c4c86bb2e3188ad1f6b1b057d890b5daba01442ae0b2fd4b25786b60a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 740783e4a9a19df3895bb62f113ff711f2d1815101e086388d604194beec71fe996803de241e0370f5685aa3d07f0ec5f1b4eff90fe654d19dd3f4cf9ac70436
|
|
7
|
+
data.tar.gz: be170741d609ae6d904c2f29a73637139d71f17bd4d54dfed6a2a8c6c9a3662f0624131c690d5af11a8c6676774bff4c149f9a17134b5bb72080f676c475e7bb
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
Notable changes to where_is_waldo. Format loosely follows
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/).
|
|
5
5
|
|
|
6
|
+
## 0.1.3
|
|
7
|
+
|
|
8
|
+
### Fixed
|
|
9
|
+
|
|
10
|
+
- Require `action_cable/engine`, `active_job/railtie` and
|
|
11
|
+
`active_record/railtie` from the engine. The engine's `app/*` classes name
|
|
12
|
+
these frameworks in a **superclass** position — `ApplicationCable::Channel <
|
|
13
|
+
ActionCable::Channel::Base`, `ApplicationJob < ActiveJob::Base`,
|
|
14
|
+
`ApplicationRecord < ActiveRecord::Base` — so they resolve at load time, and
|
|
15
|
+
`Rails::Engine` eager loads every `app/*` directory. A host that skipped any
|
|
16
|
+
of those railties (`rails new --skip-action-cable` being the common case)
|
|
17
|
+
therefore died at boot with `NameError: uninitialized constant
|
|
18
|
+
WhereIsWaldo::ApplicationCable::ActionCable`. The engine now loads what it
|
|
19
|
+
subclasses instead of depending on the host's `application.rb`. Affects every
|
|
20
|
+
released version up to and including `0.1.2`.
|
|
21
|
+
|
|
22
|
+
`spec/dummy` now requires none of the three itself, so the suite fails loudly
|
|
23
|
+
if this regresses.
|
|
24
|
+
|
|
6
25
|
## 0.1.2
|
|
7
26
|
|
|
8
27
|
### Fixed
|
|
@@ -10,10 +29,12 @@ Notable changes to where_is_waldo. Format loosely follows
|
|
|
10
29
|
- Drop the manual `config.autoload_paths <<` lines for `app/services`,
|
|
11
30
|
`app/channels`, `app/jobs`, and `app/models` from the engine. `Rails::Engine`
|
|
12
31
|
already globs every `app/*` directory into the engine's autoload **and**
|
|
13
|
-
eager-load paths, so the entries were
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
32
|
+
eager-load paths, so the entries were pure duplication.
|
|
33
|
+
|
|
34
|
+
(An earlier wording of this entry claimed the entries also suppressed eager
|
|
35
|
+
loading of those directories. That was wrong: `Rails::Engine`'s own
|
|
36
|
+
`paths.eager_load` still listed all four either way, so the eager-loaded set
|
|
37
|
+
was identical before and after. The change is a cleanup, not a behaviour fix.)
|
|
17
38
|
|
|
18
39
|
### Security (development dependencies only)
|
|
19
40
|
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.1.
|
|
1
|
+
0.1.3
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
+
# The engine's app/* classes name these frameworks in a superclass position, so
|
|
4
|
+
# they resolve at load time, not on first use:
|
|
5
|
+
#
|
|
6
|
+
# ApplicationCable::Channel < ActionCable::Channel::Base
|
|
7
|
+
# ApplicationJob < ActiveJob::Base
|
|
8
|
+
# ApplicationRecord < ActiveRecord::Base
|
|
9
|
+
#
|
|
10
|
+
# Rails::Engine eager loads every app/* directory, so a host that skips any of
|
|
11
|
+
# these railties — `rails new --skip-action-cable` is the common one — fails to
|
|
12
|
+
# boot with `NameError: uninitialized constant
|
|
13
|
+
# WhereIsWaldo::ApplicationCable::ActionCable`. Requiring them here makes the
|
|
14
|
+
# engine self-sufficient instead of silently depending on the host's
|
|
15
|
+
# application.rb. The gem depends on the full `rails` gem, so all three are
|
|
16
|
+
# guaranteed to be installed.
|
|
17
|
+
require "active_record/railtie"
|
|
18
|
+
require "active_job/railtie"
|
|
19
|
+
require "action_cable/engine"
|
|
20
|
+
|
|
3
21
|
module WhereIsWaldo
|
|
4
22
|
class Engine < ::Rails::Engine
|
|
5
23
|
isolate_namespace WhereIsWaldo
|