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 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
- puts <<-EOF
45
+ if records.empty?
46
+ puts 'No macth'
47
+ else
48
+ puts <<-EOF
46
49
  IP address TTL Priority Activity Hostname
47
50
  --------------- ------ --------- -------- ----------
48
- EOF
49
- records.each do |r|
50
- puts '%-15s %6d %-9s %-8s %s' % r.values_at(0, 2, 3, 4, 1)
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
  # レコードの追加・更新
@@ -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 [NAME]'
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|
@@ -1,5 +1,5 @@
1
1
  module Murakumo
2
- VERSION = '0.1.7'
2
+ VERSION = '0.1.8'
3
3
 
4
4
  # Priority
5
5
  MASTER = 1
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: murakumo
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 7
10
- version: 0.1.7
9
+ - 8
10
+ version: 0.1.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - winebarrel