zonify 0.4.1 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README +4 -4
- data/lib/zonify.rb +9 -2
- metadata +4 -4
data/README
CHANGED
@@ -81,14 +81,14 @@ DESCRIPTION
|
|
81
81
|
disable them for pre-processing the YAML and then adding them with nor-
|
82
82
|
malize. For example:
|
83
83
|
|
84
|
-
The --[no-]srv-singleton options also control creation of weighted
|
85
|
-
round-robin CNAMEs, an infelicity in nomenclature.
|
86
|
-
|
87
84
|
zonify r53 amz.example.com > r53.yaml
|
88
85
|
zonify ec2 --no-srv-singleton > ec2.yaml
|
89
86
|
my-yaml-rewriter < ec2.yaml > adjusted.yaml
|
90
87
|
zonify normalize amz.example.com < adjusted.yaml > normed.yaml
|
91
|
-
zonify diff r53.yaml normed.yaml | zonify apply
|
88
|
+
zonify diff --types CNAME,SRV r53.yaml normed.yaml | zonify apply
|
89
|
+
|
90
|
+
The --[no-]srv-singleton options also control creation of weighted
|
91
|
+
round-robin CNAMEs, an infelicity in nomenclature.
|
92
92
|
|
93
93
|
SYNC POLICY
|
94
94
|
Zonify assumes the domain given on the command line is entirely under
|
data/lib/zonify.rb
CHANGED
@@ -433,11 +433,18 @@ end
|
|
433
433
|
LDH_RE = /^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])$/
|
434
434
|
def string_to_ldh_component(s)
|
435
435
|
LDH_RE.match(s) ? s.downcase : s.downcase.gsub(/[^a-z0-9-]/, '-').
|
436
|
-
sub(/(^[-]+|[-]+$)/, '')[0
|
436
|
+
sub(/(^[-]+|[-]+$)/, '')[0...64]
|
437
437
|
end
|
438
438
|
|
439
439
|
def string_to_ldh(s)
|
440
|
-
s.split('.')
|
440
|
+
head, *tail = s.split('.')
|
441
|
+
tail_ = tail.map{|s| string_to_ldh_component(s) }
|
442
|
+
head_ = case head
|
443
|
+
when '*' then '*'
|
444
|
+
when nil then ''
|
445
|
+
else string_to_ldh_component(head)
|
446
|
+
end
|
447
|
+
[head_, tail_].flatten.select{|c| not (c.empty? or c.nil?) }.join('.')
|
441
448
|
end
|
442
449
|
|
443
450
|
def _dot(s)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zonify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 0.4.
|
9
|
+
- 2
|
10
|
+
version: 0.4.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Airbnb
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-10-
|
18
|
+
date: 2012-10-31 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: fog
|