splicer-dynect 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,6 +76,13 @@ module Splicer
76
76
  def create_record_in_zone(record, zone)
77
77
  Splicer.logger.debug "[SPLICER][DYNECT] #create_record_in_zone record=#{record.inspect} zone=#{zone.inspect}"
78
78
  client.login
79
+
80
+ begin
81
+ get_zone(zone)
82
+ rescue
83
+ client.post "Zone/#{zone.name}", rname: "admin@#{zone.name}", ttl: zone.ttl
84
+ end
85
+
79
86
  create_record(record, zone)
80
87
  publish_zone(zone)
81
88
  ensure
@@ -1,5 +1,5 @@
1
1
  module Splicer
2
2
  module Dynect
3
- VERSION = "2.0.0"
3
+ VERSION = "2.0.1"
4
4
  end
5
5
  end
@@ -55,7 +55,7 @@ describe 'Creating a CNAME record', :acceptance => true do
55
55
  it 'should be successful' do
56
56
  expect {
57
57
  provider.create_record_in_zone(record, zone)
58
- }.to raise_error(Splicer::Errors::RequestError)
58
+ }.to_not raise_error(Splicer::Errors::RequestError)
59
59
  end
60
60
  end
61
61
 
@@ -55,7 +55,7 @@ describe 'Creating a TXT record', :acceptance => true do
55
55
  it 'should be successful' do
56
56
  expect {
57
57
  provider.create_record_in_zone(record, zone)
58
- }.to raise_error(Splicer::Errors::RequestError)
58
+ }.to_not raise_error(Splicer::Errors::RequestError)
59
59
  end
60
60
  end
61
61
 
@@ -55,7 +55,7 @@ describe 'Creating an A record', acceptance: true do
55
55
  it 'should be successful' do
56
56
  expect {
57
57
  provider.create_record_in_zone(record, zone)
58
- }.to raise_error(Splicer::Errors::RequestError)
58
+ }.to_not raise_error(Splicer::Errors::RequestError)
59
59
  end
60
60
  end
61
61
  end
@@ -55,7 +55,7 @@ describe 'Creating an AAAA record', :acceptance => true do
55
55
  it 'should be successful' do
56
56
  expect {
57
57
  provider.create_record_in_zone(record, zone)
58
- }.to raise_error(Splicer::Errors::RequestError)
58
+ }.to_not raise_error(Splicer::Errors::RequestError)
59
59
  end
60
60
  end
61
61
 
@@ -55,7 +55,7 @@ describe 'Creating an MX record', :acceptance => true do
55
55
  it 'should be successful' do
56
56
  expect {
57
57
  provider.create_record_in_zone(record, zone)
58
- }.to raise_error(Splicer::Errors::RequestError)
58
+ }.to_not raise_error(Splicer::Errors::RequestError)
59
59
  end
60
60
  end
61
61
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splicer-dynect
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-23 00:00:00.000000000 Z
12
+ date: 2013-05-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: splicer
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  segments:
148
148
  - 0
149
- hash: -2628931118663995847
149
+ hash: -164245100878733183
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  segments:
157
157
  - 0
158
- hash: -2628931118663995847
158
+ hash: -164245100878733183
159
159
  requirements: []
160
160
  rubyforge_project:
161
161
  rubygems_version: 1.8.25