DNSUpdater 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DNSUpdater.gemspec +5 -1
- data/Gemfile.lock +19 -10
- data/lib/dnsupdater/cli.rb +10 -5
- data/lib/dnsupdater/updaters/ssh.rb +1 -1
- data/lib/dnsupdater/version.rb +1 -1
- metadata +64 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff404119a6c42d8afa3c9580da9d5aa662b45b086ad1092d1c82f6ff212ea74e
|
4
|
+
data.tar.gz: 980c62a9c2ed35df952c518223ebb03b0c659e7ea223bc98a6a00ecc0644c4d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97cedfb61604d8bd84aaf4785b53e3a566e172251a38bada0abbe4b75b10556f1fcf29afeebaa3ea4b3cb62579b414263d3801840e6c1100c733de7792c766c3
|
7
|
+
data.tar.gz: 3705aab16c8d7e797bf327e079bf4ae5dad55bdfaaa752218dc247e275920ac8536186344739a7e72324466881ff130efe3afb42ecc302740bf8b2208ba18d68
|
data/DNSUpdater.gemspec
CHANGED
@@ -29,7 +29,10 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
31
|
spec.add_dependency 'addressable'
|
32
|
+
spec.add_dependency 'bcrypt_pbkdf' # for net-ssh ed25519 key support
|
33
|
+
spec.add_dependency 'ed25519'
|
32
34
|
spec.add_dependency 'idn-ruby'
|
35
|
+
spec.add_dependency 'net-ssh'
|
33
36
|
spec.add_dependency 'pdns_api'
|
34
37
|
spec.add_dependency 'public_suffix'
|
35
38
|
spec.add_dependency 'puma'
|
@@ -37,7 +40,8 @@ Gem::Specification.new do |spec|
|
|
37
40
|
|
38
41
|
spec.add_development_dependency 'bundler', '~> 2.0'
|
39
42
|
spec.add_development_dependency 'irb'
|
40
|
-
spec.add_development_dependency '
|
43
|
+
spec.add_development_dependency 'rack-test'
|
44
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
41
45
|
spec.add_development_dependency 'redcarpet'
|
42
46
|
spec.add_development_dependency 'rspec', '~> 3.0'
|
43
47
|
spec.add_development_dependency 'simplecov'
|
data/Gemfile.lock
CHANGED
@@ -1,9 +1,12 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
DNSUpdater (1.0.
|
4
|
+
DNSUpdater (1.0.1)
|
5
5
|
addressable
|
6
|
+
bcrypt_pbkdf
|
7
|
+
ed25519
|
6
8
|
idn-ruby
|
9
|
+
net-ssh
|
7
10
|
pdns_api
|
8
11
|
public_suffix
|
9
12
|
puma
|
@@ -12,26 +15,31 @@ PATH
|
|
12
15
|
GEM
|
13
16
|
remote: https://rubygems.org/
|
14
17
|
specs:
|
15
|
-
addressable (2.
|
18
|
+
addressable (2.8.0)
|
16
19
|
public_suffix (>= 2.0.2, < 5.0)
|
20
|
+
bcrypt_pbkdf (1.0.1)
|
17
21
|
crack (0.4.3)
|
18
22
|
safe_yaml (~> 1.0.0)
|
19
23
|
diff-lcs (1.3)
|
20
24
|
docile (1.3.2)
|
25
|
+
ed25519 (1.2.4)
|
21
26
|
hashdiff (1.0.0)
|
22
27
|
idn-ruby (0.1.0)
|
23
28
|
io-console (0.5.3)
|
24
29
|
irb (1.2.1)
|
25
30
|
reline (>= 0.0.1)
|
26
31
|
json (2.3.0)
|
27
|
-
|
32
|
+
net-ssh (5.2.0)
|
33
|
+
nio4r (2.5.8)
|
28
34
|
pdns_api (0.1.3)
|
29
|
-
public_suffix (4.0.
|
30
|
-
puma (
|
35
|
+
public_suffix (4.0.6)
|
36
|
+
puma (5.6.2)
|
31
37
|
nio4r (~> 2.0)
|
32
|
-
rack (2.
|
33
|
-
|
34
|
-
|
38
|
+
rack (2.2.3)
|
39
|
+
rack-test (1.1.0)
|
40
|
+
rack (>= 1.0, < 3)
|
41
|
+
rake (13.0.1)
|
42
|
+
redcarpet (3.5.1)
|
35
43
|
reline (0.1.2)
|
36
44
|
io-console (~> 0.5)
|
37
45
|
rspec (3.9.0)
|
@@ -66,7 +74,8 @@ DEPENDENCIES
|
|
66
74
|
DNSUpdater!
|
67
75
|
bundler (~> 2.0)
|
68
76
|
irb
|
69
|
-
|
77
|
+
rack-test
|
78
|
+
rake (~> 13.0)
|
70
79
|
redcarpet
|
71
80
|
rspec (~> 3.0)
|
72
81
|
simplecov
|
@@ -74,4 +83,4 @@ DEPENDENCIES
|
|
74
83
|
yard
|
75
84
|
|
76
85
|
BUNDLED WITH
|
77
|
-
2.1.
|
86
|
+
2.1.3
|
data/lib/dnsupdater/cli.rb
CHANGED
@@ -53,7 +53,7 @@ class DNSUpdater
|
|
53
53
|
def getOptions(args)
|
54
54
|
options = {
|
55
55
|
ConfigFile: 'config.yaml',
|
56
|
-
|
56
|
+
Targets: [],
|
57
57
|
Protocol: nil,
|
58
58
|
Serve: false
|
59
59
|
}
|
@@ -66,18 +66,23 @@ class DNSUpdater
|
|
66
66
|
warn e.message
|
67
67
|
raise SystemExit
|
68
68
|
end
|
69
|
-
options[:
|
69
|
+
options[:Targets] = args
|
70
70
|
options
|
71
71
|
end
|
72
72
|
|
73
73
|
def doSingleUpdate(options)
|
74
74
|
config = Config.new(options[:ConfigFile])
|
75
|
-
DNSUpdater.new(config)
|
76
|
-
|
75
|
+
updater = DNSUpdater.new(config)
|
76
|
+
options[:Targets].each do |target|
|
77
|
+
updater.update(target, options[:Protocol])
|
78
|
+
puts "Updated #{target}"
|
79
|
+
end
|
77
80
|
end
|
78
81
|
|
79
82
|
def serveWebUpdates(options)
|
80
|
-
|
83
|
+
target = nil
|
84
|
+
target = options[:Targets].first unless options[:Targets].empty?
|
85
|
+
params = prepareWebParams(target)
|
81
86
|
Web.startServer(options[:ConfigFile], options[:Protocol], params)
|
82
87
|
end
|
83
88
|
|
@@ -47,7 +47,7 @@ class DNSUpdater
|
|
47
47
|
ssh.loop { ssh.busy? || @SSHFowardProcessing }
|
48
48
|
end
|
49
49
|
@SSH = nil
|
50
|
-
rescue IOError, SocketError, SystemCallError, Net::SSH::Exception => e
|
50
|
+
rescue IOError, SocketError, SystemCallError, Net::SSH::Exception, ScriptError => e
|
51
51
|
@SSHError = e.message
|
52
52
|
end
|
53
53
|
@SSHThread.report_on_exception = true
|
data/lib/dnsupdater/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: DNSUpdater
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dāvis
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-03-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bcrypt_pbkdf
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: ed25519
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: idn-ruby
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,6 +66,20 @@ dependencies:
|
|
38
66
|
- - ">="
|
39
67
|
- !ruby/object:Gem::Version
|
40
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: net-ssh
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
41
83
|
- !ruby/object:Gem::Dependency
|
42
84
|
name: pdns_api
|
43
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -122,20 +164,34 @@ dependencies:
|
|
122
164
|
- - ">="
|
123
165
|
- !ruby/object:Gem::Version
|
124
166
|
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rack-test
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
125
181
|
- !ruby/object:Gem::Dependency
|
126
182
|
name: rake
|
127
183
|
requirement: !ruby/object:Gem::Requirement
|
128
184
|
requirements:
|
129
185
|
- - "~>"
|
130
186
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
187
|
+
version: '13.0'
|
132
188
|
type: :development
|
133
189
|
prerelease: false
|
134
190
|
version_requirements: !ruby/object:Gem::Requirement
|
135
191
|
requirements:
|
136
192
|
- - "~>"
|
137
193
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
194
|
+
version: '13.0'
|
139
195
|
- !ruby/object:Gem::Dependency
|
140
196
|
name: redcarpet
|
141
197
|
requirement: !ruby/object:Gem::Requirement
|
@@ -254,7 +310,7 @@ metadata:
|
|
254
310
|
homepage_uri: https://github.com/davispuh/DNSUpdater
|
255
311
|
source_code_uri: https://github.com/davispuh/DNSUpdater
|
256
312
|
changelog_uri: https://github.com/davispuh/DNSUpdater/blob/master/CHANGELOG.md
|
257
|
-
post_install_message:
|
313
|
+
post_install_message:
|
258
314
|
rdoc_options: []
|
259
315
|
require_paths:
|
260
316
|
- lib
|
@@ -269,8 +325,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
269
325
|
- !ruby/object:Gem::Version
|
270
326
|
version: '0'
|
271
327
|
requirements: []
|
272
|
-
rubygems_version: 3.
|
273
|
-
signing_key:
|
328
|
+
rubygems_version: 3.3.8
|
329
|
+
signing_key:
|
274
330
|
specification_version: 4
|
275
331
|
summary: An application to dynamically and remotely update DNS.
|
276
332
|
test_files: []
|