queue_it 3.0.1 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/CHANGELOG.md +6 -0
- data/lib/faraday/raise_http_exception.rb +5 -5
- data/lib/queue_it/api/event.rb +4 -3
- data/lib/queue_it/queueable.rb +1 -1
- data/lib/queue_it/version.rb +1 -1
- data/queue_it.gemspec +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d41bbeae962615d6d329028063c18dd96e88ff9a7af77a4ac0fe34d2e12f41b
|
4
|
+
data.tar.gz: 27536b3121140555b71a3ad4b95167662fa2c6d53f2cc91e4a600a64f60525c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12f8adce016f0041a0d0c577e2b23f1aa596bc2499a980af9e451b9e153b04d5616d1a6136e5f27d74f6fb2e8c910a42eb89bb1d1abc8c7203b59f702eb61f13
|
7
|
+
data.tar.gz: 5222b279e323fb5791523a8b9b65800715f815dc0a146d35e20020ab702c00634f39efd8753ad0408fa77ed81575f435c8e9b4447f74163747ba50e48e1a0a0f
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.1.3
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
### 4.0.0 - 2023-02-22
|
2
|
+
|
3
|
+
* Use `Same-Site: none` for cookies so that they work in iframes on third-party sites
|
4
|
+
* Bump bundler version to `~> 2`
|
5
|
+
* Bump ruby version to 3.1.3
|
6
|
+
|
1
7
|
### 3.0.1 - 2021-08-01
|
2
8
|
|
3
9
|
* Correctly delete cookies when a session is destroyed
|
@@ -7,15 +7,15 @@ module FaradayMiddleware
|
|
7
7
|
@app.call(env).on_complete do |response|
|
8
8
|
case response[:status].to_i
|
9
9
|
when 400
|
10
|
-
raise QueueIt::Api::BadRequest.new(response.body, error_details(response))
|
10
|
+
raise QueueIt::Api::BadRequest.new(response.body, **error_details(response))
|
11
11
|
when 403
|
12
|
-
raise QueueIt::Api::Forbidden.new(response.body, error_details(response))
|
12
|
+
raise QueueIt::Api::Forbidden.new(response.body, **error_details(response))
|
13
13
|
when 404
|
14
|
-
raise QueueIt::Api::NotFound.new(response.body, error_details(response))
|
14
|
+
raise QueueIt::Api::NotFound.new(response.body, **error_details(response))
|
15
15
|
when 500
|
16
|
-
raise QueueIt::Api::InternalServerError.new(response.body, error_details(response))
|
16
|
+
raise QueueIt::Api::InternalServerError.new(response.body, **error_details(response))
|
17
17
|
when 503
|
18
|
-
raise QueueIt::Api::ServiceUnavailable.new(response.body, error_details(response))
|
18
|
+
raise QueueIt::Api::ServiceUnavailable.new(response.body, **error_details(response))
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
data/lib/queue_it/api/event.rb
CHANGED
@@ -11,7 +11,7 @@ module QueueIt
|
|
11
11
|
self.client = client
|
12
12
|
end
|
13
13
|
|
14
|
-
def create_or_update(event_id:, display_name:, start_time:, pre_queue_start_time:nil, know_user_secret_key: nil, redirect_url:, end_time: nil, description: "", event_culture_name: "en-US", time_zone: "UTC", queue_number_validity_in_minutes: 30, max_no_of_redirects: 1, custom_layout: "Default layout by Queue-it")
|
14
|
+
def create_or_update(event_id:, display_name:, start_time:, pre_queue_start_time:nil, know_user_secret_key: nil, redirect_url:, end_time: nil, description: "", event_culture_name: "en-US", time_zone: "UTC", queue_number_validity_in_minutes: 30, max_no_of_redirects: 1, custom_layout: "Default layout by Queue-it", domain_alias: "")
|
15
15
|
raise InvalidEventIdFormat unless valid_event_id_format?(event_id)
|
16
16
|
|
17
17
|
attributes = queue_attributes(
|
@@ -26,6 +26,7 @@ module QueueIt
|
|
26
26
|
queue_number_validity_in_minutes: queue_number_validity_in_minutes,
|
27
27
|
time_zone: time_zone,
|
28
28
|
max_no_of_redirects: max_no_of_redirects,
|
29
|
+
domain_alias: domain_alias,
|
29
30
|
custom_layout: custom_layout
|
30
31
|
)
|
31
32
|
|
@@ -100,7 +101,7 @@ module QueueIt
|
|
100
101
|
MICROSOFT_TIME_ZONE_INDEX_VALUES.fetch(time_zone, time_zone)
|
101
102
|
end
|
102
103
|
|
103
|
-
def queue_attributes(pre_queue_start_time:, start_time:, end_time:, know_user_secret_key:, redirect_url:, description:, display_name:, event_culture_name:, queue_number_validity_in_minutes:, time_zone:, max_no_of_redirects:, custom_layout:)
|
104
|
+
def queue_attributes(pre_queue_start_time:, start_time:, end_time:, know_user_secret_key:, redirect_url:, description:, display_name:, event_culture_name:, queue_number_validity_in_minutes:, time_zone:, max_no_of_redirects:, custom_layout:,domain_alias:)
|
104
105
|
{
|
105
106
|
"DisplayName" => display_name,
|
106
107
|
"RedirectUrl" => URI(redirect_url).to_s,
|
@@ -122,7 +123,7 @@ module QueueIt
|
|
122
123
|
"CustomLayout" => custom_layout,
|
123
124
|
"XUsersInFrontOfYou" => nil,
|
124
125
|
"TargetUrlValidationRegex" => "",
|
125
|
-
"DomainAlias" =>
|
126
|
+
"DomainAlias" => domain_alias,
|
126
127
|
"AllowedCustomLayouts" => [],
|
127
128
|
"BrowserCultureEnabled" => "True",
|
128
129
|
"IdleQueueLogic" => "UseBeforePage",
|
data/lib/queue_it/queueable.rb
CHANGED
@@ -44,7 +44,7 @@ module QueueIt
|
|
44
44
|
secret_key: secret_key,
|
45
45
|
request_url: request_url,
|
46
46
|
request_params: params)
|
47
|
-
cookies.signed[queue_it_session_variable(event_id)] = { value: queue_number, expires: 24.hours.from_now }
|
47
|
+
cookies.signed[queue_it_session_variable(event_id)] = { value: queue_number, expires: 24.hours.from_now, same_site: :none }
|
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
data/queue_it.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.add_runtime_dependency "faraday", "<= 2.0", ">= 0.9"
|
23
23
|
spec.add_runtime_dependency "faraday_middleware", "<= 2.0", ">= 0.9"
|
24
24
|
|
25
|
-
spec.add_development_dependency "bundler", "~>
|
25
|
+
spec.add_development_dependency "bundler", "~> 2"
|
26
26
|
spec.add_development_dependency "rspec", "~> 3.2"
|
27
27
|
spec.add_development_dependency "webmock", "~> 3.3"
|
28
28
|
end
|
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: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Billetto
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
73
|
+
version: '2'
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '
|
80
|
+
version: '2'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: rspec
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -141,7 +141,7 @@ homepage: https://github.com/gfish/queue_it
|
|
141
141
|
licenses:
|
142
142
|
- GNU/GPLv3
|
143
143
|
metadata: {}
|
144
|
-
post_install_message:
|
144
|
+
post_install_message:
|
145
145
|
rdoc_options: []
|
146
146
|
require_paths:
|
147
147
|
- lib
|
@@ -156,8 +156,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
156
156
|
- !ruby/object:Gem::Version
|
157
157
|
version: '0'
|
158
158
|
requirements: []
|
159
|
-
rubygems_version: 3.
|
160
|
-
signing_key:
|
159
|
+
rubygems_version: 3.3.26
|
160
|
+
signing_key:
|
161
161
|
specification_version: 4
|
162
162
|
summary: Gem to handle the implementation of http://queue-it.net
|
163
163
|
test_files:
|