twilio-ruby 3.11.5 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +13 -5
  2. data/.gitignore +1 -1
  3. data/.travis.yml +20 -9
  4. data/AUTHORS.md +32 -25
  5. data/CHANGES.md +203 -0
  6. data/Gemfile +8 -1
  7. data/{LICENSE → LICENSE.md} +4 -2
  8. data/Makefile +1 -2
  9. data/README.md +70 -39
  10. data/Rakefile +8 -10
  11. data/docs/faq.rst +3 -3
  12. data/docs/getting-started.rst +17 -12
  13. data/docs/index.rst +15 -0
  14. data/docs/usage/accounts.rst +6 -6
  15. data/docs/usage/addresses.rst +101 -0
  16. data/docs/usage/applications.rst +10 -10
  17. data/docs/usage/basics.rst +17 -4
  18. data/docs/usage/caller-ids.rst +4 -2
  19. data/docs/usage/conferences.rst +11 -11
  20. data/docs/usage/errors.rst +7 -7
  21. data/docs/usage/messages.rst +48 -20
  22. data/docs/usage/notifications.rst +6 -4
  23. data/docs/usage/phone-calls.rst +33 -14
  24. data/docs/usage/phone-numbers.rst +45 -31
  25. data/docs/usage/queues.rst +8 -8
  26. data/docs/usage/recordings.rst +12 -10
  27. data/docs/usage/sip.rst +15 -14
  28. data/docs/usage/taskrouter-tokens.rst +98 -0
  29. data/docs/usage/taskrouter.rst +226 -0
  30. data/docs/usage/token-generation.rst +19 -4
  31. data/docs/usage/transcriptions.rst +3 -2
  32. data/docs/usage/twiml.rst +7 -7
  33. data/docs/usage/validation.rst +39 -3
  34. data/examples/examples.rb +44 -20
  35. data/examples/print-call-log.rb +1 -1
  36. data/lib/rack/twilio_webhook_authentication.rb +47 -0
  37. data/lib/twilio-ruby/rest/accounts.rb +2 -1
  38. data/lib/twilio-ruby/rest/addresses/dependent_phone_numbers.rb +6 -0
  39. data/lib/twilio-ruby/rest/addresses.rb +12 -0
  40. data/lib/twilio-ruby/rest/base_client.rb +127 -0
  41. data/lib/twilio-ruby/rest/call_feedback.rb +28 -0
  42. data/lib/twilio-ruby/rest/call_feedback_summary.rb +13 -0
  43. data/lib/twilio-ruby/rest/calls.rb +10 -5
  44. data/lib/twilio-ruby/rest/client.rb +44 -109
  45. data/lib/twilio-ruby/rest/conferences/participants.rb +2 -2
  46. data/lib/twilio-ruby/rest/incoming_phone_numbers.rb +1 -1
  47. data/lib/twilio-ruby/rest/instance_resource.rb +2 -16
  48. data/lib/twilio-ruby/rest/list_resource.rb +20 -30
  49. data/lib/twilio-ruby/rest/lookups/phone_numbers.rb +17 -0
  50. data/lib/twilio-ruby/rest/lookups_client.rb +99 -0
  51. data/lib/twilio-ruby/rest/messages.rb +5 -0
  52. data/lib/twilio-ruby/rest/next_gen_list_resource.rb +36 -0
  53. data/lib/twilio-ruby/rest/outgoing_caller_ids.rb +1 -1
  54. data/lib/twilio-ruby/rest/queues/members.rb +1 -1
  55. data/lib/twilio-ruby/rest/sip.rb +1 -3
  56. data/lib/twilio-ruby/rest/sms/messages.rb +23 -0
  57. data/lib/twilio-ruby/rest/task_router/activities.rb +8 -0
  58. data/lib/twilio-ruby/rest/task_router/events.rb +8 -0
  59. data/lib/twilio-ruby/rest/task_router/reservations.rb +8 -0
  60. data/lib/twilio-ruby/rest/task_router/statistics.rb +26 -0
  61. data/lib/twilio-ruby/rest/task_router/task_queues.rb +17 -0
  62. data/lib/twilio-ruby/rest/task_router/task_queues_statistics.rb +15 -0
  63. data/lib/twilio-ruby/rest/task_router/tasks.rb +15 -0
  64. data/lib/twilio-ruby/rest/task_router/workers.rb +13 -0
  65. data/lib/twilio-ruby/rest/task_router/workers_statistics.rb +8 -0
  66. data/lib/twilio-ruby/rest/task_router/workflow_statistics.rb +7 -0
  67. data/lib/twilio-ruby/rest/task_router/workflows.rb +11 -0
  68. data/lib/twilio-ruby/rest/task_router/workspace_statistics.rb +7 -0
  69. data/lib/twilio-ruby/rest/task_router/workspaces.rb +17 -0
  70. data/lib/twilio-ruby/rest/task_router_client.rb +176 -0
  71. data/lib/twilio-ruby/rest/tokens.rb +7 -0
  72. data/lib/twilio-ruby/rest/usage/records.rb +2 -2
  73. data/lib/twilio-ruby/rest/utils.rb +35 -11
  74. data/lib/twilio-ruby/task_router/capability.rb +87 -0
  75. data/lib/twilio-ruby/task_router.rb +0 -0
  76. data/lib/twilio-ruby/twiml/response.rb +1 -0
  77. data/lib/twilio-ruby/util/capability.rb +10 -7
  78. data/lib/twilio-ruby/util/client_config.rb +29 -0
  79. data/lib/twilio-ruby/util/configuration.rb +7 -0
  80. data/lib/twilio-ruby/util/request_validator.rb +18 -3
  81. data/lib/twilio-ruby/version.rb +1 -1
  82. data/lib/twilio-ruby.rb +48 -0
  83. data/spec/rack/twilio_webhook_authentication_spec.rb +110 -0
  84. data/spec/rest/account_spec.rb +51 -20
  85. data/spec/rest/address_spec.rb +11 -0
  86. data/spec/rest/call_feedback_spec.rb +12 -0
  87. data/spec/rest/call_feedback_summary_spec.rb +9 -0
  88. data/spec/rest/call_spec.rb +8 -4
  89. data/spec/rest/client_spec.rb +209 -51
  90. data/spec/rest/conference_spec.rb +4 -2
  91. data/spec/rest/instance_resource_spec.rb +4 -4
  92. data/spec/rest/lookups/phone_number_spec.rb +8 -0
  93. data/spec/rest/message_spec.rb +2 -2
  94. data/spec/rest/numbers_spec.rb +25 -13
  95. data/spec/rest/queue_spec.rb +4 -2
  96. data/spec/rest/recording_spec.rb +4 -2
  97. data/spec/rest/sms/message_spec.rb +37 -0
  98. data/spec/rest/sms/messages_spec.rb +31 -0
  99. data/spec/rest/task_router/reservation_spec.rb +9 -0
  100. data/spec/rest/task_router/task_queue_spec.rb +9 -0
  101. data/spec/rest/token_spec.rb +7 -0
  102. data/spec/rest/utils_spec.rb +45 -0
  103. data/spec/spec_helper.rb +12 -3
  104. data/spec/support/fakeweb.rb +2 -0
  105. data/spec/task_router_spec.rb +114 -0
  106. data/spec/twilio_spec.rb +15 -0
  107. data/spec/util/capability_spec.rb +167 -118
  108. data/spec/util/client_config_spec.rb +21 -0
  109. data/spec/util/configuration_spec.rb +15 -0
  110. data/spec/util/request_validator_spec.rb +31 -3
  111. data/spec/util/url_encode_spec.rb +2 -2
  112. data/twilio-ruby.gemspec +28 -27
  113. metadata +93 -71
  114. data/CHANGES +0 -47
metadata CHANGED
@@ -1,128 +1,87 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.5
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Benton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-04 00:00:00.000000000 Z
11
+ date: 2015-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: multi_json
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.3.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.3.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: builder
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - ! '>='
32
32
  - !ruby/object:Gem::Version
33
33
  version: 2.1.2
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.1.2
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: jwt
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
- version: 0.1.2
47
+ version: '1.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.1.2
54
+ version: '1.0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
- version: 0.9.0
61
+ version: '1.5'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ~>
67
67
  - !ruby/object:Gem::Version
68
- version: 0.9.0
69
- - !ruby/object:Gem::Dependency
70
- name: rspec
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 2.6.0
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 2.6.0
83
- - !ruby/object:Gem::Dependency
84
- name: fakeweb
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 1.3.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 1.3.0
97
- - !ruby/object:Gem::Dependency
98
- name: rack
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 1.3.0
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 1.3.0
68
+ version: '1.5'
111
69
  description: A simple library for communicating with the Twilio REST API, building
112
70
  TwiML, and generating Twilio Client Capability Tokens
113
- email: andrew@twilio.com
71
+ email:
72
+ - andrew@twilio.com
114
73
  executables: []
115
74
  extensions: []
116
75
  extra_rdoc_files:
117
76
  - README.md
118
- - LICENSE
77
+ - LICENSE.md
119
78
  files:
120
- - ".gitignore"
121
- - ".travis.yml"
79
+ - .gitignore
80
+ - .travis.yml
122
81
  - AUTHORS.md
123
- - CHANGES
82
+ - CHANGES.md
124
83
  - Gemfile
125
- - LICENSE
84
+ - LICENSE.md
126
85
  - Makefile
127
86
  - README.md
128
87
  - Rakefile
@@ -147,6 +106,7 @@ files:
147
106
  - docs/make.bat
148
107
  - docs/src/pip-delete-this-directory.txt
149
108
  - docs/usage/accounts.rst
109
+ - docs/usage/addresses.rst
150
110
  - docs/usage/applications.rst
151
111
  - docs/usage/basics.rst
152
112
  - docs/usage/caller-ids.rst
@@ -159,14 +119,19 @@ files:
159
119
  - docs/usage/queues.rst
160
120
  - docs/usage/recordings.rst
161
121
  - docs/usage/sip.rst
122
+ - docs/usage/taskrouter-tokens.rst
123
+ - docs/usage/taskrouter.rst
162
124
  - docs/usage/token-generation.rst
163
125
  - docs/usage/transcriptions.rst
164
126
  - docs/usage/twiml.rst
165
127
  - docs/usage/validation.rst
166
128
  - examples/examples.rb
167
129
  - examples/print-call-log.rb
130
+ - lib/rack/twilio_webhook_authentication.rb
168
131
  - lib/twilio-ruby.rb
169
132
  - lib/twilio-ruby/rest/accounts.rb
133
+ - lib/twilio-ruby/rest/addresses.rb
134
+ - lib/twilio-ruby/rest/addresses/dependent_phone_numbers.rb
170
135
  - lib/twilio-ruby/rest/applications.rb
171
136
  - lib/twilio-ruby/rest/authorized_connect_apps.rb
172
137
  - lib/twilio-ruby/rest/available_phone_numbers.rb
@@ -174,6 +139,9 @@ files:
174
139
  - lib/twilio-ruby/rest/available_phone_numbers/local.rb
175
140
  - lib/twilio-ruby/rest/available_phone_numbers/mobile.rb
176
141
  - lib/twilio-ruby/rest/available_phone_numbers/toll_free.rb
142
+ - lib/twilio-ruby/rest/base_client.rb
143
+ - lib/twilio-ruby/rest/call_feedback.rb
144
+ - lib/twilio-ruby/rest/call_feedback_summary.rb
177
145
  - lib/twilio-ruby/rest/calls.rb
178
146
  - lib/twilio-ruby/rest/client.rb
179
147
  - lib/twilio-ruby/rest/conferences.rb
@@ -186,8 +154,11 @@ files:
186
154
  - lib/twilio-ruby/rest/incoming_phone_numbers/toll_free.rb
187
155
  - lib/twilio-ruby/rest/instance_resource.rb
188
156
  - lib/twilio-ruby/rest/list_resource.rb
157
+ - lib/twilio-ruby/rest/lookups/phone_numbers.rb
158
+ - lib/twilio-ruby/rest/lookups_client.rb
189
159
  - lib/twilio-ruby/rest/media.rb
190
160
  - lib/twilio-ruby/rest/messages.rb
161
+ - lib/twilio-ruby/rest/next_gen_list_resource.rb
191
162
  - lib/twilio-ruby/rest/notifications.rb
192
163
  - lib/twilio-ruby/rest/outgoing_caller_ids.rb
193
164
  - lib/twilio-ruby/rest/queues.rb
@@ -205,27 +176,62 @@ files:
205
176
  - lib/twilio-ruby/rest/sms.rb
206
177
  - lib/twilio-ruby/rest/sms/messages.rb
207
178
  - lib/twilio-ruby/rest/sms/short_codes.rb
179
+ - lib/twilio-ruby/rest/task_router/activities.rb
180
+ - lib/twilio-ruby/rest/task_router/events.rb
181
+ - lib/twilio-ruby/rest/task_router/reservations.rb
182
+ - lib/twilio-ruby/rest/task_router/statistics.rb
183
+ - lib/twilio-ruby/rest/task_router/task_queues.rb
184
+ - lib/twilio-ruby/rest/task_router/task_queues_statistics.rb
185
+ - lib/twilio-ruby/rest/task_router/tasks.rb
186
+ - lib/twilio-ruby/rest/task_router/workers.rb
187
+ - lib/twilio-ruby/rest/task_router/workers_statistics.rb
188
+ - lib/twilio-ruby/rest/task_router/workflow_statistics.rb
189
+ - lib/twilio-ruby/rest/task_router/workflows.rb
190
+ - lib/twilio-ruby/rest/task_router/workspace_statistics.rb
191
+ - lib/twilio-ruby/rest/task_router/workspaces.rb
192
+ - lib/twilio-ruby/rest/task_router_client.rb
193
+ - lib/twilio-ruby/rest/tokens.rb
208
194
  - lib/twilio-ruby/rest/transcriptions.rb
209
195
  - lib/twilio-ruby/rest/usage.rb
210
196
  - lib/twilio-ruby/rest/usage/records.rb
211
197
  - lib/twilio-ruby/rest/usage/triggers.rb
212
198
  - lib/twilio-ruby/rest/utils.rb
199
+ - lib/twilio-ruby/task_router.rb
200
+ - lib/twilio-ruby/task_router/capability.rb
213
201
  - lib/twilio-ruby/twiml/response.rb
214
202
  - lib/twilio-ruby/util.rb
215
203
  - lib/twilio-ruby/util/capability.rb
204
+ - lib/twilio-ruby/util/client_config.rb
205
+ - lib/twilio-ruby/util/configuration.rb
216
206
  - lib/twilio-ruby/util/request_validator.rb
217
207
  - lib/twilio-ruby/version.rb
208
+ - spec/rack/twilio_webhook_authentication_spec.rb
218
209
  - spec/rest/account_spec.rb
210
+ - spec/rest/address_spec.rb
211
+ - spec/rest/call_feedback_spec.rb
212
+ - spec/rest/call_feedback_summary_spec.rb
219
213
  - spec/rest/call_spec.rb
220
214
  - spec/rest/client_spec.rb
221
215
  - spec/rest/conference_spec.rb
222
216
  - spec/rest/instance_resource_spec.rb
217
+ - spec/rest/lookups/phone_number_spec.rb
223
218
  - spec/rest/message_spec.rb
224
219
  - spec/rest/numbers_spec.rb
225
220
  - spec/rest/queue_spec.rb
226
221
  - spec/rest/recording_spec.rb
222
+ - spec/rest/sms/message_spec.rb
223
+ - spec/rest/sms/messages_spec.rb
224
+ - spec/rest/task_router/reservation_spec.rb
225
+ - spec/rest/task_router/task_queue_spec.rb
226
+ - spec/rest/token_spec.rb
227
+ - spec/rest/utils_spec.rb
227
228
  - spec/spec_helper.rb
229
+ - spec/support/fakeweb.rb
230
+ - spec/task_router_spec.rb
231
+ - spec/twilio_spec.rb
228
232
  - spec/util/capability_spec.rb
233
+ - spec/util/client_config_spec.rb
234
+ - spec/util/configuration_spec.rb
229
235
  - spec/util/request_validator_spec.rb
230
236
  - spec/util/url_encode_spec.rb
231
237
  - twilio-ruby.gemspec
@@ -235,42 +241,58 @@ licenses:
235
241
  metadata: {}
236
242
  post_install_message:
237
243
  rdoc_options:
238
- - "--line-numbers"
239
- - "--inline-source"
240
- - "--title"
244
+ - --line-numbers
245
+ - --inline-source
246
+ - --title
241
247
  - twilio-ruby
242
- - "--main"
248
+ - --main
243
249
  - README.md
244
250
  require_paths:
245
251
  - lib
246
252
  required_ruby_version: !ruby/object:Gem::Requirement
247
253
  requirements:
248
- - - ">="
254
+ - - ! '>='
249
255
  - !ruby/object:Gem::Version
250
- version: '0'
256
+ version: 1.9.3
251
257
  required_rubygems_version: !ruby/object:Gem::Requirement
252
258
  requirements:
253
- - - ">="
259
+ - - ! '>='
254
260
  - !ruby/object:Gem::Version
255
261
  version: '0'
256
262
  requirements: []
257
263
  rubyforge_project:
258
- rubygems_version: 2.2.1
264
+ rubygems_version: 2.4.1
259
265
  signing_key:
260
266
  specification_version: 4
261
267
  summary: A simple library for communicating with the Twilio REST API, building TwiML,
262
268
  and generating Twilio Client Capability Tokens
263
269
  test_files:
270
+ - spec/rack/twilio_webhook_authentication_spec.rb
264
271
  - spec/rest/account_spec.rb
272
+ - spec/rest/address_spec.rb
273
+ - spec/rest/call_feedback_spec.rb
274
+ - spec/rest/call_feedback_summary_spec.rb
265
275
  - spec/rest/call_spec.rb
266
276
  - spec/rest/client_spec.rb
267
277
  - spec/rest/conference_spec.rb
268
278
  - spec/rest/instance_resource_spec.rb
279
+ - spec/rest/lookups/phone_number_spec.rb
269
280
  - spec/rest/message_spec.rb
270
281
  - spec/rest/numbers_spec.rb
271
282
  - spec/rest/queue_spec.rb
272
283
  - spec/rest/recording_spec.rb
284
+ - spec/rest/sms/message_spec.rb
285
+ - spec/rest/sms/messages_spec.rb
286
+ - spec/rest/task_router/reservation_spec.rb
287
+ - spec/rest/task_router/task_queue_spec.rb
288
+ - spec/rest/token_spec.rb
289
+ - spec/rest/utils_spec.rb
273
290
  - spec/spec_helper.rb
291
+ - spec/support/fakeweb.rb
292
+ - spec/task_router_spec.rb
293
+ - spec/twilio_spec.rb
274
294
  - spec/util/capability_spec.rb
295
+ - spec/util/client_config_spec.rb
296
+ - spec/util/configuration_spec.rb
275
297
  - spec/util/request_validator_spec.rb
276
298
  - spec/util/url_encode_spec.rb
data/CHANGES DELETED
@@ -1,47 +0,0 @@
1
- twilio-ruby changelog
2
- =====================
3
-
4
- Version 3.11.5
5
-
6
- Released February 4
7
-
8
- - Add bangs for twilify to indicate it's a dangerous operation.
9
- - Remove reference to deprecated OpenSSL Digest parameter.
10
- - Encode dates properly before passing them to the Twilio API.
11
-
12
- Version 3.11.4
13
-
14
- Released October 21, 2013
15
-
16
- - Add support for listing IncomingPhoneNumbers by type.
17
- - Add support for searching for mobile enabled numbers for
18
- both IncomingPhoneNumbers and AvailablePhoneNumbers.
19
-
20
- Version 3.11.3
21
-
22
- Released October 15, 2013
23
-
24
- - Restore support for versions of Ruby other than 2.0.0, which the
25
- previous release removed.
26
-
27
- Version 3.11.2
28
-
29
- Released October 15, 2013
30
-
31
- - Restore ability of `sms.messages` to make requests to /SMS/Messages.
32
-
33
- Version 3.11.1
34
- --------------
35
-
36
- Released September 24, 2013
37
-
38
- - Fix a bug causing request the new messages class to fail.
39
-
40
- Version 3.11.0
41
- -------------
42
-
43
- Released September 18, 2013
44
-
45
- - Add MMS support.
46
- - Add SIP-In support.
47
- - Add docs.