queue_it 2.0.2 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/queue_it/queueable.rb +6 -6
- data/lib/queue_it/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37fa1c47d1ae47fffa2b3bc9b78dad1a983356b232329d8016ea14a6d0a2ecd2
|
4
|
+
data.tar.gz: e2a72cd51b72e2da2ae74f388924e59e4c2664977d8d826d2b35d1a646f4a519
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4f59ab64f17ce5991d321bfbd59ec9d4189a00cc820e080945e58877a8e58eeb368a533a464fe3f4a05e002d889f5ee0723905caf2760cfbd421502cdd938f3
|
7
|
+
data.tar.gz: 48a90881475da361a4b1446162f612419a6c56e250ebe1750c92b504b77a0c8d97f70d5d1909dc24f7bae490a1c076ed13639a3e0c8f688d75a31dbc16035275
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
### 3.0.0 - 2021-07-30
|
2
|
+
|
3
|
+
* Replace session store with cookie store to prevent some users of being kicked out of the queue
|
4
|
+
|
1
5
|
### 2.0.2 - 2021-07-21
|
2
6
|
|
3
7
|
* Defaults changed when creating/updating a queue: CustomLayout set to dark theme, MaxNoOfRedirectsPrQueueId to 3, QueueNumberValidityInMinutes to 30.
|
data/lib/queue_it/queueable.rb
CHANGED
@@ -15,18 +15,18 @@ module QueueIt
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def queue_it_queue_id(event_id)
|
18
|
-
|
18
|
+
cookies.signed[queue_it_session_variable(event_id)].to_i
|
19
19
|
end
|
20
20
|
|
21
21
|
def destroy_all_queue_it_sessions
|
22
22
|
session_variable_prefix = queue_it_session_variable("")
|
23
|
-
|
24
|
-
|
23
|
+
cookies.each do |key, _|
|
24
|
+
cookies.signed.delete(key) if key.starts_with?(session_variable_prefix)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
28
|
def destroy_queue_it_session(event_id)
|
29
|
-
|
29
|
+
cookies.signed.delete(queue_it_session_variable(event_id))
|
30
30
|
end
|
31
31
|
|
32
32
|
def queue_it_session_variable(event_id)
|
@@ -37,14 +37,14 @@ module QueueIt
|
|
37
37
|
|
38
38
|
def create_or_verify_queue_it_session(secret_key, event_id, customer_id, request_url, params, current_tickets_url)
|
39
39
|
# If there exists a session, we return. This needs to be refactored when we start to look at the timestamp parameter
|
40
|
-
return if
|
40
|
+
return if cookies.signed[queue_it_session_variable(event_id)].present?
|
41
41
|
|
42
42
|
begin
|
43
43
|
queue_number = QueueIt::ExtractQueueNumber.new.(
|
44
44
|
secret_key: secret_key,
|
45
45
|
request_url: request_url,
|
46
46
|
request_params: params)
|
47
|
-
|
47
|
+
cookies.signed[queue_it_session_variable(event_id)] = { value: queue_number, expires: 24.hours.from_now }
|
48
48
|
|
49
49
|
# If the request URL contains queue_it params we remove them and redirect
|
50
50
|
# this is done to mask the params we use to create and verify the queue_it session
|
data/lib/queue_it/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue_it
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Billetto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-07-
|
11
|
+
date: 2021-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|