twilio-ruby 0.2.1 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,7 +21,7 @@ module Twilio
21
21
  uri += '.json'
22
22
  params = (args[0] && args[0] != {}) ? twilify(args[0]) : nil
23
23
  uri += "?#{url_encode(params)}" if params && method == :get
24
- request = method_class.new uri, {'User-Agent' => 'twilio-ruby/0.2.1'}
24
+ request = method_class.new uri, 'User-Agent' => 'twilio-ruby/0.3.0'
25
25
  request.basic_auth @account_sid, @auth_token
26
26
  request.form_data = params if params && [:post, :put].include?(method)
27
27
  http_response = @connection.request request
@@ -1,9 +1,15 @@
1
1
  module Twilio
2
2
  module TwiML
3
3
  class Response
4
- def initialize()
5
-
4
+
5
+ attr_reader :text
6
+
7
+ def initialize(&block)
8
+ xml = Builder::XmlMarkup.new
9
+ xml.instruct!
10
+ @text = xml.Response &block
6
11
  end
12
+
7
13
  end
8
14
  end
9
15
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-ruby
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 2
9
- - 1
10
- version: 0.2.1
8
+ - 3
9
+ - 0
10
+ version: 0.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Andrew Benton