loopiator 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/loopiator.rb +1 -1
- data/lib/loopiator/dns.rb +13 -7
- data/lib/loopiator/domains.rb +6 -0
- data/loopiator.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a24299e58842ad7880687707f5da0e6441eda72aa9b9cdedbac83170bef5059
|
4
|
+
data.tar.gz: 509cdd242830d471eda10438f382e6e36f0828421090f6f1e8a9630bdd1eb8b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3f7a2a738ece26eb80d77b244f1573b0654805725bcd24ba220e9c82054b41846c9e046553854bc3f6125c273a56397818d28199fcc0306d250421719d9b537
|
7
|
+
data.tar.gz: c2907a0db7abb553ffdb5021c0848baf21b1055183dd81ce0a94b08b90988a202ca7b46f1a7609009c7e3c15bb2d65648e755aad1f4a32e932f8963a51d50c95
|
data/lib/loopiator.rb
CHANGED
data/lib/loopiator/dns.rb
CHANGED
@@ -2,23 +2,29 @@ module Loopiator
|
|
2
2
|
module Dns
|
3
3
|
|
4
4
|
def get_zone_records(domain, subdomain, customer_number: "")
|
5
|
-
records
|
6
|
-
response
|
5
|
+
records = []
|
6
|
+
response = call("getZoneRecords", customer_number, encode_domain(domain), subdomain)
|
7
7
|
|
8
|
-
response.
|
9
|
-
|
10
|
-
|
8
|
+
if response && response.is_a?(Array) && response.any?
|
9
|
+
if response.first.is_a?(String) && response.first.downcase.to_sym.eql?(:rate_limited)
|
10
|
+
raise Loopiator::RateLimitError
|
11
|
+
else
|
12
|
+
response.each do |item|
|
13
|
+
records << Loopiator::Models::DnsRecord.new(item)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
11
17
|
|
12
18
|
return records
|
13
19
|
end
|
14
20
|
|
15
21
|
def add_zone_record(domain, subdomain, record_obj, customer_number: "")
|
16
|
-
response
|
22
|
+
response = parse_status_response(call("addZoneRecord", customer_number, encode_domain(domain), subdomain, record_obj))
|
17
23
|
return response.eql?(:ok)
|
18
24
|
end
|
19
25
|
|
20
26
|
def remove_zone_record(domain, subdomain, record_id, customer_number: "")
|
21
|
-
response
|
27
|
+
response = parse_status_response(call("removeZoneRecord", customer_number, encode_domain(domain), subdomain, record_id))
|
22
28
|
return response.eql?(:ok)
|
23
29
|
end
|
24
30
|
|
data/lib/loopiator/domains.rb
CHANGED
@@ -57,6 +57,12 @@ module Loopiator
|
|
57
57
|
return response.eql?(:ok)
|
58
58
|
end
|
59
59
|
|
60
|
+
def remove_subdomain(domain, subdomain, customer_number: "")
|
61
|
+
response = parse_status_response(call("removeSubdomain", customer_number, encode_domain(domain), subdomain))
|
62
|
+
|
63
|
+
return response.eql?(:ok)
|
64
|
+
end
|
65
|
+
|
60
66
|
def update_nameservers(domain, nameservers = ["ns1.loopia.se", "ns2.loopia.se"], customer_number: "")
|
61
67
|
response = parse_status_response(call("updateDNSServers", customer_number, encode_domain(domain), nameservers))
|
62
68
|
|
data/loopiator.gemspec
CHANGED
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
|
|
3
3
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.3.5") if s.respond_to? :required_rubygems_version=
|
4
4
|
|
5
5
|
s.name = 'loopiator'
|
6
|
-
s.version = '0.4.
|
6
|
+
s.version = '0.4.2'
|
7
7
|
|
8
8
|
s.homepage = "https://github.com/Agiley/Loopiator"
|
9
9
|
s.email = "sebastian@agiley.se"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: loopiator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastian Johnsson
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-05-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simpleidn
|
@@ -101,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: 1.3.5
|
103
103
|
requirements: []
|
104
|
-
|
105
|
-
rubygems_version: 2.7.4
|
104
|
+
rubygems_version: 3.0.3
|
106
105
|
signing_key:
|
107
106
|
specification_version: 2
|
108
107
|
summary: Interface for communicating with Loopia's API
|