dslimple 2.0.1 → 2.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dslimple/cli.rb +1 -1
- data/lib/dslimple/client.rb +3 -2
- data/lib/dslimple/exporter.rb +1 -1
- data/lib/dslimple/query.rb +3 -3
- data/lib/dslimple/record.rb +4 -2
- data/lib/dslimple/version.rb +1 -1
- metadata +6 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1701e558aa2fed91d0b6c72af872774b72041f036bf02dd1068aa1709d5ccfd9
|
4
|
+
data.tar.gz: 04fed2502ce2e1b0075fdebafc3c56fd298b8a46ba4b231e7fa1f2e69e3ee887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 910f9787ee627aad9b915e958e051d2e6d93cb5dd495d349631ffd2f535ea770720506dc9ed328522154a78d42d036eb83d57c6fbe86ea0d61d27b8b11aa9a46
|
7
|
+
data.tar.gz: 449186cae4d50e07048486daef865183f8efd808ec5b3f0f275ed501847a156e421083711459f8b39d24aba36d1c52beef9c05cbb97a60358264f3faabaf97b5
|
data/lib/dslimple/cli.rb
CHANGED
@@ -68,7 +68,7 @@ class Dslimple::CLI < Thor
|
|
68
68
|
when Dnsimple::AuthenticationError
|
69
69
|
error(set_color(e.message, :red, :bold))
|
70
70
|
when Dnsimple::RequestError
|
71
|
-
error(set_color("#{e.message}: #{JSON.parse(e.
|
71
|
+
error(set_color("#{e.message}: #{JSON.parse(e.http_response.body)['message']}", :yellow, :bold))
|
72
72
|
when Dslimple::DSL::Error
|
73
73
|
error(set_color(e.message, :yellow, :bold))
|
74
74
|
else
|
data/lib/dslimple/client.rb
CHANGED
@@ -46,13 +46,14 @@ class Dslimple::Client < Dnsimple::Client
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def all_records(zone)
|
49
|
-
|
49
|
+
zone = zone.name if zone.is_a?(Dslimple::Zone)
|
50
|
+
response = zones.list_zone_records(account_id, zone)
|
50
51
|
|
51
52
|
records = []
|
52
53
|
while response
|
53
54
|
records = records + response.data.map do |record|
|
54
55
|
record = Dslimple::Record.new(record)
|
55
|
-
record.zone = zone
|
56
|
+
record.zone = zone
|
56
57
|
record
|
57
58
|
end
|
58
59
|
|
data/lib/dslimple/exporter.rb
CHANGED
data/lib/dslimple/query.rb
CHANGED
@@ -52,11 +52,11 @@ class Dslimple::Query
|
|
52
52
|
def execute_record(api_client, account_id)
|
53
53
|
case operation
|
54
54
|
when :addition
|
55
|
-
api_client.zones.
|
55
|
+
api_client.zones.create_zone_record(account_id, zone, params)
|
56
56
|
when :modification
|
57
|
-
api_client.zones.
|
57
|
+
api_client.zones.update_zone_record(account_id, zone, params[:id], params)
|
58
58
|
when :deletion
|
59
|
-
api_client.zones.
|
59
|
+
api_client.zones.delete_zone_record(account_id, zone, params[:id])
|
60
60
|
end
|
61
61
|
end
|
62
62
|
end
|
data/lib/dslimple/record.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'dslimple'
|
2
2
|
require 'dnsimple'
|
3
|
-
require 'dslimple'
|
4
3
|
|
5
4
|
class Dslimple::Record
|
6
5
|
RECORD_TYPES = %w[A ALIAS CNAME MX SPF URL TXT NS SRV NAPTR PTR AAAA SSHFP HINFO POOL CAA]
|
@@ -59,7 +58,7 @@ class Dslimple::Record
|
|
59
58
|
end
|
60
59
|
|
61
60
|
def to_params
|
62
|
-
{
|
61
|
+
params = {
|
63
62
|
id: @id,
|
64
63
|
name: name,
|
65
64
|
type: type.to_s.upcase,
|
@@ -68,6 +67,9 @@ class Dslimple::Record
|
|
68
67
|
priority: priority,
|
69
68
|
regions: regions,
|
70
69
|
}
|
70
|
+
params.delete(:regions)
|
71
|
+
|
72
|
+
params
|
71
73
|
end
|
72
74
|
|
73
75
|
private
|
data/lib/dslimple/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dslimple
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sho Kusano
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -132,7 +132,7 @@ homepage: https://github.com/zeny-io/dslimple
|
|
132
132
|
licenses:
|
133
133
|
- MIT
|
134
134
|
metadata: {}
|
135
|
-
post_install_message:
|
135
|
+
post_install_message:
|
136
136
|
rdoc_options: []
|
137
137
|
require_paths:
|
138
138
|
- lib
|
@@ -147,9 +147,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
147
147
|
- !ruby/object:Gem::Version
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
|
-
|
151
|
-
|
152
|
-
signing_key:
|
150
|
+
rubygems_version: 3.2.3
|
151
|
+
signing_key:
|
153
152
|
specification_version: 4
|
154
153
|
summary: DSLimple is a tool to manage DNSimple.
|
155
154
|
test_files: []
|