murakumo 0.1.7 → 0.1.8
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cli/mrkmctl.rb +8 -4
- data/lib/cli/mrkmctl_options.rb +1 -1
- data/lib/misc/murakumo_const.rb +1 -1
- metadata +3 -3
data/lib/cli/mrkmctl.rb
CHANGED
@@ -42,12 +42,16 @@ begin
|
|
42
42
|
records = records.select {|r| r.values_at(0, 1, 3, 4).any?{|i| i.to_s =~ /\A#{arg.to_s}/i } }
|
43
43
|
end
|
44
44
|
|
45
|
-
|
45
|
+
if records.empty?
|
46
|
+
puts 'No macth'
|
47
|
+
else
|
48
|
+
puts <<-EOF
|
46
49
|
IP address TTL Priority Activity Hostname
|
47
50
|
--------------- ------ --------- -------- ----------
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
+
EOF
|
52
|
+
records.each do |r|
|
53
|
+
puts '%-15s %6d %-9s %-8s %s' % r.values_at(0, 2, 3, 4, 1)
|
54
|
+
end
|
51
55
|
end
|
52
56
|
|
53
57
|
# レコードの追加・更新
|
data/lib/cli/mrkmctl_options.rb
CHANGED
@@ -7,7 +7,7 @@ Version = Murakumo::VERSION
|
|
7
7
|
def mrkmctl_parse_args
|
8
8
|
optopus do
|
9
9
|
desc 'displays a list of a record'
|
10
|
-
option :list, '-L', '--list [
|
10
|
+
option :list, '-L', '--list [SEARCH_PHRASE]'
|
11
11
|
|
12
12
|
desc 'adds or updates a record: <hostname>[,<TTL>[,{master|secondary|backup}]]'
|
13
13
|
option :add, '-A', '--add RECORD', :type => Array, :multiple => true do |value|
|
data/lib/misc/murakumo_const.rb
CHANGED
metadata
CHANGED