twilio-ruby 5.4.5 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -30,6 +30,7 @@ describe 'SyncList' do
30
30
  {
31
31
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
32
32
  "created_by": "created_by",
33
+ "date_expires": "2015-07-30T21:00:00Z",
33
34
  "date_created": "2015-07-30T20:00:00Z",
34
35
  "date_updated": "2015-07-30T20:00:00Z",
35
36
  "links": {
@@ -102,6 +103,7 @@ describe 'SyncList' do
102
103
  {
103
104
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
104
105
  "created_by": "created_by",
106
+ "date_expires": "2015-07-30T21:00:00Z",
105
107
  "date_created": "2015-07-30T20:00:00Z",
106
108
  "date_updated": "2015-07-30T20:00:00Z",
107
109
  "links": {
@@ -123,6 +125,51 @@ describe 'SyncList' do
123
125
  expect(actual).to_not eq(nil)
124
126
  end
125
127
 
128
+ it "can update" do
129
+ @holodeck.mock(Twilio::Response.new(500, ''))
130
+
131
+ expect {
132
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
133
+ .sync_lists("ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
134
+ }.to raise_exception(Twilio::REST::TwilioError)
135
+
136
+ values = {}
137
+ expect(
138
+ @holodeck.has_request?(Holodeck::Request.new(
139
+ method: 'post',
140
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
141
+ ))).to eq(true)
142
+ end
143
+
144
+ it "receives update responses" do
145
+ @holodeck.mock(Twilio::Response.new(
146
+ 200,
147
+ %q[
148
+ {
149
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
150
+ "created_by": "created_by",
151
+ "date_expires": "2015-07-30T21:00:00Z",
152
+ "date_created": "2015-07-30T20:00:00Z",
153
+ "date_updated": "2015-07-30T20:00:00Z",
154
+ "links": {
155
+ "items": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Items",
156
+ "permissions": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions"
157
+ },
158
+ "revision": "revision",
159
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
160
+ "sid": "ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
161
+ "unique_name": "unique_name",
162
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Lists/ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
163
+ }
164
+ ]
165
+ ))
166
+
167
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
168
+ .sync_lists("ESaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
169
+
170
+ expect(actual).to_not eq(nil)
171
+ end
172
+
126
173
  it "can read" do
127
174
  @holodeck.mock(Twilio::Response.new(500, ''))
128
175
 
@@ -173,6 +220,7 @@ describe 'SyncList' do
173
220
  {
174
221
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
175
222
  "created_by": "created_by",
223
+ "date_expires": "2015-07-30T21:00:00Z",
176
224
  "date_created": "2015-07-30T20:00:00Z",
177
225
  "date_updated": "2015-07-30T20:00:00Z",
178
226
  "links": {
@@ -32,6 +32,7 @@ describe 'SyncMapItem' do
32
32
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
33
33
  "created_by": "created_by",
34
34
  "data": {},
35
+ "date_expires": "2015-07-30T21:00:00Z",
35
36
  "date_created": "2015-07-30T20:00:00Z",
36
37
  "date_updated": "2015-07-30T20:00:00Z",
37
38
  "key": "key",
@@ -106,6 +107,7 @@ describe 'SyncMapItem' do
106
107
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
107
108
  "created_by": "created_by",
108
109
  "data": {},
110
+ "date_expires": "2015-07-30T21:00:00Z",
109
111
  "date_created": "2015-07-30T20:00:00Z",
110
112
  "date_updated": "2015-07-30T20:00:00Z",
111
113
  "key": "key",
@@ -177,6 +179,7 @@ describe 'SyncMapItem' do
177
179
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
178
180
  "created_by": "created_by",
179
181
  "data": {},
182
+ "date_expires": "2015-07-30T21:00:00Z",
180
183
  "date_created": "2015-07-30T20:00:00Z",
181
184
  "date_updated": "2015-07-30T20:00:00Z",
182
185
  "key": "key",
@@ -212,15 +215,14 @@ describe 'SyncMapItem' do
212
215
  expect {
213
216
  @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
214
217
  .sync_maps("MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
215
- .sync_map_items("key").update(data: "{}")
218
+ .sync_map_items("key").update()
216
219
  }.to raise_exception(Twilio::REST::TwilioError)
217
220
 
218
- values = {'Data' => Twilio.serialize_object("{}")}
221
+ values = {}
219
222
  expect(
220
223
  @holodeck.has_request?(Holodeck::Request.new(
221
224
  method: 'post',
222
225
  url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Items/key',
223
- data: values,
224
226
  ))).to eq(true)
225
227
  end
226
228
 
@@ -232,6 +234,7 @@ describe 'SyncMapItem' do
232
234
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
233
235
  "created_by": "created_by",
234
236
  "data": {},
237
+ "date_expires": "2015-07-30T21:00:00Z",
235
238
  "date_created": "2015-07-30T20:00:00Z",
236
239
  "date_updated": "2015-07-30T20:00:00Z",
237
240
  "key": "key",
@@ -245,7 +248,7 @@ describe 'SyncMapItem' do
245
248
 
246
249
  actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
247
250
  .sync_maps("MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
248
- .sync_map_items("key").update(data: "{}")
251
+ .sync_map_items("key").update()
249
252
 
250
253
  expect(actual).to_not eq(nil)
251
254
  end
@@ -30,6 +30,7 @@ describe 'SyncMap' do
30
30
  {
31
31
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
32
32
  "created_by": "created_by",
33
+ "date_expires": "2015-07-30T21:00:00Z",
33
34
  "date_created": "2015-07-30T20:00:00Z",
34
35
  "date_updated": "2015-07-30T20:00:00Z",
35
36
  "links": {
@@ -102,6 +103,7 @@ describe 'SyncMap' do
102
103
  {
103
104
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
104
105
  "created_by": "created_by",
106
+ "date_expires": "2015-07-30T21:00:00Z",
105
107
  "date_created": "2015-07-30T20:00:00Z",
106
108
  "date_updated": "2015-07-30T20:00:00Z",
107
109
  "links": {
@@ -123,6 +125,51 @@ describe 'SyncMap' do
123
125
  expect(actual).to_not eq(nil)
124
126
  end
125
127
 
128
+ it "can update" do
129
+ @holodeck.mock(Twilio::Response.new(500, ''))
130
+
131
+ expect {
132
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
133
+ .sync_maps("MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
134
+ }.to raise_exception(Twilio::REST::TwilioError)
135
+
136
+ values = {}
137
+ expect(
138
+ @holodeck.has_request?(Holodeck::Request.new(
139
+ method: 'post',
140
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
141
+ ))).to eq(true)
142
+ end
143
+
144
+ it "receives update responses" do
145
+ @holodeck.mock(Twilio::Response.new(
146
+ 200,
147
+ %q[
148
+ {
149
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
150
+ "created_by": "created_by",
151
+ "date_expires": "2015-07-30T21:00:00Z",
152
+ "date_created": "2015-07-30T20:00:00Z",
153
+ "date_updated": "2015-07-30T20:00:00Z",
154
+ "links": {
155
+ "items": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Items",
156
+ "permissions": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Permissions"
157
+ },
158
+ "revision": "revision",
159
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
160
+ "sid": "MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
161
+ "unique_name": "unique_name",
162
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps/MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
163
+ }
164
+ ]
165
+ ))
166
+
167
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
168
+ .sync_maps("MPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
169
+
170
+ expect(actual).to_not eq(nil)
171
+ end
172
+
126
173
  it "can read" do
127
174
  @holodeck.mock(Twilio::Response.new(500, ''))
128
175
 
@@ -173,6 +220,7 @@ describe 'SyncMap' do
173
220
  {
174
221
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
175
222
  "created_by": "created_by",
223
+ "date_expires": "2015-07-30T21:00:00Z",
176
224
  "date_created": "2015-07-30T20:00:00Z",
177
225
  "date_updated": "2015-07-30T20:00:00Z",
178
226
  "links": {
@@ -30,6 +30,7 @@ describe 'SyncStream' do
30
30
  {
31
31
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
32
32
  "created_by": "created_by",
33
+ "date_expires": "2015-07-30T21:00:00Z",
33
34
  "date_created": "2015-07-30T20:00:00Z",
34
35
  "date_updated": "2015-07-30T20:00:00Z",
35
36
  "links": {
@@ -100,6 +101,7 @@ describe 'SyncStream' do
100
101
  {
101
102
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
102
103
  "created_by": "created_by",
104
+ "date_expires": "2015-07-30T21:00:00Z",
103
105
  "date_created": "2015-07-30T20:00:00Z",
104
106
  "date_updated": "2015-07-30T20:00:00Z",
105
107
  "links": {
@@ -119,6 +121,49 @@ describe 'SyncStream' do
119
121
  expect(actual).to_not eq(nil)
120
122
  end
121
123
 
124
+ it "can update" do
125
+ @holodeck.mock(Twilio::Response.new(500, ''))
126
+
127
+ expect {
128
+ @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
129
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
130
+ }.to raise_exception(Twilio::REST::TwilioError)
131
+
132
+ values = {}
133
+ expect(
134
+ @holodeck.has_request?(Holodeck::Request.new(
135
+ method: 'post',
136
+ url: 'https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
137
+ ))).to eq(true)
138
+ end
139
+
140
+ it "receives update responses" do
141
+ @holodeck.mock(Twilio::Response.new(
142
+ 200,
143
+ %q[
144
+ {
145
+ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
146
+ "created_by": "created_by",
147
+ "date_expires": "2015-07-30T21:00:00Z",
148
+ "date_created": "2015-07-30T20:00:00Z",
149
+ "date_updated": "2015-07-30T20:00:00Z",
150
+ "links": {
151
+ "messages": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages"
152
+ },
153
+ "service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
154
+ "sid": "TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
155
+ "unique_name": "unique_name",
156
+ "url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
157
+ }
158
+ ]
159
+ ))
160
+
161
+ actual = @client.sync.v1.services("ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
162
+ .sync_streams("TOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").update()
163
+
164
+ expect(actual).to_not eq(nil)
165
+ end
166
+
122
167
  it "can read" do
123
168
  @holodeck.mock(Twilio::Response.new(500, ''))
124
169
 
@@ -169,6 +214,7 @@ describe 'SyncStream' do
169
214
  {
170
215
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
171
216
  "created_by": "created_by",
217
+ "date_expires": "2015-07-30T21:00:00Z",
172
218
  "date_created": "2015-07-30T20:00:00Z",
173
219
  "date_updated": "2015-07-30T20:00:00Z",
174
220
  "links": {
@@ -41,6 +41,8 @@ describe 'Recording' do
41
41
  "grouping_sids": {
42
42
  "room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
43
43
  },
44
+ "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
45
+ "encryption_key": "public_key",
44
46
  "links": {
45
47
  "media": "https://video.twilio.com/v1/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
46
48
  }
@@ -113,6 +115,8 @@ describe 'Recording' do
113
115
  "room_sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
114
116
  "participant_sid": "PAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
115
117
  },
118
+ "media_external_location": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
119
+ "encryption_key": "public_key",
116
120
  "url": "https://video.twilio.com/v1/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
117
121
  "links": {
118
122
  "media": "https://video.twilio.com/v1/Recordings/RTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media"
@@ -6,7 +6,7 @@
6
6
 
7
7
  require 'spec_helper.rb'
8
8
 
9
- describe 'RoomParticipant' do
9
+ describe 'Participant' do
10
10
  it "can fetch" do
11
11
  @holodeck.mock(Twilio::Response.new(500, ''))
12
12
 
data/twilio-ruby.gemspec CHANGED
@@ -24,10 +24,10 @@ Gem::Specification.new do |spec|
24
24
  spec.extra_rdoc_files = ['README.md', 'LICENSE.md']
25
25
  spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'twilio-ruby', '--main', 'README.md']
26
26
 
27
- spec.add_dependency('libxml-ruby', '>= 2.0', '< 4.0')
28
- spec.add_dependency('jwt', '~> 1.5')
27
+ spec.add_dependency('jwt', '>= 1.5', '<= 2.5')
28
+ spec.add_dependency('nokogiri', '>= 1.6', '< 2.0')
29
29
  spec.add_dependency('faraday', '~>0.9')
30
- spec.add_dependency('jruby-openssl') if RUBY_PLATFORM == 'java'
30
+ spec.add_dependency('jruby-openssl', '>= 0.9.6') if RUBY_PLATFORM == 'java'
31
31
  # Workaround for RBX <= 2.2.1, should be fixed in next version
32
32
  spec.add_dependency('rubysl') if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'rbx'
33
33
 
metadata CHANGED
@@ -1,49 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.4.5
4
+ version: 5.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Twilio API Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-11-11 00:00:00.000000000 Z
11
+ date: 2017-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: libxml-ruby
14
+ name: jwt
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
20
- - - "<"
19
+ version: '1.5'
20
+ - - "<="
21
21
  - !ruby/object:Gem::Version
22
- version: '4.0'
22
+ version: '2.5'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: '2.0'
30
- - - "<"
29
+ version: '1.5'
30
+ - - "<="
31
31
  - !ruby/object:Gem::Version
32
- version: '4.0'
32
+ version: '2.5'
33
33
  - !ruby/object:Gem::Dependency
34
- name: jwt
34
+ name: nokogiri
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: '1.5'
39
+ version: '1.6'
40
+ - - "<"
41
+ - !ruby/object:Gem::Version
42
+ version: '2.0'
40
43
  type: :runtime
41
44
  prerelease: false
42
45
  version_requirements: !ruby/object:Gem::Requirement
43
46
  requirements:
44
- - - "~>"
47
+ - - ">="
45
48
  - !ruby/object:Gem::Version
46
- version: '1.5'
49
+ version: '1.6'
50
+ - - "<"
51
+ - !ruby/object:Gem::Version
52
+ version: '2.0'
47
53
  - !ruby/object:Gem::Dependency
48
54
  name: faraday
49
55
  requirement: !ruby/object:Gem::Requirement