go_to_webinar 0.2.7 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/go_to_webinar/client.rb +12 -7
- data/lib/go_to_webinar/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: cfea68fbffb7ce80a4db2f95e90e5ddfe2dcc60c3985799d50330df7cd4bbdf2
|
4
|
+
data.tar.gz: 6c83997291535d19f83cd04c5e95a00f4fc713d63bbb96e297885faf8f3e1159
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89a7d3ba63a3a4f8e0b624b17e73edd921cf2032373eeab1e99b16fb307a40d514e1e8a258daacfa70dc929bb7da2eeeda07f0de67649ca42545e8a7b1687556
|
7
|
+
data.tar.gz: 49cc45452cbda420f495dd542dcbd62473f46ef44eaa4bcd7cb93d09b3992659cf03280fa607bcdfbc05a83669844442144c887cf1379e7cd62fe17d1c10c1f7
|
data/lib/go_to_webinar/client.rb
CHANGED
@@ -36,7 +36,7 @@ module GoToWebinar
|
|
36
36
|
end
|
37
37
|
|
38
38
|
def make_path(path)
|
39
|
-
path = path.split(':organizer_key').join(organizer_key)
|
39
|
+
path = path.split(':organizer_key:').join(organizer_key)
|
40
40
|
"#{url}#{path}"
|
41
41
|
end
|
42
42
|
|
@@ -46,12 +46,17 @@ module GoToWebinar
|
|
46
46
|
retries ||= 0
|
47
47
|
yield
|
48
48
|
rescue RestClient::Forbidden => e
|
49
|
-
raise unless (retries += 1)
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
49
|
+
raise unless (retries += 1) <= 2
|
50
|
+
|
51
|
+
if retries < 2
|
52
|
+
raise unless int_error_code(e) == 'InvalidToken'
|
53
|
+
raise unless @g2w_oauth2_client&.access_token&.expired?
|
54
|
+
@access_token = @g2w_oauth2_client.refresh_access_token.token
|
55
|
+
retry
|
56
|
+
elsif retries == 3
|
57
|
+
@g2w_oauth2_client.get_new_access_token
|
58
|
+
retry
|
59
|
+
end
|
55
60
|
end
|
56
61
|
|
57
62
|
def int_error_code(exception)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: go_to_webinar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danilo Jeremias da Silva
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-
|
12
|
+
date: 2020-04-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: oauth2
|