czds 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/czds/cli/main.rb +17 -0
- data/lib/czds/client.rb +1 -1
- data/lib/czds/version.rb +1 -1
- data/lib/czds/zone_file/status.rb +9 -0
- data/lib/czds/zone_file.rb +0 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bad75046d0a8d1900d29e4a949a7527749419b657ccec1f112db7f0b915c0086
|
4
|
+
data.tar.gz: 85cf821a7467c8c6645600d41d3691f793faad3c592a5c47d40b398527802c3d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a589c30e9ad8e7597433a3579839db51ac2cac0949d4baeeb1a51ae0258bbd5a67d3f239a7bb982e46aff3f6aeff34c2bdc93352de35874fdb105e8faeb01dc
|
7
|
+
data.tar.gz: e259a4e46235c252eb71527cd793b1d57df6e8458a17082de5256aa5da31cd892ca7d68d229fc543ca07586860ec9f81132a6f50bfc5abf6ef2ed66c9a73eff0
|
data/lib/czds/cli/main.rb
CHANGED
@@ -24,6 +24,23 @@ module CZDS
|
|
24
24
|
zone_file.download
|
25
25
|
end
|
26
26
|
|
27
|
+
desc "status", "Show zone file status"
|
28
|
+
option :config_file, type: :string, default: './czds.config.json', desc: 'Path to config file'
|
29
|
+
option :tld, type: :string, desc: 'Top-level domain, default: com'
|
30
|
+
option :no_timestamp, type: :boolean, desc: 'Disable timestamp in file name'
|
31
|
+
option :username, type: :string, desc: 'CZDS username'
|
32
|
+
option :password, type: :string, desc: 'CZDS password'
|
33
|
+
|
34
|
+
def status
|
35
|
+
config_file = load_config(options[:config_file])
|
36
|
+
configure_client(options, config_file)
|
37
|
+
|
38
|
+
tld = options[:tld] || config_file['tld'] || CZDS::Configuration::DEFAULTS[:tld]
|
39
|
+
|
40
|
+
zone_file = CZDS::ZoneFile.new(tld)
|
41
|
+
puts zone_file.status.to_h
|
42
|
+
end
|
43
|
+
|
27
44
|
private
|
28
45
|
|
29
46
|
def configure_client(options, config_file)
|
data/lib/czds/client.rb
CHANGED
data/lib/czds/version.rb
CHANGED
data/lib/czds/zone_file.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: czds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcin Doliwa
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
|
-
rubygems_version: 3.5.
|
77
|
+
rubygems_version: 3.5.10
|
78
78
|
signing_key:
|
79
79
|
specification_version: 4
|
80
80
|
summary: Ruby client for the ICANN Centralized Zone Data Service (CZDS) API.
|