simple_desk 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +9 -0
- data/Gemfile.ruby-18 +6 -0
- data/Gemfile.ruby-18.lock +51 -0
- data/lib/simple_desk/client.rb +2 -2
- data/lib/simple_desk/version.rb +1 -1
- data/lib/simple_desk.rb +1 -1
- data/spec/integrations/simple_desk_spec.rb +8 -8
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 22d52678eb7b3fc0b808dc4329ed3946613c180e
|
4
|
+
data.tar.gz: 891f3f1dd04bf61f637e8d4173c8448316506954
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b21747b53ad92cc3619505c0c96a4b9b34cc71d6160258243c951bc239a43bd2f76decf1f7bdabd8c0fc1ce2533a2fa35d088cf00fd37fc333e8469bbdea458
|
7
|
+
data.tar.gz: 1733a87fa9b6afdc9a001d48047305a7be40da6c2a4b013b0401843a5076ec3d2368456dbecb4b1d89f93a9a1baff2f7243a7e02e255be6550d75f529abe6536
|
data/.travis.yml
ADDED
data/Gemfile.ruby-18
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
simple_desk (1.0.2)
|
5
|
+
rest-client (~> 1.6)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.3.6)
|
11
|
+
crack (0.4.2)
|
12
|
+
safe_yaml (~> 1.0.0)
|
13
|
+
diff-lcs (1.2.5)
|
14
|
+
json (1.8.1)
|
15
|
+
mime-types (1.25.1)
|
16
|
+
rake (10.3.2)
|
17
|
+
rdoc (4.1.2)
|
18
|
+
json (~> 1.4)
|
19
|
+
rest-client (1.6.8)
|
20
|
+
mime-types (~> 1.16)
|
21
|
+
rdoc (>= 2.4.2)
|
22
|
+
rspec (3.1.0)
|
23
|
+
rspec-core (~> 3.1.0)
|
24
|
+
rspec-expectations (~> 3.1.0)
|
25
|
+
rspec-mocks (~> 3.1.0)
|
26
|
+
rspec-core (3.1.5)
|
27
|
+
rspec-support (~> 3.1.0)
|
28
|
+
rspec-expectations (3.1.2)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.1.0)
|
31
|
+
rspec-mocks (3.1.2)
|
32
|
+
rspec-support (~> 3.1.0)
|
33
|
+
rspec-support (3.1.1)
|
34
|
+
safe_yaml (1.0.4)
|
35
|
+
vcr (2.9.3)
|
36
|
+
webmock (1.19.0)
|
37
|
+
addressable (>= 2.3.6)
|
38
|
+
crack (>= 0.3.2)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
bundler (~> 1.3)
|
45
|
+
mime-types (~> 1.25.1)
|
46
|
+
rake (~> 10.0)
|
47
|
+
rest-client (~> 1.6.0)
|
48
|
+
rspec (~> 3.0)
|
49
|
+
simple_desk!
|
50
|
+
vcr (~> 2.6)
|
51
|
+
webmock (~> 1.1)
|
data/lib/simple_desk/client.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
module SimpleDesk
|
2
2
|
module Client
|
3
3
|
def self.post(url, payload, headers={}, &block)
|
4
|
-
RestClient::Request.execute(method
|
5
|
-
open_timeout
|
4
|
+
RestClient::Request.execute(:method => :post, :url => url, :payload => payload, :headers => headers,
|
5
|
+
:open_timeout => 2, :timeout => 4, &block)
|
6
6
|
|
7
7
|
rescue Errno::ECONNREFUSED => e
|
8
8
|
raise ConnectionRefused.new(e)
|
data/lib/simple_desk/version.rb
CHANGED
data/lib/simple_desk.rb
CHANGED
@@ -75,18 +75,18 @@ describe 'SimpleDesk' do
|
|
75
75
|
let(:response) { SimpleDesk.add_customer(params) }
|
76
76
|
let(:token) { '3Z9L8xFjeNmXL7Yn-pFJUBoxkVWBbl5o' }
|
77
77
|
let(:params) do
|
78
|
-
{ phone_number
|
79
|
-
email
|
80
|
-
first_name
|
81
|
-
last_name
|
82
|
-
properties
|
78
|
+
{ :phone_number => "5555555557",
|
79
|
+
:email => "user@example.com",
|
80
|
+
:first_name => "john",
|
81
|
+
:last_name => "doe",
|
82
|
+
:properties => { :great_customer => "true" } }
|
83
83
|
end
|
84
84
|
|
85
85
|
it_behaves_like "a mature, error handling gem"
|
86
86
|
|
87
87
|
context 'with invalid params' do
|
88
88
|
let(:params) do
|
89
|
-
{ phone_numbah
|
89
|
+
{ :phone_numbah => "5555555558" }
|
90
90
|
end
|
91
91
|
|
92
92
|
it 'raises a BadRequest error with hint' do
|
@@ -129,14 +129,14 @@ describe 'SimpleDesk' do
|
|
129
129
|
let(:response) { SimpleDesk.message_customer(params) }
|
130
130
|
let(:token) { '3Z9L8xFjeNmXL7Yn-pFJUBoxkVWBbl5o' }
|
131
131
|
let(:params) do
|
132
|
-
{ to
|
132
|
+
{ :to => "5555555557", :text => "this is the message text" }
|
133
133
|
end
|
134
134
|
|
135
135
|
it_behaves_like "a mature, error handling gem"
|
136
136
|
|
137
137
|
context 'with invalid params' do
|
138
138
|
let(:params) do
|
139
|
-
{ toz
|
139
|
+
{ :toz => "5555555558" }
|
140
140
|
end
|
141
141
|
|
142
142
|
it 'raises a BadRequest error with hint' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_desk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Gesimondo
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -104,7 +104,10 @@ extensions: []
|
|
104
104
|
extra_rdoc_files: []
|
105
105
|
files:
|
106
106
|
- .gitignore
|
107
|
+
- .travis.yml
|
107
108
|
- Gemfile
|
109
|
+
- Gemfile.ruby-18
|
110
|
+
- Gemfile.ruby-18.lock
|
108
111
|
- LICENSE.txt
|
109
112
|
- README.md
|
110
113
|
- RELEASE.md
|