cronofy 0.31.0 → 0.31.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/cronofy/auth.rb +1 -0
- data/lib/cronofy/client.rb +6 -2
- data/lib/cronofy/version.rb +1 -1
- data/spec/lib/cronofy/client_spec.rb +15 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57b29b7a7d74bfeb8effadc79dc1b7db32c55666189bf3cd6a752ee472cf2fef
|
4
|
+
data.tar.gz: 944c20303ab4e950dd6a9fc69e087dff461f50be68a68a2ca97556821529113f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bd2f6482085df5c981a1a31ba9a816ec8cf36a7273c93eb27616a2613f16b9fd00b3803368d6aa9e8373b38eff1686429ce7274f5d30ebc306610f0a9d6ddfee
|
7
|
+
data.tar.gz: 452f25bfe0a6009428fd0ff7f52bd9191391349db2baee1ac325b9fbc76368619ad5f4c944d0cd20ceae7b7c4349441d6b04a67ecfb61a398a0be5a26afedf45
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## [0.31.1]
|
2
|
+
|
3
|
+
* No Authorization header for Real-Time Scheduling and Real-Time Sequencing [#72]
|
4
|
+
|
1
5
|
## [0.31.0]
|
2
6
|
|
3
7
|
* Added support for Element Tokens [#69]
|
@@ -132,6 +136,7 @@
|
|
132
136
|
[0.29.0]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.29.0
|
133
137
|
[0.30.0]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.30.0
|
134
138
|
[0.31.0]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.31.0
|
139
|
+
[0.31.1]: https://github.com/cronofy/cronofy-ruby/releases/tag/v0.31.1
|
135
140
|
|
136
141
|
[#13]: https://github.com/cronofy/cronofy-ruby/pull/13
|
137
142
|
[#16]: https://github.com/cronofy/cronofy-ruby/pull/16
|
@@ -165,3 +170,4 @@
|
|
165
170
|
[#60]: https://github.com/cronofy/cronofy-ruby/pull/60
|
166
171
|
[#62]: https://github.com/cronofy/cronofy-ruby/pull/62
|
167
172
|
[#69]: https://github.com/cronofy/cronofy-ruby/pull/69
|
173
|
+
[#72]: https://github.com/cronofy/cronofy-ruby/pull/72
|
data/lib/cronofy/auth.rb
CHANGED
data/lib/cronofy/client.rb
CHANGED
@@ -1089,7 +1089,7 @@ module Cronofy
|
|
1089
1089
|
translate_available_periods(availability[:available_periods])
|
1090
1090
|
body[:availability] = availability
|
1091
1091
|
|
1092
|
-
response =
|
1092
|
+
response = raw_post("/v1/real_time_scheduling", body)
|
1093
1093
|
parse_json(AddToCalendarResponse, nil , response)
|
1094
1094
|
end
|
1095
1095
|
|
@@ -1175,7 +1175,7 @@ module Cronofy
|
|
1175
1175
|
|
1176
1176
|
body[:availability] = availability
|
1177
1177
|
|
1178
|
-
response =
|
1178
|
+
response = raw_post("/v1/real_time_sequencing", body)
|
1179
1179
|
parse_json(AddToCalendarResponse, nil , response)
|
1180
1180
|
end
|
1181
1181
|
|
@@ -1539,6 +1539,10 @@ module Cronofy
|
|
1539
1539
|
wrapped_request { access_token!.delete(url, json_request_args(body)) }
|
1540
1540
|
end
|
1541
1541
|
|
1542
|
+
def raw_post(url, body)
|
1543
|
+
wrapped_request { @auth.api_client.request(:post, url, json_request_args(body)) }
|
1544
|
+
end
|
1545
|
+
|
1542
1546
|
def wrapped_request
|
1543
1547
|
yield
|
1544
1548
|
rescue OAuth2::Error => e
|
data/lib/cronofy/version.rb
CHANGED
@@ -59,7 +59,7 @@ describe Cronofy::Client do
|
|
59
59
|
headers: correct_response_headers,
|
60
60
|
body: correct_response_body.to_json)
|
61
61
|
|
62
|
-
|
62
|
+
subject
|
63
63
|
end
|
64
64
|
|
65
65
|
it 'raises AuthenticationFailureError on 401s' do
|
@@ -1910,7 +1910,13 @@ describe Cronofy::Client do
|
|
1910
1910
|
let(:request_url) { "https://api.cronofy.com/v1/real_time_scheduling" }
|
1911
1911
|
let(:url) { URI("https://example.com") }
|
1912
1912
|
let(:method) { :post }
|
1913
|
-
|
1913
|
+
|
1914
|
+
let(:request_headers) do
|
1915
|
+
{
|
1916
|
+
"User-Agent" => "Cronofy Ruby #{::Cronofy::VERSION}",
|
1917
|
+
"Content-Type" => "application/json; charset=utf-8",
|
1918
|
+
}
|
1919
|
+
end
|
1914
1920
|
|
1915
1921
|
let(:location) { { :description => "Board room" } }
|
1916
1922
|
let(:transparency) { nil }
|
@@ -1924,7 +1930,6 @@ describe Cronofy::Client do
|
|
1924
1930
|
Cronofy::Client.new(
|
1925
1931
|
client_id: client_id,
|
1926
1932
|
client_secret: client_secret,
|
1927
|
-
access_token: token,
|
1928
1933
|
)
|
1929
1934
|
end
|
1930
1935
|
|
@@ -2059,7 +2064,13 @@ describe Cronofy::Client do
|
|
2059
2064
|
let(:request_url) { "https://api.cronofy.com/v1/real_time_sequencing" }
|
2060
2065
|
let(:url) { URI("https://example.com") }
|
2061
2066
|
let(:method) { :post }
|
2062
|
-
|
2067
|
+
|
2068
|
+
let(:request_headers) do
|
2069
|
+
{
|
2070
|
+
"User-Agent" => "Cronofy Ruby #{::Cronofy::VERSION}",
|
2071
|
+
"Content-Type" => "application/json; charset=utf-8",
|
2072
|
+
}
|
2073
|
+
end
|
2063
2074
|
|
2064
2075
|
let(:location) { { :description => "Board room" } }
|
2065
2076
|
let(:transparency) { nil }
|
@@ -2073,7 +2084,6 @@ describe Cronofy::Client do
|
|
2073
2084
|
Cronofy::Client.new(
|
2074
2085
|
client_id: client_id,
|
2075
2086
|
client_secret: client_secret,
|
2076
|
-
access_token: token,
|
2077
2087
|
)
|
2078
2088
|
end
|
2079
2089
|
|