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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1f429edefae4d492dd5693b50112c2573ad1869e9771fe6bb8ff740cfcb195f
4
- data.tar.gz: 38ce0d06a28fe595ec70f08289737f20420ace8854bfd1ee26e3bd94025509d9
3
+ metadata.gz: b49938f0c49191db60463517da2d41115da11af0f7bb1c62f27065bb4598afc5
4
+ data.tar.gz: a247e74c4c86bb2e3188ad1f6b1b057d890b5daba01442ae0b2fd4b25786b60a
5
5
  SHA512:
6
- metadata.gz: ae4e3d676d6334390fe4d43cf19f86edd15bfbec3514446c947d10c5e364d6094a2b79ee54f5f7bf550ccd95895331a9248ab227c2bfcfe5b967f9098da6bf91
7
- data.tar.gz: bd93a48197762af1999330abb33bca574216ea1982fbdc29c0f4100da885a3c5213604ed3dd01b80d477b911f835a39829bccd8cc63a86f6c761f567c4c36c56
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 redundant — and because
14
- `config.autoload_paths` is autoload-only, they marked those directories as
15
- not-eager-loadable, which can trip Zeitwerk in eager-loading (production)
16
- hosts. Zeitwerk still picks up all four directories.
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.2
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where_is_waldo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Gibson