splicer 1.2.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/splicer/errors.rb +0 -3
- data/lib/splicer/version.rb +1 -1
- data/lib/splicer/zone.rb +0 -9
- data/lib/splicer.rb +0 -17
- data/spec/splicer/zone_spec.rb +0 -6
- metadata +19 -8
- checksums.yaml +0 -15
- data/lib/splicer/provider.rb +0 -66
- data/spec/splicer/provider_spec.rb +0 -42
data/lib/splicer/errors.rb
CHANGED
data/lib/splicer/version.rb
CHANGED
data/lib/splicer/zone.rb
CHANGED
@@ -25,15 +25,6 @@ module Splicer
|
|
25
25
|
def add_records(records)
|
26
26
|
records.each { |r| add_record(r) }
|
27
27
|
end
|
28
|
-
|
29
|
-
# @param [Symbol] method the method by which you want to publish
|
30
|
-
# @return [void]
|
31
|
-
def publish(method)
|
32
|
-
Splicer.providers.each do |provider|
|
33
|
-
provider.publish(self, method)
|
34
|
-
end
|
35
|
-
true
|
36
|
-
end
|
37
28
|
end
|
38
29
|
|
39
30
|
end
|
data/lib/splicer.rb
CHANGED
@@ -2,7 +2,6 @@ require 'splicer/version'
|
|
2
2
|
require 'splicer/errors'
|
3
3
|
require 'splicer/null_object'
|
4
4
|
require 'splicer/configuration'
|
5
|
-
require 'splicer/provider'
|
6
5
|
require 'splicer/records'
|
7
6
|
require 'splicer/zone'
|
8
7
|
|
@@ -68,22 +67,6 @@ module Splicer
|
|
68
67
|
end
|
69
68
|
end
|
70
69
|
|
71
|
-
# @return [void]
|
72
|
-
def self.rewrite_zone(zone)
|
73
|
-
return false unless zone.is_a?(Splicer::Zone)
|
74
|
-
providers.each do |provider|
|
75
|
-
provider.rewrite_zone(zone)
|
76
|
-
end
|
77
|
-
end
|
78
|
-
|
79
|
-
# @return [void]
|
80
|
-
def self.update_zone(zone)
|
81
|
-
return false unless zone.is_a?(Splicer::Zone)
|
82
|
-
providers.each do |provider|
|
83
|
-
provider.update_zone(zone)
|
84
|
-
end
|
85
|
-
end
|
86
|
-
|
87
70
|
# @return [void]
|
88
71
|
def self.create_record_in_zone(record, zone)
|
89
72
|
return false unless zone.is_a?(Splicer::Zone)
|
data/spec/splicer/zone_spec.rb
CHANGED
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: splicer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Matthew Johnston
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-22 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
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: :development
|
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: rake
|
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: :development
|
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: rspec
|
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: :development
|
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
|
@@ -71,7 +78,6 @@ files:
|
|
71
78
|
- lib/splicer/configuration.rb
|
72
79
|
- lib/splicer/errors.rb
|
73
80
|
- lib/splicer/null_object.rb
|
74
|
-
- lib/splicer/provider.rb
|
75
81
|
- lib/splicer/records.rb
|
76
82
|
- lib/splicer/records/a_record.rb
|
77
83
|
- lib/splicer/records/aaaa_record.rb
|
@@ -88,7 +94,6 @@ files:
|
|
88
94
|
- spec/spec_helper.rb
|
89
95
|
- spec/splicer/configuration_spec.rb
|
90
96
|
- spec/splicer/null_object_spec.rb
|
91
|
-
- spec/splicer/provider_spec.rb
|
92
97
|
- spec/splicer/records/a_record_spec.rb
|
93
98
|
- spec/splicer/records/aaaa_record_spec.rb
|
94
99
|
- spec/splicer/records/cname_record_spec.rb
|
@@ -105,32 +110,38 @@ files:
|
|
105
110
|
homepage: https://github.com/zippykid/splicer
|
106
111
|
licenses:
|
107
112
|
- MIT
|
108
|
-
metadata: {}
|
109
113
|
post_install_message:
|
110
114
|
rdoc_options: []
|
111
115
|
require_paths:
|
112
116
|
- lib
|
113
117
|
required_ruby_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
114
119
|
requirements:
|
115
120
|
- - ! '>='
|
116
121
|
- !ruby/object:Gem::Version
|
117
122
|
version: '0'
|
123
|
+
segments:
|
124
|
+
- 0
|
125
|
+
hash: 3497503811239138355
|
118
126
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
127
|
+
none: false
|
119
128
|
requirements:
|
120
129
|
- - ! '>='
|
121
130
|
- !ruby/object:Gem::Version
|
122
131
|
version: '0'
|
132
|
+
segments:
|
133
|
+
- 0
|
134
|
+
hash: 3497503811239138355
|
123
135
|
requirements: []
|
124
136
|
rubyforge_project:
|
125
|
-
rubygems_version:
|
137
|
+
rubygems_version: 1.8.25
|
126
138
|
signing_key:
|
127
|
-
specification_version:
|
139
|
+
specification_version: 3
|
128
140
|
summary: Splicer allows communication with one or more dns providers
|
129
141
|
test_files:
|
130
142
|
- spec/spec_helper.rb
|
131
143
|
- spec/splicer/configuration_spec.rb
|
132
144
|
- spec/splicer/null_object_spec.rb
|
133
|
-
- spec/splicer/provider_spec.rb
|
134
145
|
- spec/splicer/records/a_record_spec.rb
|
135
146
|
- spec/splicer/records/aaaa_record_spec.rb
|
136
147
|
- spec/splicer/records/cname_record_spec.rb
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
NWExN2U4NmUyMjAxMTNkZTJkOTBiMGE2NzcxOWZlNTFkNGIzZDhlMw==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
OTM0OGRiOTBiNDYyZWZhM2ZmNDEwMjkzYzg2NGY1ZGFkNGNjZWNkNA==
|
7
|
-
!binary "U0hBNTEy":
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YjU1Y2Y5MThkMTg2NTNhZjgzNDdmZDQ5YmM2OWRkNzllYTY0OTg0YWMyYWI3
|
10
|
-
OTYyNDM1MDhlYzY4ODk1ZWFkNDQ2MTJjOGRkMDI1NDM1NjI1ZGU1YzE5MWMx
|
11
|
-
ZDVjNWQwYzA2OTY0ZDU0MTk5OTZjZjgwOWI1YjI0ZjMxNzVhNzc=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZmFjYjE1ZDhjY2JiZDhhZGU4NTgzYzk3YmUxYzIxNDVhNjQyNjc2NzRkMTVl
|
14
|
-
NGY3OWRkYzU2MzJiYTA0OTcyYzY4YTkwMzYzMTBmNGIyZTkxZTVlZjM0Yjdj
|
15
|
-
OWM5ZTk2YzY1NGQwZDRlZWQ3M2FmMzYzZmIxZTMwMjU5ZDhiYTg=
|
data/lib/splicer/provider.rb
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
module Splicer
|
2
|
-
|
3
|
-
# The base Provider class. All providers **MUST** inherit from this class.
|
4
|
-
# @author Matthew A. Johnston <warmwaffles@gmail.com>
|
5
|
-
class Provider
|
6
|
-
|
7
|
-
# Creates the zone in the DNS provider. If the zone exists, then nothing
|
8
|
-
# will happen.
|
9
|
-
#
|
10
|
-
# @param [Splicer::Zone] zone
|
11
|
-
def create_zone(zone)
|
12
|
-
false
|
13
|
-
end
|
14
|
-
|
15
|
-
# Updates a zone in the DNS provider. This will take any current changes
|
16
|
-
# that are made to the {Splicer::Zone} object and push them to the DNS. If
|
17
|
-
# the zone does not exist, then nothing will be done.
|
18
|
-
#
|
19
|
-
# @param [Splicer::Zone] zone
|
20
|
-
def update_zone(zone)
|
21
|
-
false
|
22
|
-
end
|
23
|
-
|
24
|
-
# Rewrites a zone in the DNS provider. If the zone does not exist, then it
|
25
|
-
# will be created. It will destroy all of the records in the DNS and rewrite
|
26
|
-
# all of them.
|
27
|
-
#
|
28
|
-
# @param [Splicer::Zone] zone
|
29
|
-
def rewrite_zone(zone)
|
30
|
-
false
|
31
|
-
end
|
32
|
-
|
33
|
-
# Will simply delete the zone from the DNS provider.
|
34
|
-
#
|
35
|
-
# @param [Splicer::Zone] zone
|
36
|
-
def delete_zone(zone)
|
37
|
-
false
|
38
|
-
end
|
39
|
-
|
40
|
-
# Deletes a single record from a zone in the DNS provider.
|
41
|
-
#
|
42
|
-
# @param [Splicer::Records::Record] record
|
43
|
-
# @param [Splicer::Zone] zone
|
44
|
-
def delete_record_in_zone(record, zone)
|
45
|
-
false
|
46
|
-
end
|
47
|
-
|
48
|
-
# Updates a single record in a zone.
|
49
|
-
#
|
50
|
-
# @param [Splicer::Records::Record] record
|
51
|
-
# @param [Splicer::Zone] zone
|
52
|
-
def update_record_in_zone(record, zone)
|
53
|
-
false
|
54
|
-
end
|
55
|
-
|
56
|
-
# Creates a single record for a zone in the DNS provider. If the record
|
57
|
-
# exists, then it will not do anything.
|
58
|
-
#
|
59
|
-
# @param [Splicer::Records::Record] record
|
60
|
-
# @param [Splicer::Zone] zone
|
61
|
-
def create_record_in_zone(record, zone)
|
62
|
-
false
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
end
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe Splicer::Provider do
|
4
|
-
let(:provider) { Splicer::Provider.new }
|
5
|
-
let(:zone) { Splicer::Zone.new('example.com') }
|
6
|
-
let(:record) { Splicer::Records::Record.new('name',123) }
|
7
|
-
|
8
|
-
describe '#create_zone' do
|
9
|
-
subject { provider.create_zone(zone) }
|
10
|
-
it { should eq(false) }
|
11
|
-
end
|
12
|
-
|
13
|
-
describe '#update_zone' do
|
14
|
-
subject { provider.update_zone(zone) }
|
15
|
-
it { should eq(false) }
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#rewrite_zone' do
|
19
|
-
subject { provider.rewrite_zone(zone) }
|
20
|
-
it { should eq(false) }
|
21
|
-
end
|
22
|
-
|
23
|
-
describe '#delete_zone' do
|
24
|
-
subject { provider.delete_zone(zone) }
|
25
|
-
it { should eq(false) }
|
26
|
-
end
|
27
|
-
|
28
|
-
describe '#delete_record_in_zone' do
|
29
|
-
subject { provider.delete_record_in_zone(record, zone) }
|
30
|
-
it { should eq(false) }
|
31
|
-
end
|
32
|
-
|
33
|
-
describe '#update_record_in_zone' do
|
34
|
-
subject { provider.update_record_in_zone(record, zone) }
|
35
|
-
it { should eq(false) }
|
36
|
-
end
|
37
|
-
|
38
|
-
describe '#create_record_in_zone' do
|
39
|
-
subject { provider.create_record_in_zone(record, zone) }
|
40
|
-
it { should eq(false) }
|
41
|
-
end
|
42
|
-
end
|