ringcentral_sdk 2.2.1 → 2.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: a8693224c967421fbc2541c642d87fa9a9048418
4
- data.tar.gz: 4ce478508093b27f3a9d9c0fa9d2c69eae31c487
2
+ SHA256:
3
+ metadata.gz: 041636706eb44f91cac7b01717c159d619d274b95cacd86bdc7b57fb77a647e1
4
+ data.tar.gz: 2bacdda5e1e00e2bbe62c2b1a870c32612b3678743ee8498e66a4a9d4de5ba06
5
5
  SHA512:
6
- metadata.gz: f96cb58e1ad977bf2b9dd82032032128f3233ddc39b70294ade2769d946b2a753569060005d7295476a4211957bd69b6e037917c5250aaf99988a63a5f753f9e
7
- data.tar.gz: 6b0de930aa9ed09355a1bb00a66b825d12e3546c08acb247cc127c6bf8f4309b02480798c2792a2ce4507e8bb676f878782fa87e4c156a534c25aa3a1aef2f1b
6
+ metadata.gz: 8942120e62b78fb12fab23ee045ea9ddd0081438c406a036f703590573c47456ba89578e60f24b5a00454fd851d190d69bdca81e662feb6ce2ea36749ab8fec2
7
+ data.tar.gz: e30e0d1110f29a85eae7b770a8f325335bc89c23b150497ceef61a000eed4f503a297b85dc693cafd40f7276d8bd929e9dee5d9eb70017f722f9b04549db65de
data/CHANGELOG.md CHANGED
@@ -1,12 +1,11 @@
1
1
  CHANGELOG
2
2
  ---------
3
3
  - **2017-06-20**: 2.2.1
4
+ - Additions
5
+ - Generic Multipart helper
4
6
  - Bugfixes
5
7
  - Fix `client.authorize_url`
6
8
  - Fix OAuth2 Sintra demo
7
- - **2017-06-05**: 2.2.0
8
- - Additions
9
- - Generic Multipart helper
10
9
  - **2017-04-01**: 2.1.0
11
10
  - Additions
12
11
  - Add SMS/MMS helper and demo
data/Gemfile.lock ADDED
@@ -0,0 +1,171 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ringcentral_sdk (2.2.2)
5
+ dotenv (~> 2.1, >= 2.8.1)
6
+ faraday (~> 1.10, >= 1.10.3)
7
+ faraday_middleware (~> 1.2, >= 1.2.0)
8
+ faraday_middleware-oauth2_refresh (~> 0.1.3, >= 0.1.3)
9
+ faraday_middleware-request-retry (~> 0.2.1, >= 0.2.1)
10
+ jsondoc (~> 0.1, >= 0.1.4)
11
+ logger (~> 1)
12
+ mime (~> 0.4, >= 0.4.4)
13
+ mime-types (~> 3.4)
14
+ mime_builder (~> 0.1, >= 0.1.1)
15
+ multi_json (~> 1.3)
16
+ oauth2 (~> 2.0, >= 2.0.9)
17
+ pubnub (~> 5.0, >= 5.2.1)
18
+
19
+ GEM
20
+ remote: https://rubygems.org/
21
+ specs:
22
+ addressable (2.8.1)
23
+ public_suffix (>= 2.0.2, < 6.0)
24
+ concurrent-ruby (1.1.10)
25
+ concurrent-ruby-edge (0.5.0)
26
+ concurrent-ruby (~> 1.1.5)
27
+ coveralls (0.7.2)
28
+ multi_json (~> 1.3)
29
+ rest-client (= 1.6.7)
30
+ simplecov (>= 0.7)
31
+ term-ansicolor (= 1.2.2)
32
+ thor (= 0.18.1)
33
+ docile (1.4.0)
34
+ dotenv (2.8.1)
35
+ dry-configurable (1.0.1)
36
+ dry-core (~> 1.0, < 2)
37
+ zeitwerk (~> 2.6)
38
+ dry-core (1.0.0)
39
+ concurrent-ruby (~> 1.0)
40
+ zeitwerk (~> 2.6)
41
+ dry-inflector (1.0.0)
42
+ dry-initializer (3.1.1)
43
+ dry-logic (1.5.0)
44
+ concurrent-ruby (~> 1.0)
45
+ dry-core (~> 1.0, < 2)
46
+ zeitwerk (~> 2.6)
47
+ dry-schema (1.13.0)
48
+ concurrent-ruby (~> 1.0)
49
+ dry-configurable (~> 1.0, >= 1.0.1)
50
+ dry-core (~> 1.0, < 2)
51
+ dry-initializer (~> 3.0)
52
+ dry-logic (>= 1.5, < 2)
53
+ dry-types (>= 1.7, < 2)
54
+ zeitwerk (~> 2.6)
55
+ dry-types (1.7.0)
56
+ concurrent-ruby (~> 1.0)
57
+ dry-core (~> 1.0, < 2)
58
+ dry-inflector (~> 1.0, < 2)
59
+ dry-logic (>= 1.4, < 2)
60
+ zeitwerk (~> 2.6)
61
+ dry-validation (1.10.0)
62
+ concurrent-ruby (~> 1.0)
63
+ dry-core (~> 1.0, < 2)
64
+ dry-initializer (~> 3.0)
65
+ dry-schema (>= 1.12, < 2)
66
+ zeitwerk (~> 2.6)
67
+ faraday (1.10.3)
68
+ faraday-em_http (~> 1.0)
69
+ faraday-em_synchrony (~> 1.0)
70
+ faraday-excon (~> 1.1)
71
+ faraday-httpclient (~> 1.0)
72
+ faraday-multipart (~> 1.0)
73
+ faraday-net_http (~> 1.0)
74
+ faraday-net_http_persistent (~> 1.0)
75
+ faraday-patron (~> 1.0)
76
+ faraday-rack (~> 1.0)
77
+ faraday-retry (~> 1.0)
78
+ ruby2_keywords (>= 0.0.4)
79
+ faraday-em_http (1.0.0)
80
+ faraday-em_synchrony (1.0.0)
81
+ faraday-excon (1.1.0)
82
+ faraday-httpclient (1.0.1)
83
+ faraday-multipart (1.0.4)
84
+ multipart-post (~> 2)
85
+ faraday-net_http (1.0.1)
86
+ faraday-net_http_persistent (1.2.0)
87
+ faraday-patron (1.0.0)
88
+ faraday-rack (1.0.0)
89
+ faraday-retry (1.0.3)
90
+ faraday_middleware (1.2.0)
91
+ faraday (~> 1.0)
92
+ faraday_middleware-oauth2_refresh (0.1.3)
93
+ faraday (~> 1.10, >= 1.10.3)
94
+ faraday_middleware (~> 1.2, >= 1.2.0)
95
+ faraday_middleware-request-retry (0.2.1)
96
+ faraday (~> 1.10, >= 1.10.3)
97
+ faraday_middleware (~> 1.2, >= 1.2.0)
98
+ hashie (5.0.0)
99
+ httpclient (2.8.3)
100
+ json (2.6.3)
101
+ jsondoc (0.1.4)
102
+ jwt (2.7.0)
103
+ logger (1.5.3)
104
+ mime (0.4.4)
105
+ mime-types (3.4.1)
106
+ mime-types-data (~> 3.2015)
107
+ mime-types-data (3.2022.0105)
108
+ mime_builder (0.1.1)
109
+ mime (~> 0.4, >= 0.4.4)
110
+ mime-types (~> 3.4, >= 3.4.1)
111
+ multi_json (~> 1, >= 1.15.0)
112
+ mocha (2.0.2)
113
+ ruby2_keywords (>= 0.0.5)
114
+ multi_json (1.15.0)
115
+ multi_xml (0.6.0)
116
+ multipart-post (2.3.0)
117
+ oauth2 (2.0.9)
118
+ faraday (>= 0.17.3, < 3.0)
119
+ jwt (>= 1.0, < 3.0)
120
+ multi_xml (~> 0.5)
121
+ rack (>= 1.2, < 4)
122
+ snaky_hash (~> 2.0)
123
+ version_gem (~> 1.1)
124
+ power_assert (2.0.3)
125
+ public_suffix (5.0.1)
126
+ pubnub (5.2.1)
127
+ addressable (>= 2.0.0)
128
+ concurrent-ruby (~> 1.1.5)
129
+ concurrent-ruby-edge (~> 0.5.0)
130
+ dry-validation (~> 1.0)
131
+ httpclient (~> 2.8, >= 2.8.3)
132
+ json (>= 2.2.0, < 3)
133
+ timers (>= 4.3.0)
134
+ rack (3.0.4.1)
135
+ rake (13.0.6)
136
+ rest-client (1.6.7)
137
+ mime-types (>= 1.16)
138
+ ruby2_keywords (0.0.5)
139
+ simplecov (0.22.0)
140
+ docile (~> 1.1)
141
+ simplecov-html (~> 0.11)
142
+ simplecov_json_formatter (~> 0.1)
143
+ simplecov-html (0.12.3)
144
+ simplecov_json_formatter (0.1.4)
145
+ snaky_hash (2.0.1)
146
+ hashie
147
+ version_gem (~> 1.1, >= 1.1.1)
148
+ term-ansicolor (1.2.2)
149
+ tins (~> 0.8)
150
+ test-unit (3.5.7)
151
+ power_assert
152
+ thor (0.18.1)
153
+ timers (4.3.5)
154
+ tins (0.13.2)
155
+ version_gem (1.1.1)
156
+ zeitwerk (2.6.7)
157
+
158
+ PLATFORMS
159
+ x86_64-darwin-21
160
+
161
+ DEPENDENCIES
162
+ bundler (~> 2)
163
+ coveralls (~> 0)
164
+ mocha (~> 2)
165
+ rake (~> 13)
166
+ ringcentral_sdk!
167
+ simplecov (~> 0)
168
+ test-unit (~> 3)
169
+
170
+ BUNDLED WITH
171
+ 2.4.2
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2015-2017 John Wang
3
+ Copyright (c) 2015-2023 John Wang
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,19 +1,17 @@
1
1
  RingCentral SDK for Ruby
2
2
  ========================
3
3
 
4
- [![Gem Version][gem-version-svg]][gem-version-link]
5
- [![Build Status][build-status-svg]][build-status-link]
6
- [![Coverage Status][coverage-status-svg]][coverage-status-link]
7
- [![Dependency Status][dependency-status-svg]][dependency-status-link]
8
- [![Codacy Badge][codacy-svg]][codacy-link]
9
- [![Code Climate][codeclimate-status-svg]][codeclimate-status-link]
10
- [![Scrutinizer Code Quality][scrutinizer-status-svg]][scrutinizer-status-link]
11
- [![Downloads][downloads-svg]][downloads-link]
12
- [![Docs][docs-readthedocs-svg]][docs-readthedocs-link]
13
- [![Docs][docs-rubydoc-svg]][docs-rubydoc-link]
14
- [![License][license-svg]][license-link]
15
-
16
- [![Stories in Ready][story-status-svg]][story-status-link]
4
+ [![Gem Version][gem-version-svg]][gem-version-url]
5
+ [![Build Status][build-status-svg]][build-status-url]
6
+ [![Coverage Status][coverage-status-svg]][coverage-status-url]
7
+ [![Code Climate][codeclimate-status-svg]][codeclimate-status-url]
8
+ [![Scrutinizer Code Quality][scrutinizer-status-svg]][scrutinizer-status-url]
9
+ [![Docs][docs-readthedocs-svg]][docs-readthedocs-url]
10
+ [![Docs][docs-rubydoc-svg]][docs-rubydoc-url]
11
+ [![License][license-svg]][license-url]
12
+
13
+ [![Stack Overflow][stackoverflow-svg]][stackoverflow-url]
14
+ [![Chat][chat-svg]][chat-url]
17
15
 
18
16
  ## Table of contents
19
17
 
@@ -82,7 +80,7 @@ $ gem install ringcentral_sdk
82
80
  ### Synopsis
83
81
 
84
82
  ```ruby
85
- require 'rinngcentral_sdk'
83
+ require 'ringcentral_sdk'
86
84
 
87
85
  client = RingCentralSdk::REST::Client.new do |config|
88
86
  # App info (mandatory)
@@ -251,29 +249,33 @@ RingCentral Official SDKs
251
249
 
252
250
  RingCentral SDK is available under an MIT-style license. See [LICENSE.md](LICENSE.md) for details.
253
251
 
254
- RingCentral SDK &copy; 2015-2017 by John Wang
252
+ RingCentral SDK &copy; 2015-2023 by John Wang
255
253
 
256
254
  [gem-version-svg]: https://badge.fury.io/rb/ringcentral_sdk.svg
257
- [gem-version-link]: http://badge.fury.io/rb/ringcentral_sdk
255
+ [gem-version-url]: http://badge.fury.io/rb/ringcentral_sdk
258
256
  [downloads-svg]: http://ruby-gem-downloads-badge.herokuapp.com/ringcentral_sdk
259
- [downloads-link]: https://rubygems.org/gems/ringcentral_sdk
257
+ [downloads-url]: https://rubygems.org/gems/ringcentral_sdk
260
258
  [build-status-svg]: https://api.travis-ci.org/grokify/ringcentral-sdk-ruby.svg?branch=master
261
- [build-status-link]: https://travis-ci.org/grokify/ringcentral-sdk-ruby
259
+ [build-status-url]: https://travis-ci.org/grokify/ringcentral-sdk-ruby
262
260
  [coverage-status-svg]: https://coveralls.io/repos/grokify/ringcentral-sdk-ruby/badge.svg?branch=master
263
- [coverage-status-link]: https://coveralls.io/r/grokify/ringcentral-sdk-ruby?branch=master
261
+ [coverage-status-url]: https://coveralls.io/r/grokify/ringcentral-sdk-ruby?branch=master
264
262
  [dependency-status-svg]: https://gemnasium.com/grokify/ringcentral-sdk-ruby.svg
265
- [dependency-status-link]: https://gemnasium.com/grokify/ringcentral-sdk-ruby
263
+ [dependency-status-url]: https://gemnasium.com/grokify/ringcentral-sdk-ruby
266
264
  [codacy-svg]: https://api.codacy.com/project/badge/Grade/4792fe45b56b4841a7e6099c316ac0f8
267
- [codacy-link]: https://www.codacy.com/app/grokify/ringcentral-sdk-ruby
265
+ [codacy-url]: https://www.codacy.com/app/grokify/ringcentral-sdk-ruby
268
266
  [codeclimate-status-svg]: https://codeclimate.com/github/grokify/ringcentral-sdk-ruby/badges/gpa.svg
269
- [codeclimate-status-link]: https://codeclimate.com/github/grokify/ringcentral-sdk-ruby
267
+ [codeclimate-status-url]: https://codeclimate.com/github/grokify/ringcentral-sdk-ruby
270
268
  [scrutinizer-status-svg]: https://scrutinizer-ci.com/g/grokify/ringcentral-sdk-ruby/badges/quality-score.png?b=master
271
- [scrutinizer-status-link]: https://scrutinizer-ci.com/g/grokify/ringcentral-sdk-ruby/?branch=master
269
+ [scrutinizer-status-url]: https://scrutinizer-ci.com/g/grokify/ringcentral-sdk-ruby/?branch=master
272
270
  [story-status-svg]: https://badge.waffle.io/grokify/ringcentral-sdk-ruby.svg?label=ready&title=Ready
273
- [story-status-link]: https://waffle.io/grokify/ringcentral-sdk-ruby
271
+ [story-status-url]: https://waffle.io/grokify/ringcentral-sdk-ruby
274
272
  [docs-readthedocs-svg]: https://img.shields.io/badge/docs-readthedocs-blue.svg
275
- [docs-readthedocs-link]: http://ringcentral-sdk-ruby.readthedocs.org/
273
+ [docs-readthedocs-url]: http://ringcentral-sdk-ruby.readthedocs.org/
276
274
  [docs-rubydoc-svg]: https://img.shields.io/badge/docs-rubydoc-blue.svg
277
- [docs-rubydoc-link]: http://www.rubydoc.info/gems/ringcentral_sdk/
275
+ [docs-rubydoc-url]: http://www.rubydoc.info/gems/ringcentral_sdk/
278
276
  [license-svg]: https://img.shields.io/badge/license-MIT-blue.svg
279
- [license-link]: https://github.com/grokify/ringcentral-sdk-ruby/blob/master/LICENSE.md
277
+ [license-url]: https://github.com/grokify/ringcentral-sdk-ruby/blob/master/LICENSE.md
278
+ [chat-svg]: https://img.shields.io/badge/chat-on%20glip-orange.svg
279
+ [chat-url]: https://glipped.herokuapp.com/
280
+ [stackoverflow-svg]: https://img.shields.io/badge/Stack%20Overflow-ringcentral-orange.svg
281
+ [stackoverflow-url]: https://stackoverflow.com/questions/tagged/ringcentral
@@ -11,17 +11,17 @@ module RingCentralSdk
11
11
  # Client is the RingCentral REST API client class which handles
12
12
  # HTTP requests with built-in OAuth handling
13
13
  class Client
14
- ACCESS_TOKEN_TTL = 600 # 10 minutes
14
+ ACCESS_TOKEN_TTL = 600 # 10 minutes
15
15
  REFRESH_TOKEN_TTL = 36_000 # 10 hours
16
16
  REFRESH_TOKEN_TTL_REMEMBER = 604_800 # 1 week
17
- ACCOUNT_PREFIX = '/account/'.freeze
18
- ACCOUNT_ID = '~'.freeze
19
- AUTHZ_ENDPOINT = '/restapi/oauth/authorize'.freeze
20
- TOKEN_ENDPOINT = '/restapi/oauth/token'.freeze
21
- REVOKE_ENDPOINT = '/restapi/oauth/revoke'.freeze
22
- API_VERSION = 'v1.0'.freeze
23
- URL_PREFIX = '/restapi'.freeze
24
- DEFAULT_LANGUAGE = 'en-us'.freeze
17
+ ACCOUNT_PREFIX = '/account/'.freeze
18
+ ACCOUNT_ID = '~'.freeze
19
+ AUTHZ_ENDPOINT = '/restapi/oauth/authorize'.freeze
20
+ TOKEN_ENDPOINT = '/restapi/oauth/token'.freeze
21
+ REVOKE_ENDPOINT = '/restapi/oauth/revoke'.freeze
22
+ API_VERSION = 'v1.0'.freeze
23
+ URL_PREFIX = '/restapi'.freeze
24
+ DEFAULT_LANGUAGE = 'en-us'.freeze
25
25
 
26
26
  attr_reader :config
27
27
  attr_reader :http
@@ -43,18 +43,18 @@ module RingCentralSdk
43
43
 
44
44
  def load_environment
45
45
  Dotenv.load
46
- @server_url = ENV['RC_SERVER_URL'] if ENV.key? 'RC_SERVER_URL'
47
- @app_key = ENV['RC_APP_KEY'] if ENV.key? 'RC_APP_KEY'
48
- @app_secret = ENV['RC_APP_SECRET'] if ENV.key? 'RC_APP_SECRET'
49
- @redirect_url = ENV['RC_APP_REDIRECT_URL'] if ENV.key? 'RC_APP_REDIRECT_URL'
50
- @username = ENV['RC_USER_USERNAME'] if ENV.key? 'RC_USER_USERNAME'
51
- @extension = ENV['RC_USER_EXTENSION'] if ENV.key? 'RC_USER_EXTENSION'
52
- @password = ENV['RC_USER_PASSWORD'] if ENV.key? 'RC_USER_PASSWORD'
53
- @token = ENV['RC_TOKEN'] if ENV.key? 'RC_TOKEN'
54
- @token_file = ENV['RC_TOKEN_FILE'] if ENV.key? 'RC_TOKEN_FILE'
55
- @retry = ENV['RC_RETRY'] if ENV.key? 'RC_RETRY'
56
- @retry_options = ENV['RC_RETRY_OPTIONS'] if ENV.key? 'RC_RETRY_OPTIONS'
57
- @headers = ENV['RC_HEADERS'] if ENV.key? 'RC_HEADERS'
46
+ @server_url = ENV['RINGCENTRAL_SERVER_URL'] if ENV.key? 'RINGCENTRAL_SERVER_URL'
47
+ @app_key = ENV['RINGCENTRAL_CLIENT_ID'] if ENV.key? 'RINGCENTRAL_CLIENT_ID'
48
+ @app_secret = ENV['RINGCENTRAL_CLIENT_SECRET'] if ENV.key? 'RINGCENTRAL_CLIENT_SECRET'
49
+ @redirect_url = ENV['RINGCENTRAL_REDIRECT_URL'] if ENV.key? 'RINGCENTRAL_REDIRECT_URL'
50
+ @username = ENV['RINGCENTRAL_USERNAME'] if ENV.key? 'RINGCENTRAL_USERNAME'
51
+ @extension = ENV['RINGCENTRAL_EXTENSION'] if ENV.key? 'RINGCENTRAL_EXTENSION'
52
+ @password = ENV['RINGCENTRAL_PASSWORD'] if ENV.key? 'RINGCENTRAL_PASSWORD'
53
+ @token = ENV['RINGCENTRAL_TOKEN'] if ENV.key? 'RINGCENTRAL_TOKEN'
54
+ @token_file = ENV['RINGCENTRAL_TOKEN_FILE'] if ENV.key? 'RINGCENTRAL_TOKEN_FILE'
55
+ @retry = ENV['RINGCENTRAL_RETRY'] if ENV.key? 'RINGCENTRAL_RETRY'
56
+ @retry_options = ENV['RINGCENTRAL_RETRY_OPTIONS'] if ENV.key? 'RINGCENTRAL_RETRY_OPTIONS'
57
+ @headers = ENV['RINGCENTRAL_HEADERS'] if ENV.key? 'RINGCENTRAL_HEADERS'
58
58
  end
59
59
 
60
60
  def inflate_retry
@@ -101,7 +101,7 @@ module RingCentralSdk
101
101
  end
102
102
 
103
103
  def authorize_url
104
- URI.join(@server_url, RingCentralSdk::REST::Client::AUTHZ_ENDPOINT)
104
+ URI.join @server_url, RingCentralSdk::REST::Client::AUTHZ_ENDPOINT
105
105
  end
106
106
  end
107
107
  end
@@ -25,7 +25,7 @@ module RingCentralSdk
25
25
  def create(opts)
26
26
  req = RingCentralSdk::REST::Request::SMS.new
27
27
  req.add_metadata({
28
- to: opts[:to],
28
+ to: opts[:to],
29
29
  from: opts[:from],
30
30
  text: opts[:text]
31
31
  })
@@ -51,7 +51,7 @@ module RingCentralSdk
51
51
  end
52
52
 
53
53
  def create(opts)
54
- req = RingCentralSdk::REST::Request::Fax.new
54
+ req = RingCentralSdk::REST::Request::Fax.new
55
55
  meta = {}
56
56
 
57
57
  skip = {text: 1, files: 1}
@@ -17,7 +17,7 @@ module RingCentralSdk
17
17
  end
18
18
 
19
19
  def url
20
- "account/#{@account_id}/extension/#{@extension_id}/sms"
20
+ "/restapi/v1.0/account/#{@account_id}/extension/#{@extension_id}/sms"
21
21
  end
22
22
  end
23
23
  end
@@ -67,16 +67,20 @@ module RingCentralSdk
67
67
  set_events(events) if events.is_a? Array
68
68
 
69
69
  raise 'Events are undefined' unless @event_filters.is_a?(Array) && !@event_filters.empty?
70
-
70
+
71
71
  begin
72
72
  response = @client.http.post do |req|
73
73
  req.url 'subscription'
74
74
  req.headers['Content-Type'] = 'application/json'
75
75
  req.body = {
76
76
  eventFilters: @client.create_urls(@event_filters),
77
- deliveryMode: { transportType: 'PubNub' }
77
+ deliveryMode: {
78
+ transportType: 'PubNub',
79
+ encryption: 'true'
80
+ }
78
81
  }
79
82
  end
83
+ puts response.body
80
84
  set_subscription response.body
81
85
  _subscribe_at_pubnub
82
86
  changed
@@ -254,7 +258,9 @@ module RingCentralSdk
254
258
  def _set_timeout
255
259
  _clear_timeout
256
260
 
257
- time_to_expiration = @_subscription['expiresIn'] - RENEW_HANDICAP
261
+ if @_subscription && !@_subscription.empty? && @_subscription.key?('expiresIn')
262
+ time_to_expiration = (@_subscription['expiresIn'] - RENEW_HANDICAP)
263
+ end
258
264
 
259
265
  @_timeout = Thread.new do
260
266
  sleep time_to_expiration
@@ -1,6 +1,6 @@
1
1
  # RingCentralSdk is a SDK for the RingCentral REST API
2
2
  module RingCentralSdk
3
- VERSION = '2.2.1'.freeze
3
+ VERSION = '2.2.3'.freeze
4
4
 
5
5
  RC_SERVER_PRODUCTION = 'https://platform.ringcentral.com'.freeze
6
6
  RC_SERVER_SANDBOX = 'https://platform.devtest.ringcentral.com'.freeze
data/pubnub.log ADDED
@@ -0,0 +1,7 @@
1
+ # Logfile created on 2023-02-15 01:51:43 -0800 by logger.rb/v1.5.3
2
+ E, [2023-02-15T01:51:43.429100 #93500] ERROR -- Pubnub:
3
+ E, [2023-02-15T01:51:43.431620 #93500] ERROR -- Pubnub:
4
+ E, [2023-02-15T02:11:20.883247 #93948] ERROR -- Pubnub:
5
+ E, [2023-02-15T02:11:20.885876 #93948] ERROR -- Pubnub:
6
+ E, [2023-02-16T06:48:39.603723 #31050] ERROR -- Pubnub:
7
+ E, [2023-02-16T06:48:39.606400 #31050] ERROR -- Pubnub:
@@ -7,7 +7,7 @@ version = $1
7
7
  Gem::Specification.new do |s|
8
8
  s.name = lib
9
9
  s.version = version
10
- s.date = '2017-06-20'
10
+ s.date = '2023-02-20'
11
11
  s.summary = 'RingCentral SDK - Ruby SDK for the RingCentral Connect Platform API'
12
12
  s.description = 'A Ruby SDK for the RingCentral Connect Platform API'
13
13
  s.authors = ['John Wang']
@@ -20,24 +20,24 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.required_ruby_version = '>= 2.2.2'
22
22
 
23
- s.add_dependency 'dotenv', '~> 2.1', '>= 2.1.0'
24
- s.add_dependency 'faraday', '~> 0', '>= 0'
25
- s.add_dependency 'faraday_middleware', '~> 0', '>= 0'
26
- s.add_dependency 'faraday_middleware-oauth2_refresh', '~> 0'
27
- s.add_dependency 'faraday_middleware-request-retry', '~> 0.1', '>= 0.1.0'
28
- s.add_dependency 'jsondoc', '~> 0.1', '>= 0.1.0'
23
+ s.add_dependency 'dotenv', '~> 2.1', '>= 2.8.1'
24
+ s.add_dependency 'faraday', '~> 1.10', '>= 1.10.3'
25
+ s.add_dependency 'faraday_middleware', '~> 1.2', '>= 1.2.0'
26
+ s.add_dependency 'faraday_middleware-oauth2_refresh', '~> 0.1.3', '>= 0.1.3'
27
+ s.add_dependency 'faraday_middleware-request-retry', '~> 0.2.1', '>= 0.2.1'
28
+ s.add_dependency 'jsondoc', '~> 0.1', '>= 0.1.4'
29
29
  s.add_dependency 'logger', '~> 1'
30
- s.add_dependency 'mime', '~> 0.4', '>= 0.4.3'
31
- s.add_dependency 'mime-types', '~> 3.1' # >= 1.9 '~> 2.5', '>= 2.5'
32
- s.add_dependency 'mime_builder', '~> 0', '>= 0.0.4'
30
+ s.add_dependency 'mime', '~> 0.4', '>= 0.4.4'
31
+ s.add_dependency 'mime-types', '~> 3.4' # >= 1.9 '~> 2.5', '>= 2.5'
32
+ s.add_dependency 'mime_builder', '~> 0.1', '>= 0.1.1'
33
33
  s.add_dependency 'multi_json', '~> 1.3'
34
- s.add_dependency 'oauth2', '~> 1.0', '>= 1.0.0'
35
- s.add_dependency 'pubnub', '~> 4.0'
34
+ s.add_dependency 'oauth2', '~> 2.0', '>= 2.0.9'
35
+ s.add_dependency 'pubnub', '~> 4.0', '>= 4.8.0'
36
36
 
37
- s.add_development_dependency 'bundler', '~> 1'
37
+ s.add_development_dependency 'bundler', '~> 2'
38
38
  s.add_development_dependency 'coveralls', '~> 0'
39
- s.add_development_dependency 'mocha', '~> 1'
40
- s.add_development_dependency 'rake', '~> 12'
39
+ s.add_development_dependency 'mocha', '~> 2'
40
+ s.add_development_dependency 'rake', '~> 13'
41
41
  s.add_development_dependency 'simplecov', '~> 0'
42
42
  s.add_development_dependency 'test-unit', '~> 3'
43
43
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ringcentral_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.1
4
+ version: 2.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Wang
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-20 00:00:00.000000000 Z
11
+ date: 2023-02-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: '2.1'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 2.1.0
22
+ version: 2.8.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,81 +29,87 @@ dependencies:
29
29
  version: '2.1'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 2.1.0
32
+ version: 2.8.1
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: faraday
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: '1.10'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: '0'
42
+ version: 1.10.3
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '0'
49
+ version: '1.10'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: '0'
52
+ version: 1.10.3
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: faraday_middleware
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '0'
59
+ version: '1.2'
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: '0'
62
+ version: 1.2.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '0'
69
+ version: '1.2'
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: '0'
72
+ version: 1.2.0
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: faraday_middleware-oauth2_refresh
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: '0'
79
+ version: 0.1.3
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 0.1.3
80
83
  type: :runtime
81
84
  prerelease: false
82
85
  version_requirements: !ruby/object:Gem::Requirement
83
86
  requirements:
84
87
  - - "~>"
85
88
  - !ruby/object:Gem::Version
86
- version: '0'
89
+ version: 0.1.3
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ version: 0.1.3
87
93
  - !ruby/object:Gem::Dependency
88
94
  name: faraday_middleware-request-retry
89
95
  requirement: !ruby/object:Gem::Requirement
90
96
  requirements:
91
97
  - - "~>"
92
98
  - !ruby/object:Gem::Version
93
- version: '0.1'
99
+ version: 0.2.1
94
100
  - - ">="
95
101
  - !ruby/object:Gem::Version
96
- version: 0.1.0
102
+ version: 0.2.1
97
103
  type: :runtime
98
104
  prerelease: false
99
105
  version_requirements: !ruby/object:Gem::Requirement
100
106
  requirements:
101
107
  - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: '0.1'
109
+ version: 0.2.1
104
110
  - - ">="
105
111
  - !ruby/object:Gem::Version
106
- version: 0.1.0
112
+ version: 0.2.1
107
113
  - !ruby/object:Gem::Dependency
108
114
  name: jsondoc
109
115
  requirement: !ruby/object:Gem::Requirement
@@ -113,7 +119,7 @@ dependencies:
113
119
  version: '0.1'
114
120
  - - ">="
115
121
  - !ruby/object:Gem::Version
116
- version: 0.1.0
122
+ version: 0.1.4
117
123
  type: :runtime
118
124
  prerelease: false
119
125
  version_requirements: !ruby/object:Gem::Requirement
@@ -123,7 +129,7 @@ dependencies:
123
129
  version: '0.1'
124
130
  - - ">="
125
131
  - !ruby/object:Gem::Version
126
- version: 0.1.0
132
+ version: 0.1.4
127
133
  - !ruby/object:Gem::Dependency
128
134
  name: logger
129
135
  requirement: !ruby/object:Gem::Requirement
@@ -147,7 +153,7 @@ dependencies:
147
153
  version: '0.4'
148
154
  - - ">="
149
155
  - !ruby/object:Gem::Version
150
- version: 0.4.3
156
+ version: 0.4.4
151
157
  type: :runtime
152
158
  prerelease: false
153
159
  version_requirements: !ruby/object:Gem::Requirement
@@ -157,41 +163,41 @@ dependencies:
157
163
  version: '0.4'
158
164
  - - ">="
159
165
  - !ruby/object:Gem::Version
160
- version: 0.4.3
166
+ version: 0.4.4
161
167
  - !ruby/object:Gem::Dependency
162
168
  name: mime-types
163
169
  requirement: !ruby/object:Gem::Requirement
164
170
  requirements:
165
171
  - - "~>"
166
172
  - !ruby/object:Gem::Version
167
- version: '3.1'
173
+ version: '3.4'
168
174
  type: :runtime
169
175
  prerelease: false
170
176
  version_requirements: !ruby/object:Gem::Requirement
171
177
  requirements:
172
178
  - - "~>"
173
179
  - !ruby/object:Gem::Version
174
- version: '3.1'
180
+ version: '3.4'
175
181
  - !ruby/object:Gem::Dependency
176
182
  name: mime_builder
177
183
  requirement: !ruby/object:Gem::Requirement
178
184
  requirements:
179
185
  - - "~>"
180
186
  - !ruby/object:Gem::Version
181
- version: '0'
187
+ version: '0.1'
182
188
  - - ">="
183
189
  - !ruby/object:Gem::Version
184
- version: 0.0.4
190
+ version: 0.1.1
185
191
  type: :runtime
186
192
  prerelease: false
187
193
  version_requirements: !ruby/object:Gem::Requirement
188
194
  requirements:
189
195
  - - "~>"
190
196
  - !ruby/object:Gem::Version
191
- version: '0'
197
+ version: '0.1'
192
198
  - - ">="
193
199
  - !ruby/object:Gem::Version
194
- version: 0.0.4
200
+ version: 0.1.1
195
201
  - !ruby/object:Gem::Dependency
196
202
  name: multi_json
197
203
  requirement: !ruby/object:Gem::Requirement
@@ -212,20 +218,20 @@ dependencies:
212
218
  requirements:
213
219
  - - "~>"
214
220
  - !ruby/object:Gem::Version
215
- version: '1.0'
221
+ version: '2.0'
216
222
  - - ">="
217
223
  - !ruby/object:Gem::Version
218
- version: 1.0.0
224
+ version: 2.0.9
219
225
  type: :runtime
220
226
  prerelease: false
221
227
  version_requirements: !ruby/object:Gem::Requirement
222
228
  requirements:
223
229
  - - "~>"
224
230
  - !ruby/object:Gem::Version
225
- version: '1.0'
231
+ version: '2.0'
226
232
  - - ">="
227
233
  - !ruby/object:Gem::Version
228
- version: 1.0.0
234
+ version: 2.0.9
229
235
  - !ruby/object:Gem::Dependency
230
236
  name: pubnub
231
237
  requirement: !ruby/object:Gem::Requirement
@@ -233,6 +239,9 @@ dependencies:
233
239
  - - "~>"
234
240
  - !ruby/object:Gem::Version
235
241
  version: '4.0'
242
+ - - ">="
243
+ - !ruby/object:Gem::Version
244
+ version: 4.8.0
236
245
  type: :runtime
237
246
  prerelease: false
238
247
  version_requirements: !ruby/object:Gem::Requirement
@@ -240,20 +249,23 @@ dependencies:
240
249
  - - "~>"
241
250
  - !ruby/object:Gem::Version
242
251
  version: '4.0'
252
+ - - ">="
253
+ - !ruby/object:Gem::Version
254
+ version: 4.8.0
243
255
  - !ruby/object:Gem::Dependency
244
256
  name: bundler
245
257
  requirement: !ruby/object:Gem::Requirement
246
258
  requirements:
247
259
  - - "~>"
248
260
  - !ruby/object:Gem::Version
249
- version: '1'
261
+ version: '2'
250
262
  type: :development
251
263
  prerelease: false
252
264
  version_requirements: !ruby/object:Gem::Requirement
253
265
  requirements:
254
266
  - - "~>"
255
267
  - !ruby/object:Gem::Version
256
- version: '1'
268
+ version: '2'
257
269
  - !ruby/object:Gem::Dependency
258
270
  name: coveralls
259
271
  requirement: !ruby/object:Gem::Requirement
@@ -274,28 +286,28 @@ dependencies:
274
286
  requirements:
275
287
  - - "~>"
276
288
  - !ruby/object:Gem::Version
277
- version: '1'
289
+ version: '2'
278
290
  type: :development
279
291
  prerelease: false
280
292
  version_requirements: !ruby/object:Gem::Requirement
281
293
  requirements:
282
294
  - - "~>"
283
295
  - !ruby/object:Gem::Version
284
- version: '1'
296
+ version: '2'
285
297
  - !ruby/object:Gem::Dependency
286
298
  name: rake
287
299
  requirement: !ruby/object:Gem::Requirement
288
300
  requirements:
289
301
  - - "~>"
290
302
  - !ruby/object:Gem::Version
291
- version: '12'
303
+ version: '13'
292
304
  type: :development
293
305
  prerelease: false
294
306
  version_requirements: !ruby/object:Gem::Requirement
295
307
  requirements:
296
308
  - - "~>"
297
309
  - !ruby/object:Gem::Version
298
- version: '12'
310
+ version: '13'
299
311
  - !ruby/object:Gem::Dependency
300
312
  name: simplecov
301
313
  requirement: !ruby/object:Gem::Requirement
@@ -332,6 +344,7 @@ extra_rdoc_files: []
332
344
  files:
333
345
  - CHANGELOG.md
334
346
  - Gemfile
347
+ - Gemfile.lock
335
348
  - LICENSE.md
336
349
  - README.md
337
350
  - Rakefile
@@ -357,6 +370,7 @@ files:
357
370
  - lib/ringcentral_sdk/rest/simple_client.rb
358
371
  - lib/ringcentral_sdk/rest/subscription.rb
359
372
  - mkdocs.yml
373
+ - pubnub.log
360
374
  - ringcentral_sdk.gemspec
361
375
  - test/test_base.rb
362
376
  - test/test_client.rb
@@ -371,7 +385,7 @@ homepage: https://github.com/grokify/ringcentral-sdk-ruby
371
385
  licenses:
372
386
  - MIT
373
387
  metadata: {}
374
- post_install_message:
388
+ post_install_message:
375
389
  rdoc_options: []
376
390
  require_paths:
377
391
  - lib
@@ -386,9 +400,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
386
400
  - !ruby/object:Gem::Version
387
401
  version: '0'
388
402
  requirements: []
389
- rubyforge_project:
390
- rubygems_version: 2.4.8
391
- signing_key:
403
+ rubygems_version: 3.4.6
404
+ signing_key:
392
405
  specification_version: 4
393
406
  summary: RingCentral SDK - Ruby SDK for the RingCentral Connect Platform API
394
407
  test_files: []