dnsmadeeasy 0.4.0 → 1.0.1
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 +858 -0
- data/Rakefile +4 -4
- data/dnsmadeeasy.gemspec +42 -26
- 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/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 +326 -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 +81 -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 +115 -0
- data/lib/dnsmadeeasy.rb +61 -27
- metadata +184 -25
- 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,56 @@ require 'dnsmadeeasy/version'
|
|
|
8
8
|
|
|
9
9
|
# rubocop:todo Naming/HeredocDelimiterCase
|
|
10
10
|
DnsMadeEasy::DESCRIPTION = <<~eof
|
|
11
|
-
|
|
11
|
+
This is an authoratative and fully-featured API client for the
|
|
12
|
+
DNS Provider "DnsMadeEasy.com".
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
This library offers both a rich Ruby API that you can use to
|
|
15
|
+
automate DNS record management, as well
|
|
16
|
+
as a rich CLI interface with the command line executable "dme"
|
|
17
|
+
installed when you install the gem.
|
|
18
|
+
The gem additionally supports storing credentials in
|
|
19
|
+
the ~/.dnsmadeeasy/credentials.yml
|
|
20
|
+
file, supports multiple accounts, encryption, and more.
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
If you are using Chef consider using the "dnsmadeeasy"
|
|
23
|
+
Chef Cookbook, while uses this gem behind
|
|
24
|
+
the scenes: https://supermarket.chef.io/cookbooks/dnsmadeeasy
|
|
20
25
|
|
|
21
|
-
|
|
26
|
+
ACKNOWLEDGEMENTS:
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
|
|
28
|
+
1. This gem is based on the original work contributed by Wanelo.com to the
|
|
29
|
+
now abandonded "dnsmadeeasy-rest-api" client.
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
|
|
31
|
+
2. We also wish to thank the gem author Phil Cohen who
|
|
32
|
+
kindly yielded the "dnsmadeeasy" RubyGems namespace to this gem.
|
|
28
33
|
|
|
29
|
-
|
|
34
|
+
3. We also thank Praneeth Are for contributing the support for
|
|
35
|
+
secondary domains in 0.3.5.
|
|
30
36
|
eof
|
|
31
37
|
|
|
32
38
|
Gem::Specification.new do |spec|
|
|
33
39
|
spec.name = 'dnsmadeeasy'
|
|
34
40
|
spec.version = DnsMadeEasy::VERSION
|
|
35
|
-
spec.authors = ['Konstantin Gredeskoul', 'Arnoud Vermeer', 'Paul Henry', 'James Hart', 'Phil Cohen',
|
|
36
|
-
|
|
41
|
+
spec.authors = ['Konstantin Gredeskoul', 'Arnoud Vermeer', 'Paul Henry', 'James Hart', 'Phil Cohen',
|
|
42
|
+
'Praneeth Are']
|
|
43
|
+
spec.email = %w[kigster@gmail.com letuboy@gmail.com hjhart@gmail.com]
|
|
37
44
|
spec.summary = DnsMadeEasy::DESCRIPTION
|
|
38
45
|
spec.description = DnsMadeEasy::DESCRIPTION
|
|
39
46
|
spec.post_install_message = <<~EOF
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
Thank you for using the DnsMadeEasy ruby gem, the Ruby client
|
|
48
|
+
API for DnsMadeEasy.com's SDK v2. Please note that this gem
|
|
49
|
+
comes with a rich command line utility 'dme' which you can use
|
|
50
|
+
instead of the ruby API if you prefer. Run `dme` with no
|
|
51
|
+
arguments to see the help message.
|
|
52
|
+
|
|
53
|
+
You can also store (multi-account) credentials in a YAML file in
|
|
54
|
+
your home directory. For more information, please see README at:
|
|
55
|
+
https://github.com/kigster/dnsmadeeasy
|
|
49
56
|
EOF
|
|
50
57
|
|
|
51
58
|
spec.homepage = 'https://github.com/kigster/dnsmadeeasy'
|
|
52
59
|
spec.license = 'MIT'
|
|
60
|
+
spec.required_ruby_version = '~> 4.0'
|
|
53
61
|
|
|
54
62
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
55
63
|
f.match(%r{^(test|spec|features)/})
|
|
@@ -61,10 +69,17 @@ Gem::Specification.new do |spec|
|
|
|
61
69
|
|
|
62
70
|
spec.add_dependency 'awesome_print'
|
|
63
71
|
spec.add_dependency 'colored2'
|
|
72
|
+
spec.add_dependency 'dns-zonefile'
|
|
73
|
+
spec.add_dependency 'dry-cli'
|
|
74
|
+
spec.add_dependency 'dry-monads'
|
|
75
|
+
spec.add_dependency 'dry-struct'
|
|
76
|
+
spec.add_dependency 'dry-types'
|
|
64
77
|
spec.add_dependency 'hashie'
|
|
65
78
|
spec.add_dependency 'sym'
|
|
79
|
+
spec.add_dependency 'tsort'
|
|
80
|
+
spec.add_dependency 'tty-box'
|
|
81
|
+
spec.add_dependency 'tty-spinner'
|
|
66
82
|
|
|
67
|
-
spec.add_development_dependency 'bundler'
|
|
68
83
|
spec.add_development_dependency 'rake'
|
|
69
84
|
spec.add_development_dependency 'relaxed-rubocop'
|
|
70
85
|
spec.add_development_dependency 'rspec'
|
|
@@ -74,5 +89,6 @@ Gem::Specification.new do |spec|
|
|
|
74
89
|
spec.add_development_dependency 'webmock'
|
|
75
90
|
spec.add_development_dependency 'yard'
|
|
76
91
|
|
|
77
|
-
|
|
92
|
+
spec.add_development_dependency 'aruba'
|
|
93
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
78
94
|
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>
|