twilio-wrapper 0.0.2 → 0.0.3

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 (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/twilio-wrapper.rb +5 -6
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -1,6 +1,8 @@
1
+ require 'twiliolib'
2
+
1
3
  class TwilioWrapper
2
4
  API_VERSION = '2010-04-01'
3
- attr_reader :account_sid, :account_token, :caller_id, :caller_pin
5
+ attr_reader :account_sid, :account_token, :caller_id, :caller_pin, :twilio_response
4
6
 
5
7
  def initialize(account_sid, account_token, caller_id, caller_pin = nil)
6
8
  @account_sid = account_sid
@@ -20,12 +22,9 @@ class TwilioWrapper
20
22
 
21
23
  resp = @account.request("/#{API_VERSION}/Accounts/#{@account_sid}/SMS/Messages", 'POST', payload)
22
24
 
23
- send_success = true
25
+ send_success = resp.is_a?(Net::HTTPSuccess)
24
26
 
25
- unless resp.is_a?(Net::HTTPSuccess)
26
- send_success = false
27
- puts resp.body
28
- end
27
+ @twilio_response = resp
29
28
 
30
29
  return send_success
31
30
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twilio-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Emery