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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 84d3463c135689de012ea4cca59dbb3e4501a2be
4
- data.tar.gz: eea3153ec7f9ccfe790d4c4eee3549bd2f13132a
3
+ metadata.gz: 22d52678eb7b3fc0b808dc4329ed3946613c180e
4
+ data.tar.gz: 891f3f1dd04bf61f637e8d4173c8448316506954
5
5
  SHA512:
6
- metadata.gz: 0c3961d17fc377d5d79127d6c3234686bca87ab4f89e3b2edb828fcee03b89a8a433f77ed9aa9658b823f4198a29e50d174bca3e413ef013044c5d4a7f48f05b
7
- data.tar.gz: 7d0902a871e7a14605dad1c89fb865d73abd53f84580fab7b14dbf7e664b55b5051960bafb84a43149dbe7a392074f2f517dc106b609a0250e1fd5c8d5060d36
6
+ metadata.gz: 4b21747b53ad92cc3619505c0c96a4b9b34cc71d6160258243c951bc239a43bd2f76decf1f7bdabd8c0fc1ce2533a2fa35d088cf00fd37fc333e8469bbdea458
7
+ data.tar.gz: 1733a87fa9b6afdc9a001d48047305a7be40da6c2a4b013b0401843a5076ec3d2368456dbecb4b1d89f93a9a1baff2f7243a7e02e255be6550d75f529abe6536
data/.travis.yml ADDED
@@ -0,0 +1,9 @@
1
+ language: ruby
2
+ matrix:
3
+ include:
4
+ - rvm: "2.1.3"
5
+ gemfile: Gemfile
6
+ - rvm: "1.9.3"
7
+ gemfile: Gemfile
8
+ - rvm: "1.8.7"
9
+ gemfile: Gemfile.ruby-18
data/Gemfile.ruby-18 ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'mime-types', '~> 1.25.1'
4
+ gem 'rest-client', '~> 1.6.0'
5
+
6
+ gemspec
@@ -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)
@@ -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: :post, url: url, payload: payload, headers: headers,
5
- open_timeout: 2, timeout: 4, &block)
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)
@@ -1,3 +1,3 @@
1
1
  module SimpleDesk
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/simple_desk.rb CHANGED
@@ -28,7 +28,7 @@ module SimpleDesk
28
28
  attr_reader :config
29
29
 
30
30
  def headers
31
- { token: config.token, client: "rubygem #{SimpleDesk::VERSION}" }
31
+ { :token => config.token, :client => "rubygem #{SimpleDesk::VERSION}" }
32
32
  end
33
33
 
34
34
  def url_for(key)
@@ -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: "5555555557",
79
- email: "user@example.com",
80
- first_name: "john",
81
- last_name: "doe",
82
- properties: { great_customer: "true" } }
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: "5555555558" }
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: "5555555557", text: "this is the message text" }
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: "5555555558" }
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.1
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-09-24 00:00:00.000000000 Z
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