ringcentral_sdk 1.3.4 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +12 -0
  3. data/Gemfile.lock +70 -33
  4. data/{LICENSE.txt → LICENSE.md} +0 -0
  5. data/README.md +40 -76
  6. data/lib/ringcentral_sdk.rb +4 -3
  7. data/lib/ringcentral_sdk/rest.rb +18 -17
  8. data/lib/ringcentral_sdk/rest/cache.rb +9 -3
  9. data/lib/ringcentral_sdk/rest/cache/extensions.rb +91 -94
  10. data/lib/ringcentral_sdk/rest/client.rb +196 -202
  11. data/lib/ringcentral_sdk/rest/configuration.rb +91 -0
  12. data/lib/ringcentral_sdk/rest/event.rb +44 -43
  13. data/lib/ringcentral_sdk/rest/extension.rb +12 -9
  14. data/lib/ringcentral_sdk/rest/extension_presence.rb +73 -78
  15. data/lib/ringcentral_sdk/rest/messages.rb +40 -31
  16. data/lib/ringcentral_sdk/rest/messages_retriever.rb +30 -33
  17. data/lib/ringcentral_sdk/rest/request.rb +10 -5
  18. data/lib/ringcentral_sdk/rest/request/base.rb +24 -19
  19. data/lib/ringcentral_sdk/rest/request/fax.rb +88 -91
  20. data/lib/ringcentral_sdk/rest/request/inflator.rb +9 -2
  21. data/lib/ringcentral_sdk/rest/request/inflator/contact_info.rb +19 -12
  22. data/lib/ringcentral_sdk/rest/request/simple.rb +24 -34
  23. data/lib/ringcentral_sdk/rest/simple_client.rb +63 -78
  24. data/lib/ringcentral_sdk/rest/subscription.rb +223 -228
  25. data/test/test_base.rb +5 -5
  26. data/test/test_client.rb +87 -88
  27. data/test/test_event.rb +28 -11
  28. data/test/test_extension_presence.rb +64 -62
  29. data/test/test_helper_fax.rb +46 -47
  30. data/test/test_helper_inflator_contact_info.rb +8 -10
  31. data/test/test_helper_request.rb +1 -1
  32. data/test/test_setup.rb +24 -21
  33. data/test/test_subscription.rb +46 -48
  34. metadata +72 -33
  35. data/lib/ringcentral_sdk/rest/config.rb +0 -102
  36. data/test/test_config.rb +0 -29
@@ -3,75 +3,74 @@
3
3
  require './test/test_base.rb'
4
4
 
5
5
  class RingCentralSdkHelperFaxTest < Test::Unit::TestCase
6
- def testSetup
7
-
6
+ def test_setup
8
7
  fax = RingCentralSdk::REST::Request::Fax.new(
9
8
  # phone numbers are in E.164 format with or without leading '+'
10
- :to => '+16505551212',
11
- :faxResolution => 'High',
12
- :coverPageText => 'RingCentral fax demo using Ruby SDK!',
13
- :text => 'RingCentral fax demo using Ruby SDK!'
9
+ to: '+16505551212',
10
+ faxResolution: 'High',
11
+ coverPageText: 'RingCentral fax demo using Ruby SDK!',
12
+ text: 'RingCentral fax demo using Ruby SDK!'
14
13
  )
15
14
 
16
- assert_equal "RingCentralSdk::REST::Request::Fax", fax.class.name
17
- assert_equal 'account/~/extension/~/fax', fax.url()
15
+ assert_equal 'RingCentralSdk::REST::Request::Fax', fax.class.name
16
+ assert_equal 'account/~/extension/~/fax', fax.url
18
17
 
19
18
  fax2 = RingCentralSdk::REST::Request::Fax.new(
20
- :accountId => '111111111',
21
- :extensionId => '222222222',
22
- :to => { :phoneNumber => '+16505551212' },
23
- :faxResolution => 'High',
24
- :coverPageText => 'RingCentral fax demo using Ruby SDK Résolution!',
25
- :files => ['./scripts/test_file.pdf']
19
+ accountId: '111111111',
20
+ extensionId: '222222222',
21
+ to: { phoneNumber: '+16505551212' },
22
+ faxResolution: 'High',
23
+ coverPageText: 'RingCentral fax demo using Ruby SDK Résolution!',
24
+ files: ['./scripts/test_file.pdf']
26
25
  )
27
26
 
28
- assert_equal 'account/111111111/extension/222222222/fax', fax2.url()
27
+ assert_equal 'account/111111111/extension/222222222/fax', fax2.url
29
28
 
30
29
  assert_raise do
31
30
  fax2.add_file('non-existent_file_path')
32
31
  end
33
32
 
34
33
  # Test UTF-8 metadata and file MIME concatenation
35
- body = fax2.body
34
+ # body = fax2.body
36
35
 
37
36
  fax3 = RingCentralSdk::REST::Request::Fax.new(
38
- :accountId => 111111111,
39
- :extensionId => 222222222,
37
+ accountId: 111_111_111,
38
+ extensionId: 222_222_222,
40
39
  # phone numbers are in E.164 format with or without leading '+'
41
- :to => [{ :phoneNumber => '+16505551212' }],
42
- :faxResolution => 'High',
43
- :coverPageText => 'RingCentral fax demo using Ruby SDK!',
44
- :text => 'RingCentral fax demo using Ruby SDK!'
40
+ to: [{ phoneNumber: '+16505551212' }],
41
+ faxResolution: 'High',
42
+ coverPageText: 'RingCentral fax demo using Ruby SDK!',
43
+ text: 'RingCentral fax demo using Ruby SDK!'
45
44
  )
46
45
 
47
- assert_equal 'account/111111111/extension/222222222/fax', fax3.url()
46
+ assert_equal 'account/111111111/extension/222222222/fax', fax3.url
48
47
 
49
48
  fax4 = RingCentralSdk::REST::Request::Fax.new(
50
- :accountId => 111111111,
51
- :extensionId => 222222222, # Can be nil or {} for defaults '~'
52
- :to => '+16505551212","coverPageText":"RingCentral fax demo using Ruby SDK!"}',
53
- :text => 'RingCentral fax demo using Ruby SDK!'
49
+ accountId: 111_111_111,
50
+ extensionId: 222_222_222, # Can be nil or {} for defaults '~'
51
+ to: '+16505551212","coverPageText":"RingCentral fax demo using Ruby SDK!"}',
52
+ text: 'RingCentral fax demo using Ruby SDK!'
54
53
  )
55
- assert_equal 'account/111111111/extension/222222222/fax', fax4.url()
54
+ assert_equal 'account/111111111/extension/222222222/fax', fax4.url
56
55
 
57
56
  fax5 = RingCentralSdk::REST::Request::Fax.new(
58
- :accountId => 111111111,
59
- :extensionId => 222222222, # Can be nil or {} for defaults '~'
60
- :coverPageText => "RingCentral fax demo using Ruby SDK!",
61
- :text => 'RingCentral fax demo using Ruby SDK!'
57
+ accountId: 111_111_111,
58
+ extensionId: 222_222_222, # Can be nil or {} for defaults '~'
59
+ coverPageText: 'RingCentral fax demo using Ruby SDK!',
60
+ text: 'RingCentral fax demo using Ruby SDK!'
62
61
  )
63
- assert_equal 'account/111111111/extension/222222222/fax', fax5.url()
62
+ assert_equal 'account/111111111/extension/222222222/fax', fax5.url
64
63
 
65
- #assert_equal 'application/pdf', fax.get_file_content_type('example.pdf')
66
- #assert_equal 'attachment', fax.get_attachment_content_disposition()
67
- #assert_equal 'attachment; filename="example.pdf"', fax.get_attachment_content_disposition('example.pdf')
68
- #assert_equal 'attachment; filename="example.pdf"', fax.get_attachment_content_disposition('/path/to/example.pdf')
69
- assert_equal 'post', fax.method()
64
+ # assert_equal 'application/pdf', fax.get_file_content_type('example.pdf')
65
+ # assert_equal 'attachment', fax.get_attachment_content_disposition()
66
+ # assert_equal 'attachment; filename="example.pdf"', fax.get_attachment_content_disposition('example.pdf')
67
+ # assert_equal 'attachment; filename="example.pdf"', fax.get_attachment_content_disposition('/path/to/example.pdf')
68
+ assert_equal 'post', fax.method
70
69
 
71
- content_type = fax.content_type()
70
+ content_type = fax.content_type
72
71
  content_type_prefix = ''
73
72
  boundary = ''
74
- if content_type =~ /^(multipart\/mixed;\s+boundary=)(.*)$/
73
+ if content_type =~ %r{^(multipart/mixed;\s+boundary=)(.*)$}
75
74
  content_type_prefix = $1
76
75
  boundary = $2
77
76
  end
@@ -82,16 +81,16 @@ class RingCentralSdkHelperFaxTest < Test::Unit::TestCase
82
81
  assert_equal '--' + boundary + '--', lines[-1]
83
82
 
84
83
  fax6 = RingCentralSdk::REST::Request::Fax.new(
85
- :accountId => 111111111,
86
- :extensionId => 222222222, # Can be nil or {} for defaults '~'
87
- :coverPageText => "RingCentral fax demo using Ruby SDK!",
88
- :parts => [{:text=>'RingCentral fax demo using Ruby SDK!'}]
84
+ accountId: 111_111_111,
85
+ extensionId: 222_222_222, # Can be nil or {} for defaults '~'
86
+ coverPageText: 'RingCentral fax demo using Ruby SDK!',
87
+ parts: [{ text: 'RingCentral fax demo using Ruby SDK!' }]
89
88
  )
90
- assert_equal 'account/111111111/extension/222222222/fax', fax6.url()
89
+ assert_equal 'account/111111111/extension/222222222/fax', fax6.url
91
90
 
92
91
  fax7 = RingCentralSdk::REST::Request::Fax.new(
93
- :coverPageText => "RingCentral fax demo using Ruby SDK!",
94
- :parts => [{:text=>'RingCentral fax demo using Ruby SDK!'}]
92
+ coverPageText: 'RingCentral fax demo using Ruby SDK!',
93
+ parts: [{ text: 'RingCentral fax demo using Ruby SDK!' }]
95
94
  )
96
95
  assert_equal '~', fax7.account_id
97
96
  assert_equal '~', fax7.extension_id
@@ -1,21 +1,19 @@
1
1
  require './test/test_base.rb'
2
2
 
3
3
  class RingCentralSdkHelperInflatorContactInfoTest < Test::Unit::TestCase
4
- def testSetup
5
-
4
+ def test_setup
6
5
  inf = RingCentralSdk::REST::Request::Inflator::ContactInfo.new
7
6
 
8
- arr1 = inf.inflate_to_array(16505551212)
9
- assert_equal 16505551212, arr1[0][:phoneNumber]
7
+ arr1 = inf.inflate_to_array 1_650_555_121_2
8
+ assert_equal 1_650_555_121_2, arr1[0][:phoneNumber]
10
9
 
11
- arr2 = inf.inflate_to_array('+16505551212')
10
+ arr2 = inf.inflate_to_array '+16505551212'
12
11
  assert_equal '+16505551212', arr2[0][:phoneNumber]
13
12
 
14
- arr3 = inf.inflate_to_array({:phoneNumber=>16505551212})
15
- assert_equal 16505551212, arr3[0][:phoneNumber]
16
-
17
- arr4 = inf.inflate_to_array([{:phoneNumber=>16505551212}])
18
- assert_equal 16505551212, arr4[0][:phoneNumber]
13
+ arr3 = inf.inflate_to_array(phoneNumber: 1_650_555_121_2)
14
+ assert_equal 1_650_555_121_2, arr3[0][:phoneNumber]
19
15
 
16
+ arr4 = inf.inflate_to_array([{ phoneNumber: 1_650_555_121_2 }])
17
+ assert_equal 1_650_555_121_2, arr4[0][:phoneNumber]
20
18
  end
21
19
  end
@@ -1,7 +1,7 @@
1
1
  require './test/test_base.rb'
2
2
 
3
3
  class RingCentralSdkHelperRequestTest < Test::Unit::TestCase
4
- def testSetup
4
+ def test_setup
5
5
  req = RingCentralSdk::REST::Request::Base.new
6
6
 
7
7
  assert_equal 'get', req.method
data/test/test_setup.rb CHANGED
@@ -2,11 +2,15 @@ require './test/test_base.rb'
2
2
 
3
3
  class RingCentralSdkTest < Test::Unit::TestCase
4
4
  def setup
5
- @rcsdk = RingCentralSdk.new(
6
- 'my_app_key',
7
- 'my_app_secret',
8
- RingCentralSdk::RC_SERVER_SANDBOX
9
- )
5
+ @rcsdk = new_sdk
6
+ end
7
+
8
+ def new_sdk
9
+ RingCentralSdk::REST::Client.new do |config|
10
+ config.app_key = 'my_app_key'
11
+ config.app_secret = 'my_app_secret'
12
+ config.server_url = RingCentralSdk::RC_SERVER_SANDBOX
13
+ end
10
14
  end
11
15
 
12
16
  def test_main
@@ -16,25 +20,25 @@ class RingCentralSdkTest < Test::Unit::TestCase
16
20
  @rcsdk.send_request(nil)
17
21
  end
18
22
 
19
- rcsdk = RingCentralSdk.new(
20
- 'my_app_key',
21
- 'my_app_secret',
22
- RingCentralSdk::RC_SERVER_SANDBOX
23
- )
23
+ rcsdk = new_sdk
24
24
  assert_equal 'RingCentralSdk::REST::Client', rcsdk.class.name
25
25
  end
26
26
 
27
27
  def test_login
28
28
  stub_token_hash = data_auth_token
29
- stub_token = OAuth2::AccessToken::from_hash(@rcsdk.oauth2client, stub_token_hash)
29
+ stub_token = OAuth2::AccessToken.from_hash(@rcsdk.oauth2client, stub_token_hash)
30
30
 
31
31
  OAuth2::Strategy::Password.any_instance.stubs(:get_token).returns(stub_token)
32
- rcsdk = RingCentralSdk.new(
33
- 'my_app_key',
34
- 'my_app_secret',
35
- RingCentralSdk::RC_SERVER_SANDBOX,
36
- {:username => 'my_username', :password => 'my_password'}
37
- )
32
+
33
+ rcsdk = RingCentralSdk::REST::Client.new do |config|
34
+ config.app_key = 'my_app_key'
35
+ config.app_secret = 'my_app_secret'
36
+ config.server_url = RingCentralSdk::RC_SERVER_SANDBOX
37
+ config.username = 'my_username'
38
+ config.password = 'my_password'
39
+ end
40
+
41
+ assert_equal 'my_test_access_token', rcsdk.token.to_hash[:access_token]
38
42
  end
39
43
 
40
44
  def data_auth_token
@@ -44,10 +48,9 @@ class RingCentralSdkTest < Test::Unit::TestCase
44
48
  "expires_in": 3599,
45
49
  "refresh_token": "my_test_refresh_token",
46
50
  "refresh_token_expires_in": 604799,
47
- "scope": "ReadCallLog DirectRingOut EditCallLog ReadAccounts Contacts EditExtensions ReadContacts SMS EditPresence RingOut EditCustomData ReadPresence EditPaymentInfo Interoperability Accounts NumberLookup InternalMessages ReadCallRecording EditAccounts Faxes EditReportingSettings ReadClientInfo EditMessages VoipCalling ReadMessages",
48
- "owner_id": "1234567890"
51
+ "scope": "ReadCallLog DirectRingOut EditCallLog ReadAccounts VoipCalling ReadMessages",
52
+ "owner_id": "1234567890 "
49
53
  }'
50
- data = JSON.parse(json, :symbolize_names=>true)
51
- return data
54
+ JSON.parse(json, symbolize_names: true)
52
55
  end
53
56
  end
@@ -2,16 +2,16 @@ require './test/test_base.rb'
2
2
 
3
3
  class RingCentralSdkSubscriptionTest < Test::Unit::TestCase
4
4
  def setup
5
- @rcsdk = RingCentralSdk.new(
6
- 'myAppKey',
7
- 'myAppSecret',
8
- RingCentralSdk::RC_SERVER_SANDBOX
9
- )
5
+ @rcsdk = RingCentralSdk::REST::Client.new do |config|
6
+ config.app_key = 'my_app_key'
7
+ config.app_secret = 'my_app_secret'
8
+ config.server_url = RingCentralSdk::RC_SERVER_SANDBOX
9
+ end
10
10
  end
11
11
 
12
12
  def test_main
13
- sub = @rcsdk.create_subscription()
14
- assert_equal "RingCentralSdk::REST::Subscription", sub.class.name
13
+ sub = @rcsdk.create_subscription
14
+ assert_equal 'RingCentralSdk::REST::Subscription', sub.class.name
15
15
 
16
16
  assert_equal 0, sub.event_filters.length
17
17
 
@@ -20,7 +20,7 @@ class RingCentralSdkSubscriptionTest < Test::Unit::TestCase
20
20
 
21
21
  sub.add_events(['/restapi/v1.0/account/~/extension/~/presence'])
22
22
  assert_equal 2, sub.event_filters.length
23
-
23
+
24
24
  sub.set_events(['/restapi/v1.0/account/~/extension/~/presence'])
25
25
  assert_equal 1, sub.event_filters.length
26
26
 
@@ -43,67 +43,66 @@ class RingCentralSdkSubscriptionTest < Test::Unit::TestCase
43
43
  end
44
44
 
45
45
  sub.set_events([])
46
-
46
+
47
47
  assert_raise do
48
- sub.subscribe()
48
+ sub.subscribe
49
49
  end
50
50
 
51
51
  assert_raise do
52
- sub.renew()
53
- end
52
+ sub.renew
53
+ end
54
54
 
55
55
  # sub.subscribe(['/restapi/v1.0/account/~/extension/~/presence'])
56
56
 
57
- sub_data = sub.subscription()
57
+ sub_data = sub.subscription
58
58
  assert_equal sub_data['deliveryMode']['transportType'], 'PubNub'
59
59
  assert_equal sub_data['deliveryMode']['encryption'], false
60
60
  sub_data['deliveryMode']['encryption'] = true
61
61
  sub.set_subscription(sub_data)
62
- sub_data = sub.subscription()
62
+ sub_data = sub.subscription
63
63
  assert_equal sub_data['deliveryMode']['encryption'], true
64
64
 
65
- assert_equal nil, sub.pubnub()
65
+ assert_equal nil, sub.pubnub
66
66
 
67
- sub.destroy()
68
- sub_data = sub.subscription()
67
+ sub.destroy
68
+ sub_data = sub.subscription
69
69
  assert_equal sub_data['deliveryMode']['encryption'], false
70
-
71
70
  end
72
71
 
73
- def get_rcsdk_authorized
74
- rcsdk = RingCentralSdk.new(
75
- 'myAppKey',
76
- 'myAppSecret',
77
- RingCentralSdk::RC_SERVER_SANDBOX
78
- )
79
- rcsdk.set_oauth2_client()
72
+ def build_rcsdk_authorized
73
+ rcsdk = RingCentralSdk::REST::Client.new do |config|
74
+ config.app_key = 'my_app_key'
75
+ config.app_secret = 'my_app_secret'
76
+ config.server_url = RingCentralSdk::RC_SERVER_SANDBOX
77
+ end
78
+ rcsdk.set_oauth2_client
80
79
 
81
80
  stub_token_hash = data_test_auth_token
82
- stub_token = OAuth2::AccessToken::from_hash(rcsdk.oauth2client, stub_token_hash)
81
+ stub_token = OAuth2::AccessToken.from_hash(rcsdk.oauth2client, stub_token_hash)
83
82
 
84
83
  rcsdk.oauth2client.password.stubs(:get_token).returns(stub_token)
85
84
 
86
85
  token = rcsdk.authorize('my_test_username', 'my_test_extension', 'my_test_password')
87
- return rcsdk
86
+ rcsdk
88
87
  end
89
88
 
90
89
  def test_subscribe_renew_delete_with_exceptions
91
90
  # Get RCSDK Authroized
92
- rcsdk = get_rcsdk_authorized()
91
+ rcsdk = build_rcsdk_authorized
93
92
  # Stub Subscribe RC Response
94
- data = data_test_subscribe()
93
+ data = data_test_subscribe
95
94
  response = Faraday::Response.new
96
95
  response.stubs(:body).returns(data)
97
96
  rcsdk.http.stubs(:post).returns(response)
98
97
  rcsdk.http.stubs(:put).returns(response)
99
- responseDel = Faraday::Response.new
100
- responseDel.stubs(:body).returns('')
101
- rcsdk.http.stubs(:delete).returns(responseDel)
98
+ response_del = Faraday::Response.new
99
+ response_del.stubs(:body).returns('')
100
+ rcsdk.http.stubs(:delete).returns(response_del)
102
101
  # Stub Pubnub Response
103
- Pubnub::Client.any_instance.stubs(:subscribe).returns(nil)
104
- Pubnub::Client.any_instance.stubs(:unsubscribe).returns(nil)
102
+ ::Pubnub::Client.any_instance.stubs(:subscribe).returns(nil)
103
+ ::Pubnub::Client.any_instance.stubs(:unsubscribe).returns(nil)
105
104
  # Create Subscription
106
- sub = rcsdk.create_subscription()
105
+ sub = rcsdk.create_subscription
107
106
  # Test subscribe()
108
107
  sub.subscribe(['/restapi/v1.0/account/~/extension/~/presence'])
109
108
  # Test renew()
@@ -113,21 +112,21 @@ class RingCentralSdkSubscriptionTest < Test::Unit::TestCase
113
112
  end
114
113
  # Test subscription data
115
114
  id = data['id']
116
- data = sub.subscription()
115
+ data = sub.subscription
117
116
  assert_equal id.to_s, data['id'].to_s
118
117
  id_new = data['id'] += 'modified'
119
118
  sub.set_subscription(data)
120
119
  assert_equal id_new.to_s, data['id'].to_s
121
120
  # Test register()
122
121
  sub.register(['/restapi/v1.0/account/~/extension/~/presence'])
123
- # Test remove()
124
- sub.remove()
122
+ # Test remove
123
+ sub.remove
125
124
  # Test Exceptions
126
- rcsdk2 = get_rcsdk_authorized()
125
+ rcsdk2 = build_rcsdk_authorized
127
126
  rcsdk2.http.stubs(:post).raises('error')
128
127
  rcsdk2.http.stubs(:put).raises('error')
129
128
  rcsdk2.http.stubs(:delete).raises('error')
130
- sub2 = rcsdk2.create_subscription()
129
+ sub2 = rcsdk2.create_subscription
131
130
  assert_raise do
132
131
  sub2.subscribe(['/restapi/v1.0/account/~/extension/~/presence'])
133
132
  end
@@ -135,14 +134,14 @@ class RingCentralSdkSubscriptionTest < Test::Unit::TestCase
135
134
  sub2.renew(['/restapi/v1.0/account/~/extension/~/presence'])
136
135
  end
137
136
  assert_raise do
138
- sub2.remove()
137
+ sub2.remove
139
138
  end
140
139
  end
141
140
 
142
141
  def test_decrypt_encrypted
143
- rcsdk = get_rcsdk_authorized()
144
- sub = rcsdk.create_subscription()
145
- data = data_test_subscribe()
142
+ rcsdk = build_rcsdk_authorized
143
+ sub = rcsdk.create_subscription
144
+ data = data_test_subscribe
146
145
  sub.set_subscription(data)
147
146
  plaintext_src = '{"hello":"world"}'
148
147
  # Encrypt test data
@@ -166,8 +165,7 @@ class RingCentralSdkSubscriptionTest < Test::Unit::TestCase
166
165
  "scope": "ReadCallLog DirectRingOut EditCallLog ReadAccounts Contacts EditExtensions ReadContacts SMS EditPresence RingOut EditCustomData ReadPresence EditPaymentInfo Interoperability Accounts NumberLookup InternalMessages ReadCallRecording EditAccounts Faxes EditReportingSettings ReadClientInfo EditMessages VoipCalling ReadMessages",
167
166
  "owner_id": "1234567890"
168
167
  }'
169
- data = JSON.parse(json, :symbolize_names=>true)
170
- return data
168
+ JSON.parse(json, symbolize_names: true)
171
169
  end
172
170
 
173
171
  def data_test_subscribe
@@ -190,11 +188,11 @@ class RingCentralSdkSubscriptionTest < Test::Unit::TestCase
190
188
  "encryptionKey": "/UjxdHILResI0XWzhXIilQ=="
191
189
  }
192
190
  }'
193
- return JSON.parse(json)
191
+ JSON.parse(json)
194
192
  end
195
193
 
196
194
  def test_pubnub
197
- sub = @rcsdk.create_subscription()
195
+ sub = @rcsdk.create_subscription
198
196
  pub = sub.new_pubnub('test', false, '')
199
197
 
200
198
  assert_equal 'Pubnub::Client', pub.class.name
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: 1.3.4
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Wang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-09-05 00:00:00.000000000 Z
11
+ date: 2016-12-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dotenv
@@ -36,20 +36,20 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0.9'
39
+ version: '0'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: '0.9'
42
+ version: '0'
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.9'
49
+ version: '0'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: '0.9'
52
+ version: '0'
53
53
  - !ruby/object:Gem::Dependency
54
54
  name: faraday_middleware
55
55
  requirement: !ruby/object:Gem::Requirement
@@ -85,7 +85,7 @@ dependencies:
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0'
87
87
  - !ruby/object:Gem::Dependency
88
- name: jsondoc
88
+ name: faraday_middleware-request-retry
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
91
  - - "~>"
@@ -105,19 +105,39 @@ dependencies:
105
105
  - !ruby/object:Gem::Version
106
106
  version: 0.1.0
107
107
  - !ruby/object:Gem::Dependency
108
- name: logger
108
+ name: jsondoc
109
109
  requirement: !ruby/object:Gem::Requirement
110
110
  requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: '0.1'
111
114
  - - ">="
112
115
  - !ruby/object:Gem::Version
113
- version: '0'
116
+ version: 0.1.0
114
117
  type: :runtime
115
118
  prerelease: false
116
119
  version_requirements: !ruby/object:Gem::Requirement
117
120
  requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '0.1'
118
124
  - - ">="
119
125
  - !ruby/object:Gem::Version
120
- version: '0'
126
+ version: 0.1.0
127
+ - !ruby/object:Gem::Dependency
128
+ name: logger
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: '1'
134
+ type: :runtime
135
+ prerelease: false
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - "~>"
139
+ - !ruby/object:Gem::Version
140
+ version: '1'
121
141
  - !ruby/object:Gem::Dependency
122
142
  name: mime
123
143
  requirement: !ruby/object:Gem::Requirement
@@ -159,6 +179,9 @@ dependencies:
159
179
  - - "~>"
160
180
  - !ruby/object:Gem::Version
161
181
  version: '0'
182
+ - - ">="
183
+ - !ruby/object:Gem::Version
184
+ version: 0.0.4
162
185
  type: :runtime
163
186
  prerelease: false
164
187
  version_requirements: !ruby/object:Gem::Requirement
@@ -166,6 +189,9 @@ dependencies:
166
189
  - - "~>"
167
190
  - !ruby/object:Gem::Version
168
191
  version: '0'
192
+ - - ">="
193
+ - !ruby/object:Gem::Version
194
+ version: 0.0.4
169
195
  - !ruby/object:Gem::Dependency
170
196
  name: multi_json
171
197
  requirement: !ruby/object:Gem::Requirement
@@ -206,84 +232,98 @@ dependencies:
206
232
  requirements:
207
233
  - - "~>"
208
234
  - !ruby/object:Gem::Version
209
- version: '3.8'
235
+ version: '4.0'
210
236
  type: :runtime
211
237
  prerelease: false
212
238
  version_requirements: !ruby/object:Gem::Requirement
213
239
  requirements:
214
240
  - - "~>"
215
241
  - !ruby/object:Gem::Version
216
- version: '3.8'
242
+ version: '4.0'
243
+ - !ruby/object:Gem::Dependency
244
+ name: bundler
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - "~>"
248
+ - !ruby/object:Gem::Version
249
+ version: '1'
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - "~>"
255
+ - !ruby/object:Gem::Version
256
+ version: '1'
217
257
  - !ruby/object:Gem::Dependency
218
258
  name: coveralls
219
259
  requirement: !ruby/object:Gem::Requirement
220
260
  requirements:
221
- - - ">="
261
+ - - "~>"
222
262
  - !ruby/object:Gem::Version
223
263
  version: '0'
224
264
  type: :development
225
265
  prerelease: false
226
266
  version_requirements: !ruby/object:Gem::Requirement
227
267
  requirements:
228
- - - ">="
268
+ - - "~>"
229
269
  - !ruby/object:Gem::Version
230
270
  version: '0'
231
271
  - !ruby/object:Gem::Dependency
232
272
  name: mocha
233
273
  requirement: !ruby/object:Gem::Requirement
234
274
  requirements:
235
- - - ">="
275
+ - - "~>"
236
276
  - !ruby/object:Gem::Version
237
- version: '0'
277
+ version: '1'
238
278
  type: :development
239
279
  prerelease: false
240
280
  version_requirements: !ruby/object:Gem::Requirement
241
281
  requirements:
242
- - - ">="
282
+ - - "~>"
243
283
  - !ruby/object:Gem::Version
244
- version: '0'
284
+ version: '1'
245
285
  - !ruby/object:Gem::Dependency
246
286
  name: rake
247
287
  requirement: !ruby/object:Gem::Requirement
248
288
  requirements:
249
- - - ">="
289
+ - - "~>"
250
290
  - !ruby/object:Gem::Version
251
- version: '0'
291
+ version: '12'
252
292
  type: :development
253
293
  prerelease: false
254
294
  version_requirements: !ruby/object:Gem::Requirement
255
295
  requirements:
256
- - - ">="
296
+ - - "~>"
257
297
  - !ruby/object:Gem::Version
258
- version: '0'
298
+ version: '12'
259
299
  - !ruby/object:Gem::Dependency
260
300
  name: simplecov
261
301
  requirement: !ruby/object:Gem::Requirement
262
302
  requirements:
263
- - - ">="
303
+ - - "~>"
264
304
  - !ruby/object:Gem::Version
265
305
  version: '0'
266
306
  type: :development
267
307
  prerelease: false
268
308
  version_requirements: !ruby/object:Gem::Requirement
269
309
  requirements:
270
- - - ">="
310
+ - - "~>"
271
311
  - !ruby/object:Gem::Version
272
312
  version: '0'
273
313
  - !ruby/object:Gem::Dependency
274
314
  name: test-unit
275
315
  requirement: !ruby/object:Gem::Requirement
276
316
  requirements:
277
- - - ">="
317
+ - - "~>"
278
318
  - !ruby/object:Gem::Version
279
- version: '0'
319
+ version: '3'
280
320
  type: :development
281
321
  prerelease: false
282
322
  version_requirements: !ruby/object:Gem::Requirement
283
323
  requirements:
284
- - - ">="
324
+ - - "~>"
285
325
  - !ruby/object:Gem::Version
286
- version: '0'
326
+ version: '3'
287
327
  description: A Ruby SDK for the RingCentral Connect Platform API
288
328
  email: johncwang@gmail.com
289
329
  executables: []
@@ -293,7 +333,7 @@ files:
293
333
  - CHANGELOG.md
294
334
  - Gemfile
295
335
  - Gemfile.lock
296
- - LICENSE.txt
336
+ - LICENSE.md
297
337
  - README.md
298
338
  - Rakefile
299
339
  - lib/ringcentral_sdk.rb
@@ -301,7 +341,7 @@ files:
301
341
  - lib/ringcentral_sdk/rest/cache.rb
302
342
  - lib/ringcentral_sdk/rest/cache/extensions.rb
303
343
  - lib/ringcentral_sdk/rest/client.rb
304
- - lib/ringcentral_sdk/rest/config.rb
344
+ - lib/ringcentral_sdk/rest/configuration.rb
305
345
  - lib/ringcentral_sdk/rest/event.rb
306
346
  - lib/ringcentral_sdk/rest/extension.rb
307
347
  - lib/ringcentral_sdk/rest/extension_presence.rb
@@ -317,7 +357,6 @@ files:
317
357
  - lib/ringcentral_sdk/rest/subscription.rb
318
358
  - test/test_base.rb
319
359
  - test/test_client.rb
320
- - test/test_config.rb
321
360
  - test/test_event.rb
322
361
  - test/test_extension_presence.rb
323
362
  - test/test_helper_fax.rb
@@ -337,7 +376,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
337
376
  requirements:
338
377
  - - ">="
339
378
  - !ruby/object:Gem::Version
340
- version: '0'
379
+ version: 2.2.2
341
380
  required_rubygems_version: !ruby/object:Gem::Requirement
342
381
  requirements:
343
382
  - - ">="
@@ -345,7 +384,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
345
384
  version: '0'
346
385
  requirements: []
347
386
  rubyforge_project:
348
- rubygems_version: 2.5.1
387
+ rubygems_version: 2.5.2
349
388
  signing_key:
350
389
  specification_version: 4
351
390
  summary: RingCentral SDK - Ruby SDK for the RingCentral Connect Platform API