twilio-ruby 3.13.0 → 3.13.1
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.
- checksums.yaml +8 -8
- data/CHANGES.md +7 -0
- data/README.md +0 -1
- data/lib/twilio-ruby/rest/client.rb +1 -8
- data/lib/twilio-ruby/rest/instance_resource.rb +0 -18
- data/lib/twilio-ruby/rest/list_resource.rb +0 -20
- data/lib/twilio-ruby/rest/utils.rb +18 -0
- data/lib/twilio-ruby/version.rb +1 -1
- data/twilio-ruby.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
!binary "U0hBMQ==":
|
|
3
3
|
metadata.gz: !binary |-
|
|
4
|
-
|
|
4
|
+
N2ZkYWFmMjJiYzRiMGFhOTRlNDc5ODdmOTFlZmFlMzJkN2M5NTZiNw==
|
|
5
5
|
data.tar.gz: !binary |-
|
|
6
|
-
|
|
6
|
+
ZWFkZWY0NDRiOTk1NDVkYzg2ZjdkODgzOGM5OTM5YTJhZWQ4OWMzYQ==
|
|
7
7
|
SHA512:
|
|
8
8
|
metadata.gz: !binary |-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
YzIyNzEzZTY3OThiMzcyMTUxOWI5MjMwNTU1NWQwNjVmZTFjNzQwZGQzYzlm
|
|
10
|
+
MzQzNGU3Njg4NDVhMDdhODY4YzQ5MGYxNzk0NmUwNTAxNDIxNDI0OTI1ZDU3
|
|
11
|
+
MjA5YzZhODVhM2IwOGFhODcyMmQwOTc5YmIyMzUwM2JmMDA1ZjI=
|
|
12
12
|
data.tar.gz: !binary |-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
OWQ0NWE1OTYxNzc4OGY0YTBjYmFjMzQ3MmFjMTJmMGRhMDQ0MjhkYzBkNmVi
|
|
14
|
+
YjNjMjk0ZjRlYzhkMjg5MTUyNDBmOTkyZjdmNTE3MTI4YTZiM2FiNjExMmM3
|
|
15
|
+
Nzg2OWY2OGMyN2QxNjcyYWM3OWFiMGZkODFhODRlMmI4NmU4YWE=
|
data/CHANGES.md
CHANGED
data/README.md
CHANGED
|
@@ -53,18 +53,11 @@ module Twilio
|
|
|
53
53
|
|
|
54
54
|
API_VERSION = '2010-04-01'
|
|
55
55
|
|
|
56
|
-
# 1.8.7 doesn't have the RUBY_ENGINE constant.
|
|
57
|
-
if defined?(RUBY_ENGINE)
|
|
58
|
-
engine = RUBY_ENGINE
|
|
59
|
-
else
|
|
60
|
-
engine = 'ruby'
|
|
61
|
-
end
|
|
62
|
-
|
|
63
56
|
HTTP_HEADERS = {
|
|
64
57
|
'Accept' => 'application/json',
|
|
65
58
|
'Accept-Charset' => 'utf-8',
|
|
66
59
|
'User-Agent' => "twilio-ruby/#{Twilio::VERSION}" \
|
|
67
|
-
" (#{
|
|
60
|
+
" (#{RUBY_ENGINE}/#{RUBY_PLATFORM}" \
|
|
68
61
|
" #{RUBY_VERSION}-p#{RUBY_PATCHLEVEL})"
|
|
69
62
|
}
|
|
70
63
|
|
|
@@ -82,24 +82,6 @@ module Twilio
|
|
|
82
82
|
end
|
|
83
83
|
@updated = !hash.keys.empty?
|
|
84
84
|
end
|
|
85
|
-
|
|
86
|
-
def resource(*resources)
|
|
87
|
-
custom_resource_names = { sms: 'SMS', sip: 'SIP' }
|
|
88
|
-
resources.each do |r|
|
|
89
|
-
resource = twilify r
|
|
90
|
-
relative_path = custom_resource_names.fetch(r, resource)
|
|
91
|
-
path = "#{@path}/#{relative_path}"
|
|
92
|
-
enclosing_module = if @submodule == nil
|
|
93
|
-
Twilio::REST
|
|
94
|
-
else
|
|
95
|
-
Twilio::REST.const_get(@submodule)
|
|
96
|
-
end
|
|
97
|
-
resource_class = enclosing_module.const_get resource
|
|
98
|
-
instance_variable_set("@#{r}", resource_class.new(path, @client))
|
|
99
|
-
end
|
|
100
|
-
self.class.instance_eval { attr_reader *resources }
|
|
101
|
-
end
|
|
102
|
-
|
|
103
85
|
end
|
|
104
86
|
end
|
|
105
87
|
end
|
|
@@ -99,26 +99,6 @@ module Twilio
|
|
|
99
99
|
@instance_class.new "#{@path}/#{response[@instance_id_key]}", @client,
|
|
100
100
|
response
|
|
101
101
|
end
|
|
102
|
-
|
|
103
|
-
def resource(*resources)
|
|
104
|
-
custom_resource_names = {
|
|
105
|
-
sms: 'SMS',
|
|
106
|
-
sip: 'SIP'
|
|
107
|
-
}
|
|
108
|
-
resources.each do |r|
|
|
109
|
-
resource = twilify r
|
|
110
|
-
relative_path = custom_resource_names.fetch(r, resource)
|
|
111
|
-
path = "#{@path}/#{relative_path}"
|
|
112
|
-
enclosing_module = if @submodule == nil
|
|
113
|
-
Twilio::REST
|
|
114
|
-
else
|
|
115
|
-
Twilio::REST.const_get(@submodule)
|
|
116
|
-
end
|
|
117
|
-
resource_class = enclosing_module.const_get resource
|
|
118
|
-
instance_variable_set("@#{r}", resource_class.new(path, @client))
|
|
119
|
-
end
|
|
120
|
-
self.class.instance_eval { attr_reader *resources }
|
|
121
|
-
end
|
|
122
102
|
end
|
|
123
103
|
end
|
|
124
104
|
end
|
|
@@ -28,6 +28,24 @@ module Twilio
|
|
|
28
28
|
end
|
|
29
29
|
end
|
|
30
30
|
|
|
31
|
+
protected
|
|
32
|
+
|
|
33
|
+
def resource(*resources)
|
|
34
|
+
custom_resource_names = { sms: 'SMS', sip: 'SIP' }
|
|
35
|
+
resources.each do |r|
|
|
36
|
+
resource = twilify r
|
|
37
|
+
relative_path = custom_resource_names.fetch(r, resource)
|
|
38
|
+
path = "#{@path}/#{relative_path}"
|
|
39
|
+
enclosing_module = if @submodule == nil
|
|
40
|
+
Twilio::REST
|
|
41
|
+
else
|
|
42
|
+
Twilio::REST.const_get(@submodule)
|
|
43
|
+
end
|
|
44
|
+
resource_class = enclosing_module.const_get resource
|
|
45
|
+
instance_variable_set("@#{r}", resource_class.new(path, @client))
|
|
46
|
+
end
|
|
47
|
+
self.class.instance_eval { attr_reader *resources }
|
|
48
|
+
end
|
|
31
49
|
end
|
|
32
50
|
end
|
|
33
51
|
end
|
data/lib/twilio-ruby/version.rb
CHANGED
data/twilio-ruby.gemspec
CHANGED
|
@@ -17,7 +17,7 @@ Gem::Specification.new do |spec|
|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ['lib']
|
|
20
|
-
spec.required_ruby_version = '>= 1.
|
|
20
|
+
spec.required_ruby_version = '>= 1.9.3'
|
|
21
21
|
spec.extra_rdoc_files = ['README.md', 'LICENSE.md']
|
|
22
22
|
spec.rdoc_options = ['--line-numbers', '--inline-source', '--title', 'twilio-ruby', '--main', 'README.md']
|
|
23
23
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twilio-ruby
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.13.
|
|
4
|
+
version: 3.13.1
|
|
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-
|
|
11
|
+
date: 2014-10-01 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: multi_json
|
|
@@ -216,7 +216,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
216
216
|
requirements:
|
|
217
217
|
- - ! '>='
|
|
218
218
|
- !ruby/object:Gem::Version
|
|
219
|
-
version: 1.
|
|
219
|
+
version: 1.9.3
|
|
220
220
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
221
|
requirements:
|
|
222
222
|
- - ! '>='
|