veronic 0.0.26 → 0.0.27
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/LICENSE +19 -0
- data/lib/providers/route53/record.rb +56 -56
- data/veronic.gemspec +2 -1
- metadata +19 -5
- checksums.yaml +0 -15
data/LICENSE
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
@@ -1,57 +1,57 @@
|
|
1
1
|
module Route53
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
end
|
2
|
+
class Zone
|
3
|
+
class Record
|
4
|
+
|
5
|
+
def initialize(zone, name, values=[], type, ttl)
|
6
|
+
@zone = zone
|
7
|
+
@name = name.downcase
|
8
|
+
@values = values
|
9
|
+
@type = type
|
10
|
+
@ttl = ttl
|
11
|
+
@logger = Veronic::Deployer.new().logger
|
12
|
+
end
|
13
|
+
|
14
|
+
def get
|
15
|
+
@zone.records.select {|x| x.name == @name+'.'}.first
|
16
|
+
end
|
17
|
+
|
18
|
+
def exist?
|
19
|
+
@zone.records.any? {|x| x.name == @name+'.'}
|
20
|
+
end
|
21
|
+
|
22
|
+
def match?
|
23
|
+
@zone.records.any? {|x| x.name == @name+'.' && x.values == @values}
|
24
|
+
end
|
25
|
+
|
26
|
+
def wait_set
|
27
|
+
@logger.info "Waitting for record { name: #{@name}, value: #{@values} }..."
|
28
|
+
while !self.match?
|
29
|
+
@logger.info "."
|
30
|
+
self.set
|
31
|
+
sleep 5
|
32
|
+
end
|
33
|
+
@logger.info "\nRecord { name: #{@name}, value: #{@values} } updated"
|
34
|
+
end
|
35
|
+
|
36
|
+
def set
|
37
|
+
if self.exist?
|
38
|
+
record = self.get
|
39
|
+
new_record = Route53::DNSRecord.new(record.name, record.type, record.ttl, record.values, @zone)
|
40
|
+
record.update(@name, @type, @ttl, @values, @zone)
|
41
|
+
else
|
42
|
+
record = Route53::DNSRecord.new(@name, @type, @ttl, @values, @zone)
|
43
|
+
record.create
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def delete
|
48
|
+
if self.exist?
|
49
|
+
record = self.get
|
50
|
+
delete_record = Route53::DNSRecord.new(record.name, record.type, record.ttl, record.values, @zone)
|
51
|
+
delete_record.delete
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
data/veronic.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'veronic'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.27'
|
4
4
|
s.date = '2013-04-05'
|
5
5
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
6
6
|
s.summary = "Veronic, a simple cloud deployer"
|
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.files = `git ls-files`.split("\n")
|
11
11
|
s.require_paths = ["lib"]
|
12
12
|
s.homepage = 'http://github.com/GabKlein/veronic'
|
13
|
+
s.license = 'MIT'
|
13
14
|
s.add_dependency('chef')
|
14
15
|
s.add_dependency('knife-ec2')
|
15
16
|
s.add_dependency('aws-sdk')
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: veronic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.27
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Gabriel Klein
|
@@ -13,6 +14,7 @@ dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: chef
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ! '>='
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ! '>='
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: knife-ec2
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: aws-sdk
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -55,6 +62,7 @@ dependencies:
|
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: route53
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
67
|
- - ! '>='
|
60
68
|
- !ruby/object:Gem::Version
|
@@ -62,6 +70,7 @@ dependencies:
|
|
62
70
|
type: :runtime
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
75
|
- - ! '>='
|
67
76
|
- !ruby/object:Gem::Version
|
@@ -69,6 +78,7 @@ dependencies:
|
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: excon
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
83
|
- - ~>
|
74
84
|
- !ruby/object:Gem::Version
|
@@ -76,6 +86,7 @@ dependencies:
|
|
76
86
|
type: :runtime
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
91
|
- - ~>
|
81
92
|
- !ruby/object:Gem::Version
|
@@ -90,6 +101,7 @@ files:
|
|
90
101
|
- .gitignore
|
91
102
|
- Gemfile
|
92
103
|
- Gemfile.lock
|
104
|
+
- LICENSE
|
93
105
|
- README.md
|
94
106
|
- bin/veronic
|
95
107
|
- lib/config/config.rb
|
@@ -110,26 +122,28 @@ files:
|
|
110
122
|
- veronic.gemspec
|
111
123
|
- veronic.yml
|
112
124
|
homepage: http://github.com/GabKlein/veronic
|
113
|
-
licenses:
|
114
|
-
|
125
|
+
licenses:
|
126
|
+
- MIT
|
115
127
|
post_install_message:
|
116
128
|
rdoc_options: []
|
117
129
|
require_paths:
|
118
130
|
- lib
|
119
131
|
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
none: false
|
120
133
|
requirements:
|
121
134
|
- - ! '>='
|
122
135
|
- !ruby/object:Gem::Version
|
123
136
|
version: '0'
|
124
137
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
none: false
|
125
139
|
requirements:
|
126
140
|
- - ! '>='
|
127
141
|
- !ruby/object:Gem::Version
|
128
142
|
version: '0'
|
129
143
|
requirements: []
|
130
144
|
rubyforge_project:
|
131
|
-
rubygems_version:
|
145
|
+
rubygems_version: 1.8.23
|
132
146
|
signing_key:
|
133
|
-
specification_version:
|
147
|
+
specification_version: 3
|
134
148
|
summary: Veronic, a simple cloud deployer
|
135
149
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
MWFmZDQxMDAyNTQxZDUzN2JmY2M1ZWMyZjJkM2FlOGU2ZWM2NTU4ZQ==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
Y2Y1MzYyMGU5MjI3M2ViY2JlNGUwYzY3MDE0MmQwZjkxM2RlMDA1Mg==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MDA0ZTc4ODVmZDZkZTM0NWFkYzEzNTdiMDcyZTdmNWE0ZTU4NzZjMWE5MDY2
|
10
|
-
MTk5NTM1MzM3N2U0NGJkODg5NTg0NGE1YmQ5YjBlOTMzZDJmNTMxOWQ2OTdj
|
11
|
-
MmYzZGQ4N2UzMWRhYzg3NGU0MjIyYWM1MTZhZGU2YjYwMTA4MjU=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
M2UwZjI2OTJmZDlkNTM5N2E1ZTFkYWE5N2FjM2MxNTljNzExZmNhNDUwM2Mx
|
14
|
-
Njk0NmM2NmJhMjBiZTM4M2U0MjZjZjEzM2U0MzM4NDc0N2Y4ZDU5ODdmZjg0
|
15
|
-
MzQ1OGU4NTEwZjkyYThjNGNmZGJjYjRiNWVmNDdjNTM3ZGQ5NTU=
|