dnsmadeeasy 0.4.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +5 -10
- data/.gitignore +2 -0
- data/.rubocop.yml +5 -4
- data/.rubocop_todo.yml +251 -143
- data/CLAUDE.md +67 -0
- data/Gemfile +9 -1
- data/README.md +854 -0
- data/Rakefile +4 -4
- data/dnsmadeeasy.gemspec +56 -32
- data/docs/badges/coverage_badge.svg +21 -0
- data/docs/dry-cli-based-tools.webloc +8 -0
- data/docs/plan-zone-management.md +756 -0
- data/docs/plans/01-plan-ruby4-baseline.md +38 -0
- data/docs/plans/02-plan-dry-cli-launcher.md +44 -0
- data/docs/plans/03-plan-account-command.md +43 -0
- data/docs/plans/04-plan-zone-record-model.md +48 -0
- data/docs/plans/05-plan-zone-parser.md +41 -0
- data/docs/plans/06-plan-zone-formatter.md +43 -0
- data/docs/plans/07-plan-zone-export.md +58 -0
- data/docs/plans/08-plan-zone-diff.md +42 -0
- data/docs/plans/09-plan-zone-apply.md +69 -0
- data/docs/plans/10-plan-docs-cleanup.md +55 -0
- data/docs/plans/11-plan-zone-cli-arguments.md +114 -0
- data/docs/spec-zone-management.md +242 -0
- data/exe/dme +13 -2
- data/exe/dmez +6 -0
- data/lib/dme.rb +7 -2
- data/lib/dnsmadeeasy/api/client.rb +32 -26
- data/lib/dnsmadeeasy/cli/box_output.rb +9 -0
- data/lib/dnsmadeeasy/cli/commands/account.rb +222 -0
- data/lib/dnsmadeeasy/cli/commands/base.rb +119 -0
- data/lib/dnsmadeeasy/cli/commands/legacy_operation.rb +30 -0
- data/lib/dnsmadeeasy/cli/commands/version.rb +22 -0
- data/lib/dnsmadeeasy/cli/commands/zone.rb +392 -0
- data/lib/dnsmadeeasy/cli/commands.rb +19 -0
- data/lib/dnsmadeeasy/cli/input.rb +14 -0
- data/lib/dnsmadeeasy/cli/launcher.rb +53 -0
- data/lib/dnsmadeeasy/cli/message_helpers.rb +93 -0
- data/lib/dnsmadeeasy/cli/reported_error.rb +10 -0
- data/lib/dnsmadeeasy/credentials/api_keys.rb +11 -9
- data/lib/dnsmadeeasy/credentials.rb +0 -1
- data/lib/dnsmadeeasy/runner.rb +24 -24
- data/lib/dnsmadeeasy/types.rb +19 -0
- data/lib/dnsmadeeasy/version.rb +2 -1
- data/lib/dnsmadeeasy/zone/aname_flattener.rb +63 -0
- data/lib/dnsmadeeasy/zone/apply_executor.rb +189 -0
- data/lib/dnsmadeeasy/zone/apply_result.rb +22 -0
- data/lib/dnsmadeeasy/zone/diff.rb +152 -0
- data/lib/dnsmadeeasy/zone/file.rb +26 -0
- data/lib/dnsmadeeasy/zone/parser.rb +172 -0
- data/lib/dnsmadeeasy/zone/plan.rb +28 -0
- data/lib/dnsmadeeasy/zone/plan_action.rb +29 -0
- data/lib/dnsmadeeasy/zone/plan_renderer.rb +91 -0
- data/lib/dnsmadeeasy/zone/provider_record.rb +18 -0
- data/lib/dnsmadeeasy/zone/record.rb +44 -0
- data/lib/dnsmadeeasy/zone/record_set.rb +23 -0
- data/lib/dnsmadeeasy/zone/remote_adapter.rb +94 -0
- data/lib/dnsmadeeasy/zone/remote_records.rb +26 -0
- data/lib/dnsmadeeasy/zone/serializer.rb +119 -0
- data/lib/dnsmadeeasy.rb +61 -27
- metadata +212 -39
- data/.dme-help.png +0 -0
- data/README.adoc +0 -690
data/Rakefile
CHANGED
|
@@ -10,15 +10,15 @@ def shell(*args)
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
task :permissions do
|
|
13
|
-
shell('rm -rf pkg/ tmp/'
|
|
14
|
-
shell(
|
|
15
|
-
shell(
|
|
13
|
+
shell('rm -rf pkg/ tmp/')
|
|
14
|
+
shell('chmod -v o+r,g+r * */* */*/* */*/*/* */*/*/*/* */*/*/*/*/*')
|
|
15
|
+
shell('find . -type d -exec chmod o+x,g+x {} \\;')
|
|
16
16
|
end
|
|
17
17
|
|
|
18
18
|
task build: :permissions
|
|
19
19
|
|
|
20
20
|
YARD::Rake::YardocTask.new(:doc) do |t|
|
|
21
|
-
t.files = %w
|
|
21
|
+
t.files = %w[lib/**/*.rb exe/*.rb - README.md LICENSE.txt]
|
|
22
22
|
t.options.unshift('--title', 'DNS Client for DnsMadeEasy')
|
|
23
23
|
t.after = -> { exec('open doc/index.html') }
|
|
24
24
|
end
|
data/dnsmadeeasy.gemspec
CHANGED
|
@@ -8,48 +8,64 @@ require 'dnsmadeeasy/version'
|
|
|
8
8
|
|
|
9
9
|
# rubocop:todo Naming/HeredocDelimiterCase
|
|
10
10
|
DnsMadeEasy::DESCRIPTION = <<~eof
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
This gem ships "dmez" — a Terraform-style command line tool for the
|
|
12
|
+
DNS provider DnsMadeEasy.com — together with an authoritative,
|
|
13
|
+
fully-featured Ruby client for their REST API v2.0.
|
|
14
|
+
|
|
15
|
+
The dmez CLI manages your zones as standard DNS zone files with the
|
|
16
|
+
familiar read -> plan -> apply loop: "dmez zone export" writes a
|
|
17
|
+
canonical, TTL-lossless zone file with fixed aligned columns;
|
|
18
|
+
"dmez zone plan" diffs it against the live records (conservatively:
|
|
19
|
+
deletes are skipped by default and ambiguous record groups are
|
|
20
|
+
flagged for manual review); "dmez zone apply" executes the plan in
|
|
21
|
+
merge, add-only, or delete-only mode. Zone files can also be
|
|
22
|
+
validated and formatted, ANAME records are preserved as first-class
|
|
23
|
+
citizens (with optional --strict-rfc flattening on export), and
|
|
24
|
+
every account API operation is available under "dmez account".
|
|
25
|
+
|
|
26
|
+
The Ruby API supports storing credentials in
|
|
27
|
+
~/.dnsmadeeasy/credentials.yml, including multiple accounts and
|
|
28
|
+
sym-encrypted values.
|
|
29
|
+
|
|
30
|
+
ACKNOWLEDGEMENTS:
|
|
31
|
+
|
|
32
|
+
1. This gem is based on the original work contributed by Wanelo.com to the
|
|
33
|
+
now abandonded "dnsmadeeasy-rest-api" client.
|
|
34
|
+
|
|
35
|
+
2. We also wish to thank the gem author Phil Cohen who
|
|
36
|
+
kindly yielded the "dnsmadeeasy" RubyGems namespace to this gem.
|
|
37
|
+
|
|
38
|
+
3. We also thank Praneeth Are for contributing the support for
|
|
39
|
+
secondary domains in 0.3.5.
|
|
30
40
|
eof
|
|
31
41
|
|
|
32
42
|
Gem::Specification.new do |spec|
|
|
33
43
|
spec.name = 'dnsmadeeasy'
|
|
34
44
|
spec.version = DnsMadeEasy::VERSION
|
|
35
|
-
spec.authors = ['Konstantin Gredeskoul', 'Arnoud Vermeer', 'Paul Henry', 'James Hart', 'Phil Cohen',
|
|
36
|
-
|
|
45
|
+
spec.authors = ['Konstantin Gredeskoul', 'Arnoud Vermeer', 'Paul Henry', 'James Hart', 'Phil Cohen',
|
|
46
|
+
'Praneeth Are']
|
|
47
|
+
spec.email = %w[kigster@gmail.com letuboy@gmail.com hjhart@gmail.com]
|
|
37
48
|
spec.summary = DnsMadeEasy::DESCRIPTION
|
|
38
49
|
spec.description = DnsMadeEasy::DESCRIPTION
|
|
39
50
|
spec.post_install_message = <<~EOF
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
51
|
+
Thank you for installing the DnsMadeEasy ruby gem, which ships
|
|
52
|
+
the 'dmez' CLI — manage your DNS zones as plain zone files with
|
|
53
|
+
a Terraform-style workflow:
|
|
54
|
+
|
|
55
|
+
dmez zone export yourdomain.com --output=yourdomain.com.zone
|
|
56
|
+
dmez zone plan yourdomain.com yourdomain.com.zone
|
|
57
|
+
dmez zone apply yourdomain.com yourdomain.com.zone
|
|
58
|
+
|
|
59
|
+
Run `dmez --help` to see all commands (the old 'dme' executable
|
|
60
|
+
is deprecated). A full Ruby API client is included as well, with
|
|
61
|
+
(multi-account) credentials support via a YAML file in your home
|
|
62
|
+
directory. For more information, please see the README at:
|
|
63
|
+
https://github.com/kigster/dnsmadeeasy
|
|
49
64
|
EOF
|
|
50
65
|
|
|
51
66
|
spec.homepage = 'https://github.com/kigster/dnsmadeeasy'
|
|
52
67
|
spec.license = 'MIT'
|
|
68
|
+
spec.required_ruby_version = '~> 4.0'
|
|
53
69
|
|
|
54
70
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
55
71
|
f.match(%r{^(test|spec|features)/})
|
|
@@ -61,10 +77,17 @@ Gem::Specification.new do |spec|
|
|
|
61
77
|
|
|
62
78
|
spec.add_dependency 'awesome_print'
|
|
63
79
|
spec.add_dependency 'colored2'
|
|
80
|
+
spec.add_dependency 'dns-zonefile'
|
|
81
|
+
spec.add_dependency 'dry-cli'
|
|
82
|
+
spec.add_dependency 'dry-monads'
|
|
83
|
+
spec.add_dependency 'dry-struct'
|
|
84
|
+
spec.add_dependency 'dry-types'
|
|
64
85
|
spec.add_dependency 'hashie'
|
|
65
86
|
spec.add_dependency 'sym'
|
|
87
|
+
spec.add_dependency 'tsort'
|
|
88
|
+
spec.add_dependency 'tty-box'
|
|
89
|
+
spec.add_dependency 'tty-spinner'
|
|
66
90
|
|
|
67
|
-
spec.add_development_dependency 'bundler'
|
|
68
91
|
spec.add_development_dependency 'rake'
|
|
69
92
|
spec.add_development_dependency 'relaxed-rubocop'
|
|
70
93
|
spec.add_development_dependency 'rspec'
|
|
@@ -74,5 +97,6 @@ Gem::Specification.new do |spec|
|
|
|
74
97
|
spec.add_development_dependency 'webmock'
|
|
75
98
|
spec.add_development_dependency 'yard'
|
|
76
99
|
|
|
77
|
-
|
|
100
|
+
spec.add_development_dependency 'aruba'
|
|
101
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
78
102
|
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="99" height="20">
|
|
3
|
+
<linearGradient id="b" x2="0" y2="100%">
|
|
4
|
+
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
|
|
5
|
+
<stop offset="1" stop-opacity=".1"/>
|
|
6
|
+
</linearGradient>
|
|
7
|
+
<mask id="a">
|
|
8
|
+
<rect width="99" height="20" rx="3" fill="#fff"/>
|
|
9
|
+
</mask>
|
|
10
|
+
<g mask="url(#a)">
|
|
11
|
+
<path fill="#555" d="M0 0h63v20H0z"/>
|
|
12
|
+
<path fill="#4c1" d="M63 0h36v20H63z"/>
|
|
13
|
+
<path fill="url(#b)" d="M0 0h99v20H0z"/>
|
|
14
|
+
</g>
|
|
15
|
+
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
|
16
|
+
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
|
|
17
|
+
<text x="31.5" y="14">coverage</text>
|
|
18
|
+
<text x="80" y="15" fill="#010101" fill-opacity=".3">93%</text>
|
|
19
|
+
<text x="80" y="14">93%</text>
|
|
20
|
+
</g>
|
|
21
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>URL</key>
|
|
6
|
+
<string>https://kig.re/2020/09/07/writing-cli-tools-ruby-migrating-github-issues-to-pivotal-tracker.html</string>
|
|
7
|
+
</dict>
|
|
8
|
+
</plist>
|