where_is_waldo 0.1.7 → 0.1.9

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: 0daa39b5301b15f20943db48e10565bb18c7a33e12917551d6f9bea954311e20
4
- data.tar.gz: 4ffb5a45341e48e9d4bc5f8dd08c9cf5a970dc0939de4e6e869d8a8bfa14c99b
3
+ metadata.gz: 96f9fb4253fa91bfaa947711aff7e9de6cf6511029c34fe4d24bcaa92be9958d
4
+ data.tar.gz: f441dacf17ca081d1974d08e3eb3460dce8ca5423772689c72e730c58746b8e9
5
5
  SHA512:
6
- metadata.gz: 59dfa8c1cfb8c29b53dde974da7db16a3f8c16fd4ba24e7adcf1dedac260ec6bad7618d718e161dd7d11b466a3f06b87a8168cabaf0deabeca21c0d00ae71ba0
7
- data.tar.gz: 27ad4732f42cc5257c1c9f39cbff46a6d21570e1c7c8fb695da6a9caabdf9ff92742f3e82633b793dfdce786beff64e8933839be6c3d850b5465d31326a86859
6
+ metadata.gz: df11e85496b2ae55c928695e1dad936a82b0d0b3abbcf8df7160932cf221f0ab4ab7c1cb8830cc5b710bbbab029cb82dfdb6d719292b0dc1863767151baf406c
7
+ data.tar.gz: 3412d9fd5475df5fe17a29c8dbd910f3c920db8260971492aa479ab23797d98d0c726549328aa27bdbef675646ae750f948c30ac810c96eaadddf6d8e1badcdf
data/CHANGELOG.md CHANGED
@@ -3,6 +3,56 @@
3
3
  Notable changes to where_is_waldo. Format loosely follows
4
4
  [Keep a Changelog](https://keepachangelog.com/).
5
5
 
6
+ ## 0.1.9
7
+
8
+ Security/maintenance release — dependency bumps only, no library code changes.
9
+
10
+ ### Security
11
+
12
+ - **Rails 8.1.3.1** — fixes the ActiveStorage RCE (CVE-2026-66066).
13
+ - **sqlite3 2.9.5** — fixes two use-after-free issues.
14
+
15
+ ### Changed
16
+
17
+ - Bumped transitive/build dependencies: `undici` 7.28.0 → 7.29.0,
18
+ `rollup` 4.62.2 → 4.62.4, `js-yaml` → 4.3.1 and `postcss` → 8.5.26
19
+ (via resolutions).
20
+
21
+ ## 0.1.8
22
+
23
+ ### Fixed
24
+
25
+ - **`WhereIsWaldo.subject_online?`, `.sessions_for_subject`, `.session_status`
26
+ no longer raise `uninitialized constant` when called.** These three methods
27
+ were defined with ActiveSupport's `delegate :method, to: :PresenceService`
28
+ inside a `class << self` block. `delegate` generates the method body via
29
+ `class_eval` with a **string**, and a string-eval'd body's `Module.nesting`
30
+ is just the target class — for the WhereIsWaldo module's singleton class,
31
+ that's `[#<Class:WhereIsWaldo>]`, *without* the enclosing `WhereIsWaldo`.
32
+ Constant lookup for `PresenceService` inside the generated method then
33
+ couldn't walk up to the enclosing module and failed with:
34
+
35
+ ```
36
+ uninitialized constant #<Class:WhereIsWaldo>::PresenceService (NameError)
37
+ ```
38
+
39
+ Replaced the three `delegate` calls with plain `def` methods matching the
40
+ pattern of the other class methods on the module (`.connect`, `.online`,
41
+ `.online_ids`, `.cleanup`, etc.), which inherit the correct lexical scope
42
+ and resolve `PresenceService` as `WhereIsWaldo::PresenceService`.
43
+
44
+ Waldo's own internal code (`PresenceChannel`, `Roster`) references
45
+ `PresenceService` at its fully-qualified name from correctly-scoped
46
+ modules, so this bug never affected the actual presence flow — only host
47
+ code that calls the top-level convenience wrappers. Affects every
48
+ released version up to and including `0.1.7`.
49
+
50
+ ### Tests
51
+
52
+ - Added `spec/where_is_waldo_spec.rb` exercising every top-level convenience
53
+ method at the public boundary — the only place a `class_eval`-scope
54
+ regression in the wrapper can be caught, since internal callers bypass it.
55
+
6
56
  ## 0.1.7
7
57
 
8
58
  ### Added
data/README.md CHANGED
@@ -238,7 +238,8 @@ See `docs/PRESENCE_ROSTER_PLAN.md` for the full mode matrix and tradeoffs.
238
238
  their live sessions (multiple browser tabs, mobile, etc.):
239
239
 
240
240
  ```
241
- { id: 7, status: "active", devices: { web: "idle", mobile: "active" } }
241
+ { id: 7, status: "active", devices: { web: "idle", mobile: "active" },
242
+ last_activity: "2026-07-27T15:23:04Z" }
242
243
  ```
243
244
 
244
245
  - `status` — highest activity across devices (the "active anywhere?" answer):
@@ -248,6 +249,11 @@ their live sessions (multiple browser tabs, mobile, etc.):
248
249
  - `offline` — no live sessions
249
250
  - `devices[platform]` — that platform's own status (answers "active on
250
251
  **mobile**?" vs. "active at all?").
252
+ - `last_activity` — ISO8601 timestamp of the most recent input across **all**
253
+ the subject's live sessions (`null` when offline). The roster only
254
+ broadcasts on `status` transitions, so subtract against your own clock to
255
+ derive seconds-idle and apply client-side thresholds without a server
256
+ `timeout` change: `(Date.now() - new Date(m.last_activity)) / 1000`.
251
257
 
252
258
  #### Configure
253
259
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.9
@@ -55,11 +55,25 @@ module WhereIsWaldo
55
55
  PresenceService.all_online_ids(timeout: timeout)
56
56
  end
57
57
 
58
- delegate :subject_online?, to: :PresenceService
58
+ # NOTE: don't use ActiveSupport's `delegate` here. `delegate` generates
59
+ # the method via `class_eval` with a STRING, and a string-eval'd body's
60
+ # `Module.nesting` is just the target class — for a `class << self` inside
61
+ # `module WhereIsWaldo`, that's `[#<Class:WhereIsWaldo>]`, WITHOUT
62
+ # `WhereIsWaldo` itself. Constant lookup for `PresenceService` inside the
63
+ # generated method then can't walk up to the enclosing module and raises
64
+ # `uninitialized constant #<Class:WhereIsWaldo>::PresenceService`. A plain
65
+ # `def` inherits the enclosing lexical nesting and resolves correctly.
66
+ def subject_online?(...)
67
+ PresenceService.subject_online?(...)
68
+ end
59
69
 
60
- delegate :sessions_for_subject, to: :PresenceService
70
+ def sessions_for_subject(...)
71
+ PresenceService.sessions_for_subject(...)
72
+ end
61
73
 
62
- delegate :session_status, to: :PresenceService
74
+ def session_status(...)
75
+ PresenceService.session_status(...)
76
+ end
63
77
 
64
78
  def cleanup(timeout: nil)
65
79
  PresenceService.cleanup(timeout: timeout)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: where_is_waldo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Gibson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-27 00:00:00.000000000 Z
11
+ date: 2026-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails