dnsmadeeasy-rest-api 1.0.2 → 1.0.3

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: 643106cfce93f7bfc70b3bd68cccfeae5a24c8ce
4
- data.tar.gz: 99745db91cc64bbe6e6b2555a7fed5bd2754615c
3
+ metadata.gz: ad96706553c3063b3459a6db5a040c964b5e4804
4
+ data.tar.gz: 03e58dfc227d4100e15d052a190531106188dfca
5
5
  SHA512:
6
- metadata.gz: 00f097b0f1aa8fe9c8c027e74bea1355a3159ed71cff9959884471ba4be76b255c33fe677152e41973ec910f5010984dc7f8e5aa8c5eaae219e22f3fbc7985a2
7
- data.tar.gz: 7b7cedad7c07b817307319890a0ae759c668f9de5bad7f186911c28321414bcc669aa08c6fb1b57250fda0b430e5fac8a3a2bebf38621dc4899d2425b2c77cb3
6
+ metadata.gz: 1f950d3f6577f89843f5055847981e43b853a8af04a7d65e11db501ddece19ab1745ca0ec915e1f91367c519c19f6367ff1c8056697a4f76e0a94e4a8b587b29
7
+ data.tar.gz: 88e2629ed703584d9307e25962c409c28d27b8b2720ed8e0859bccd7a58d46c7412a77dbf5238be63c21b8572c7ca407b57a5d7be086f55dc48bf9f44ca12c87
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'dnsmadeeasy-rest-api'
3
- s.version = '1.0.2'
3
+ s.version = '1.0.3'
4
4
  s.authors = ['Arnoud Vermeer', 'Paul Henry', 'James Hart']
5
5
  s.email = ['a.vermeer@freshway.biz', 'ops@wanelo.com']
6
6
  s.license = 'Apache'
@@ -180,8 +180,9 @@ class DnsMadeEasy
180
180
  end
181
181
 
182
182
  response = http.request(request)
183
+ unparsed_json = response.body == "" ? "{}" : response.body
183
184
 
184
- JSON.parse(response.body)
185
+ JSON.parse(unparsed_json)
185
186
  end
186
187
 
187
188
  def request_headers
@@ -245,4 +245,11 @@ describe DnsMadeEasy do
245
245
  expect(subject.update_record('something.wanelo.com', 21, 'mail', 'A', '1.1.1.1', options = {})).to eq({})
246
246
  end
247
247
  end
248
+
249
+ describe "#request" do
250
+ it "handles an empty string response" do
251
+ Net::HTTP.any_instance.stub(:request).and_return(double(body: ""))
252
+ expect(subject.send(:request, "/some_path") { {} }).to eq({})
253
+ end
254
+ end
248
255
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dnsmadeeasy-rest-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Arnoud Vermeer
@@ -10,34 +10,34 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2014-07-07 00:00:00.000000000 Z
13
+ date: 2014-08-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
- - - ">="
19
+ - - ! '>='
20
20
  - !ruby/object:Gem::Version
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
- - - ">="
26
+ - - ! '>='
27
27
  - !ruby/object:Gem::Version
28
28
  version: '0'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: webmock
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
- - - ">="
33
+ - - ! '>='
34
34
  - !ruby/object:Gem::Version
35
35
  version: '0'
36
36
  type: :development
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
- - - ">="
40
+ - - ! '>='
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
43
  description: DNS Made Easy V2.0 REST API client for Ruby. With tests and no dependencies.
@@ -48,7 +48,7 @@ executables: []
48
48
  extensions: []
49
49
  extra_rdoc_files: []
50
50
  files:
51
- - ".gitignore"
51
+ - .gitignore
52
52
  - Gemfile
53
53
  - Gemfile.lock
54
54
  - LICENSE.txt
@@ -68,19 +68,18 @@ require_paths:
68
68
  - lib
69
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ">="
71
+ - - ! '>='
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
- - - ">="
76
+ - - ! '>='
77
77
  - !ruby/object:Gem::Version
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.2.0
81
+ rubygems_version: 2.2.2
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: DNS Made Easy V2.0 REST API client for Ruby
85
85
  test_files: []
86
- has_rdoc: