waitmate 0.1.0 → 0.2.0

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: 30977673b611b02e63ff8fe02255181639bf00b51a09a23746deeea6328fc57a
4
- data.tar.gz: 17ca45a6543aa8dd96376c0f77c10e4bf45908b4b20dc1ae5627fa01a4bb4322
3
+ metadata.gz: a31ba7446bd0e0b2468f0e4de27bb1d32f09260d12845f0760d4b737805fc875
4
+ data.tar.gz: b4ce9e6d39885004afeb4dff97bbe7f58f14671233b4cf8147731497a749713b
5
5
  SHA512:
6
- metadata.gz: 05f4fdb33d0ad3f340425d81b872f8a1c07c851ea25d265bbd74238631ec94521fe8e86c512396c47627bb65ed2e9d146ce72ad7de9983a318754ccd40f064be
7
- data.tar.gz: 5377f2ff5b718989ec0a3c67decb03c221470eb31f15c12a355202df85a5e102930af84c1df21ff6964cce83688b1957d2a1c67bf683d48509e7f094f851d163
6
+ metadata.gz: cf219ba5ead8c60be1ab0ebbdc98c5348458144cb6222a15669414d3f69c230bac53725bc745ae72bb319c8d6fbe7b908fa6f9af3f44774148a064c801e7bd9c
7
+ data.tar.gz: 92900c954aef94fb914cb824be5dfc871bb6051e2bf2a7314affa12dac717dcfd46196f8bc8ee09ba48f980c9d6b6f43b7eec049bb895df3f150aa405c0b60a4
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  </p>
8
8
 
9
9
  <p align="center">
10
- <a href="https://github.com/bart-oz/waitmate/releases"><img src="https://img.shields.io/badge/version-0.1.0-blue.svg" alt="Version"></a>
10
+ <a href="https://github.com/bart-oz/waitmate/releases"><img src="https://img.shields.io/badge/version-0.2.0-blue.svg" alt="Version"></a>
11
11
  <a href="LICENSE.txt"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License"></a>
12
12
  <a href="https://github.com/bart-oz/waitmate/actions"><img src="https://img.shields.io/badge/tests-passing-brightgreen.svg" alt="Tests"></a>
13
13
  <a href="https://github.com/bart-oz/waitmate/actions"><img src="https://img.shields.io/badge/coverage-96.36%25-brightgreen.svg" alt="Coverage"></a>
@@ -117,14 +117,35 @@ On the normal waiting path, all of the above except `@error` are present. On the
117
117
 
118
118
  The Redis adapter answers each poll in roughly O(1) time for the requesting user. The Solid Cache adapter, by design, must scan and rank waiting rows to compute a position, so each poll materializes the waiting rows for that queue. This is acceptable for moderate traffic but becomes the throughput bottleneck for large or long queues. Use Redis when polling latency and queue depth matter.
119
119
 
120
- ## Limitations (v0.1)
120
+ ## Limitations (v0.2)
121
121
 
122
- - **Transport:** HTTP polling only. ActionCable/Turbo Streams are deferred to a future release.
122
+ - **Transport:** HTTP polling only. ActionCable/Turbo Streams *push delivery* (server-initiated streams) is deferred to a future release. Turbo Drive redirect compatibility is supported since v0.2.0.
123
123
  - **Integration:** Controller concern only. No Rack middleware.
124
124
  - **Storage:** Redis and Solid Cache only. No additional adapters.
125
125
  - **Framework:** Rails-only. No standalone Rack or non-Rails support.
126
126
  - **UI:** A single, overridable ERB waiting-room page. No admin dashboard, CAPTCHA, or anti-bot functionality.
127
127
 
128
+ ### Turbo Drive escape hatches
129
+
130
+ If you need to disable Turbo Drive for specific links or forms that interact with Waitmate, use the standard Turbo data attributes:
131
+
132
+ ```erb
133
+ <%# Opt a single link or form out of Turbo Drive %>
134
+ <%= link_to "Checkout", checkout_path, data: { turbo: "false" } %>
135
+
136
+ <%# Or force a link to break out of any turbo-frame %>
137
+ <%= link_to "Checkout", checkout_path, data: { turbo_frame: "_top" } %>
138
+ ```
139
+
140
+ ### Security: filter sensitive parameters
141
+
142
+ Waitmate threads `ticket` and `target` as query parameters. Add them to your filter list so they do not appear in logs:
143
+
144
+ ```ruby
145
+ # config/initializers/filter_parameter_logging.rb
146
+ config.filter_parameters += [:ticket, :target]
147
+ ```
148
+
128
149
  ## Development
129
150
 
130
151
  After checking out the repo, run `bundle install` to install dependencies. Then, run `bin/quality` to run the full gate suite: RSpec, StandardRB, appraisal runs against Rails 7.1/7.2/8.0, and `bundler-audit`.
@@ -12,7 +12,7 @@ module Waitmate
12
12
 
13
13
  if pos == 0
14
14
  url = admission_url
15
- return redirect_to(url) if url
15
+ return redirect_to(url, status: :see_other) if url
16
16
  return render_invalid
17
17
  end
18
18
 
@@ -4,6 +4,7 @@
4
4
  <meta charset="utf-8">
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1">
6
6
  <title>Waiting Room</title>
7
+ <meta name="turbo-visit-control" content="reload">
7
8
  <style>
8
9
  :root {
9
10
  --wm-bg: #ffffff;
@@ -86,7 +86,7 @@ module Waitmate
86
86
  query = {ticket: ticket, queue: queue}.compact
87
87
  query[:target] = target if valid_waiting_room_target?(target)
88
88
  path += "?#{query.to_query}" if query.any?
89
- redirect_to(path)
89
+ redirect_to(path, status: :see_other)
90
90
  end
91
91
 
92
92
  def release_wait_room_slot(max_concurrent:)
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Waitmate
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  RUBY_MINIMUM_VERSION = "3.2.0"
6
6
  RAILS_MINIMUM_VERSION = "7.1.0"
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: waitmate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - BartOz