murakumo 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/lib/cli/mrkmctl.rb CHANGED
@@ -28,8 +28,6 @@ begin
28
28
  'Origin'
29
29
  when Murakumo::MASTER
30
30
  'Master'
31
- when Murakumo::SECONDARY
32
- 'Secondary'
33
31
  else
34
32
  'Backup'
35
33
  end
@@ -9,7 +9,7 @@ def mrkmctl_parse_args
9
9
  desc 'displays a list of a record'
10
10
  option :list, '-L', '--list [SEARCH_PHRASE]'
11
11
 
12
- desc 'adds or updates a record: <hostname>[,<TTL>[,{master|secondary|backup}]]'
12
+ desc 'adds or updates a record: <hostname>[,<TTL>[,{master|backup}]]'
13
13
  option :add, '-A', '--add RECORD', :type => Array, :multiple => true do |value|
14
14
  (1 <= value.length and value.length <= 3) or invalid_argument
15
15
 
@@ -25,7 +25,7 @@ def mrkmctl_parse_args
25
25
  end
26
26
 
27
27
  # Priority
28
- priority.nil? or /\A(master|secondary|backup)\Z/i =~ priority or invalid_argument
28
+ priority.nil? or /\A(master|backup)\Z/i =~ priority or invalid_argument
29
29
  end
30
30
 
31
31
  desc 'deletes a record'
@@ -85,8 +85,6 @@ def mrkmctl_parse_args
85
85
  priority = case r[2].to_s
86
86
  when /master/i
87
87
  Murakumo::MASTER
88
- when /secondary/i
89
- Murakumo::SECONDARY
90
88
  else
91
89
  Murakumo::BACKUP
92
90
  end
@@ -47,7 +47,7 @@ def murakumo_parse_args
47
47
  end
48
48
  end # :host
49
49
 
50
- desc 'resource record of an alias: <hostname>[,<TTL>[,{master|secondary|backup}]]'
50
+ desc 'resource record of an alias: <hostname>[,<TTL>[,{master|backup}]]'
51
51
  option :aliases, '-A', '--alias RECORD', :type => Array, :multiple => true do |value|
52
52
  (1 <= value.length and value.length <= 3) or invalid_argument
53
53
 
@@ -63,7 +63,7 @@ def murakumo_parse_args
63
63
  end
64
64
 
65
65
  # Priority
66
- priority.nil? or /\A(master|secondary|backup)\Z/i =~ priority or invalid_argument
66
+ priority.nil? or /\A(master|backup)\Z/i =~ priority or invalid_argument
67
67
  end # :aliases
68
68
 
69
69
  desc 'ip address of a default resolver'
@@ -155,8 +155,6 @@ def murakumo_parse_args
155
155
  priority = case r[2].to_s
156
156
  when /master/i
157
157
  Murakumo::MASTER
158
- when /secondary/i
159
- Murakumo::SECONDARY
160
158
  else
161
159
  Murakumo::BACKUP
162
160
  end
@@ -1,9 +1,8 @@
1
1
  module Murakumo
2
- VERSION = '0.2.1'
2
+ VERSION = '0.2.2'
3
3
 
4
4
  # Priority
5
5
  MASTER = 1
6
- SECONDARY = 0
7
6
  BACKUP = -1
8
7
  ORIGIN = -65536
9
8
 
@@ -382,9 +382,6 @@ module Murakumo
382
382
  # 優先度の高いレコードを検索
383
383
  records = shuffle_records(@address_records.select {|i| i['priority'] == MASTER })
384
384
 
385
- # 次に優先度の高いレコードを検索
386
- records.concat(shuffle_records(@address_records.select {|i| i['priority'] == SECONDARY }))
387
-
388
385
  # レコードが見つからなかった場合はバックアップを選択
389
386
  if records.empty?
390
387
  records = shuffle_records(@address_records.select {|i| i['priority'] == BACKUP })
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: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - winebarrel