smsmock 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/smsmock/twilio/client.rb +1 -30
- data/lib/smsmock/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a3d444cd9be9520d15a964c9451beae5ba9f6b0
|
4
|
+
data.tar.gz: ca406ba1fb48ba90d770f854df9132ddb92af96a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68138a4116bd1646b77874906805214f088e652bc23fbe73473d11a9a7da2ef4c0657377ad990db4b7f5fcf9e56f18ecb7c274cb6c14937a65ba8fa840f97445
|
7
|
+
data.tar.gz: 210c5aa91753e365d6999b84e48f4e86090e62fff0b677715642efb1b1368a7560df762c11f050ed349a53182d920bd5f1317344093e179326271d09a4356b3a
|
data/README.md
CHANGED
@@ -28,7 +28,7 @@ describe SmsMock do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it 'add a message to SmsMock::Client' do
|
31
|
-
@client.
|
31
|
+
@client.messages.create(to: '123981', body: 'abc123', from: '1291')
|
32
32
|
expect(SmsMock::Client).to have_messages
|
33
33
|
expect(SmsMock::Client.messages.last).to have_body 'abc123'
|
34
34
|
expect(SmsMock::Client.messages.last).to be_sent_from '1291'
|
@@ -1,37 +1,8 @@
|
|
1
1
|
module Twilio
|
2
2
|
module REST
|
3
|
-
class Client < BaseClient
|
4
|
-
def initialize(account_sid, auth_token)
|
5
|
-
@account_sid = account_sid
|
6
|
-
@auth_token = auth_token
|
7
|
-
end
|
8
|
-
|
9
|
-
def account
|
10
|
-
@account ||= Account.new
|
11
|
-
end
|
12
|
-
end
|
13
|
-
|
14
|
-
class Account < InstanceResource
|
15
|
-
def initialize
|
16
|
-
end
|
17
|
-
|
18
|
-
def sms
|
19
|
-
@sms ||= Sms.new
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
class Sms < InstanceResource
|
24
|
-
def initialize
|
25
|
-
end
|
26
|
-
|
27
|
-
def messages
|
28
|
-
@messages ||= Messages.new
|
29
|
-
end
|
30
|
-
end
|
31
|
-
|
32
3
|
class Messages < ListResource
|
33
4
|
include SmsMock::Helpers
|
34
|
-
def initialize
|
5
|
+
def initialize(*args)
|
35
6
|
end
|
36
7
|
|
37
8
|
def create(opts={})
|
data/lib/smsmock/version.rb
CHANGED