turbo_presence 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2ee5db52579ed7076c47759a0ba6c42885a8215f15eb6c63971bd0b1e49b6dd
4
- data.tar.gz: 704948a0bafe49ed6861b9e66badcaf5c88f5cb15c0dfd6daaecf83aefb1a2ab
3
+ metadata.gz: 9cfb2edd8258f93bd85b886fd1f5c818f96b7aee6760aef3794d62e6c21a0544
4
+ data.tar.gz: 0ce3b90dee9d3018f54c5c1db7212ed1f4f4e7b10e5ec339953993a104fb495e
5
5
  SHA512:
6
- metadata.gz: 27ee5e78a336371e45c84e2dd9d09ccf5022b6023c38676de6cceec5ab10dbe8bf3addb25aacceb9ef27422ebba18f30eb0a482d57b174e254d54ed7a071168e
7
- data.tar.gz: 776a5f1558a49fa4fecda33ad9c8554a8ab81e542ff98d0dffa03449081613591a3e16590f5b817d3cb77310878671544ef70da13e91de861d7157a6de7b8625
6
+ metadata.gz: d216fd49528c85ef006ccbf163f0c41fdedc1d5f7577cd3c8daa01491e5e2130d8753a607ecfc1f7dcda1a23c404aa9f544b1bed994adbd3610dbef1ab5c6399
7
+ data.tar.gz: 6e22dfc5ac16e3620fe4fe5c267b66b32044478dfd2ae5890ceca9b915818809a833d642059d02bba2aa387a2789989793debb1369f94d502a786d11500eb191
data/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ## [0.1.1] — 2026-06-08
4
+
5
+ ### Fixed
6
+ - `turbo_presence_for` view helper now sets `room_token` and `identity` as proper Stimulus values (with `-value` suffix). In 0.1.0, these were set as plain data attributes (`data-turbo-presence-room-token` / `data-turbo-presence-identity`), which Stimulus never read — causing the channel subscription to silently fail with `undefined` room token and identity.
7
+ - `turbo_presence_for` now correctly forwards a block to the wrapping `div`, allowing content to be rendered inside the presence container.
8
+
9
+ ### Added
10
+ - Full spec coverage for `TurboPresence::ViewHelper` (was previously untested and excluded from coverage).
11
+
12
+ ## [0.1.0] — 2026-06-02
13
+
14
+ ### Added
15
+ - Initial release: `turbo_presence_for` view helper, Action Cable channel, Redis/memory presence store, Stimulus controller (cursors, avatar stack, typing indicator), RSpec test helpers.
data/README.md CHANGED
@@ -311,6 +311,15 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for full guidelines.
311
311
 
312
312
  ---
313
313
 
314
+ ## From the same author
315
+
316
+ Small, sharp Ruby gems built to the same standard — 100% test coverage, zero dependencies beyond what's needed.
317
+
318
+ | Gem | What it does |
319
+ |-----|-------------|
320
+ | [promptscrub](https://github.com/jibranusman95/promptscrub) | PII redaction middleware for LLM calls — strip sensitive data from prompts, rehydrate in responses |
321
+ | [http_decoy](https://github.com/jibranusman95/http_decoy) | A real Rack server that runs inside your RSpec tests — test HTTP contracts, not stubs |
322
+
314
323
  ## License
315
324
 
316
325
  MIT. See [LICENSE](LICENSE).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TurboPresence
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
5
5
  end
@@ -3,21 +3,22 @@
3
3
  module TurboPresence
4
4
  module ViewHelper
5
5
  def turbo_presence_for(record, cursors: true, typing: true, class: nil, &block)
6
- token = RoomToken.generate(record)
7
- identity = TurboPresence.identify_current_user(current_user)
6
+ token = RoomToken.generate(record)
7
+ identity = TurboPresence.identify_current_user(current_user)
8
8
  identity[:color] ||= Color.for_user(identity[:id])
9
9
  css_class = binding.local_variable_get(:class)
10
10
 
11
11
  tag.div(
12
12
  data: {
13
13
  controller: "turbo-presence",
14
- turbo_presence_room_token: token,
15
- turbo_presence_identity: identity.to_json,
16
- turbo_presence_cursors_value: cursors,
17
- turbo_presence_typing_value: typing,
18
- turbo_presence_throttle_value: TurboPresence.configuration.cursor_throttle_ms
14
+ turbo_presence_room_token_value: token,
15
+ turbo_presence_identity_value: identity.to_json,
16
+ turbo_presence_cursors_value: cursors,
17
+ turbo_presence_typing_value: typing,
18
+ turbo_presence_throttle_value: TurboPresence.configuration.cursor_throttle_ms
19
19
  },
20
- class: ["turbo-presence", css_class].compact.join(" ")
20
+ class: ["turbo-presence", css_class].compact.join(" "),
21
+ &block
21
22
  )
22
23
  end
23
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: turbo_presence
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jibran Usman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-03 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -49,6 +49,7 @@ extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
51
  - ".rubocop.yml"
52
+ - CHANGELOG.md
52
53
  - README.md
53
54
  - Rakefile
54
55
  - app/channels/turbo_presence_channel.rb