dyn-rb 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dyn/messaging.rb +2 -2
- data/lib/dyn/traffic.rb +2 -2
- data/lib/dyn/traffic/gslb.rb +5 -4
- data/lib/dyn/version.rb +1 -1
- data/lib/dyn/version.rb~ +1 -1
- metadata +2 -2
data/lib/dyn/messaging.rb
CHANGED
@@ -138,8 +138,8 @@ module Dyn
|
|
138
138
|
response.body
|
139
139
|
end
|
140
140
|
|
141
|
-
response = JSON.parse(response_body
|
142
|
-
|
141
|
+
response = response_body && response_body.length >= 2 ? JSON.parse(response_body) : {}
|
142
|
+
|
143
143
|
if (response["response"] && response["response"]["status"] == 200)
|
144
144
|
response["response"]["data"]
|
145
145
|
else
|
data/lib/dyn/traffic.rb
CHANGED
@@ -145,7 +145,7 @@ module Dyn
|
|
145
145
|
##
|
146
146
|
# Resource Record API
|
147
147
|
##
|
148
|
-
%w{AAAA A CNAME DNSKEY DS KEY LOC MX NS PTR RP SOA SRV TXT}.each do |record_type|
|
148
|
+
%w{AAAA A CNAME DNSKEY DS KEY LOC MX NS PTR RP SOA SRV TXT SSHFP}.each do |record_type|
|
149
149
|
define_method underscore(record_type) do
|
150
150
|
Dyn::Traffic::Resource.new(self, @zone, "#{record_type}")
|
151
151
|
end
|
@@ -204,7 +204,7 @@ module Dyn
|
|
204
204
|
response.body.sub!('/REST/','')
|
205
205
|
response = get(response.body)
|
206
206
|
end
|
207
|
-
parse_response(JSON.parse(response.body
|
207
|
+
parse_response(response.body && response.body.length >= 2 ? JSON.parse(response.body) : {})
|
208
208
|
end
|
209
209
|
|
210
210
|
def parse_response(response)
|
data/lib/dyn/traffic/gslb.rb
CHANGED
@@ -10,9 +10,9 @@
|
|
10
10
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
11
11
|
# you may not use this file except in compliance with the License.
|
12
12
|
# You may obtain a copy of the License at
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# http://www.apache.org/licenses/LICENSE-2.0
|
15
|
-
#
|
15
|
+
#
|
16
16
|
# Unless required by applicable law or agreed to in writing, software
|
17
17
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
18
18
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
@@ -32,7 +32,7 @@ module Dyn
|
|
32
32
|
@ttl = options[:ttl] || 30
|
33
33
|
@host_list = options[:host_list] || {}
|
34
34
|
@contact_nick = options[:contact_nick] || 'owner'
|
35
|
-
|
35
|
+
|
36
36
|
@region_code = options[:region_code] || 'global'
|
37
37
|
@monitor = options[:monitor] || {}
|
38
38
|
@serve_count = options[:serve_count] || 1
|
@@ -110,7 +110,8 @@ module Dyn
|
|
110
110
|
:address => h["address"],
|
111
111
|
:label => h["label"],
|
112
112
|
:weight => h["weight"],
|
113
|
-
:serve_mode => h["serve_mode"]
|
113
|
+
:serve_mode => h["serve_mode"],
|
114
|
+
:status => h["status"]
|
114
115
|
}
|
115
116
|
end
|
116
117
|
Dyn::Traffic::GSLB.new(@dyn, results["zone"], {
|
data/lib/dyn/version.rb
CHANGED
data/lib/dyn/version.rb~
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dyn-rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|