record_store 4.0.0 → 4.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27444f2a6a94ae153ac609d1d9af8de4983fa83a
4
- data.tar.gz: 2912b8103f87b7973347317ad819f545cb0315d9
3
+ metadata.gz: ed57d8fe90ffdace29fa48e8e676b5f1369f9332
4
+ data.tar.gz: 221069b0a2086cb2ccbd3a4bf558af25c1ed73f7
5
5
  SHA512:
6
- metadata.gz: cea447ecaddf9ff5a365ab8618f9158e2e3cf72e7ca1666fcb93e18998fb4ff6678bc05c91156cba60b386cf7dc16c486f9f56a7ad358081f32ae334cf548336
7
- data.tar.gz: 751d3dc5034b23097d83bbe1fc0122b880628b1ba0fcdd99feb7c21c8a4cd91d68caf07f3a67e71f9e95205672ff5c9d8d4ff3b92bbf240d92d7d7ffbf5315a6
6
+ metadata.gz: 51bdfbfb83cda6eaefca85e4919ab3a7bd9314e87759ee1deed2d5e0b489abba1d9e0b0b2e822acdd37b31d291aea31de805f040c0ff50eb6ff4b5097a0365c6
7
+ data.tar.gz: 31c5668df9728aa3438f445e8d251a3863e2512c9bf723d7b60f854742bc4e1b6d1d02b5d058053f85367fc1993000e1c96968d29b541871731cf3f5252ac4ce
@@ -3,6 +3,7 @@ module RecordStore
3
3
  attr_accessor :alias
4
4
 
5
5
  validates :alias, presence: true, format: { with: Record::CNAME_REGEX, message: 'is not a fully qualified domain name' }
6
+ validate :validate_circular_reference
6
7
 
7
8
  def initialize(record)
8
9
  super
@@ -16,5 +17,9 @@ module RecordStore
16
17
  def to_s
17
18
  "[ALIASRecord] #{fqdn} #{ttl} IN ALIAS #{self.alias}"
18
19
  end
20
+
21
+ def validate_circular_reference
22
+ errors.add(:fqdn, 'An ALIAS should not point to itself') unless fqdn != @alias
23
+ end
19
24
  end
20
25
  end
@@ -3,6 +3,7 @@ module RecordStore
3
3
  attr_accessor :cname
4
4
 
5
5
  validates :cname, presence: true, format: { with: Record::CNAME_REGEX, message: 'is not a fully qualified domain name' }
6
+ validate :validate_circular_reference
6
7
 
7
8
  def initialize(record)
8
9
  super
@@ -16,5 +17,9 @@ module RecordStore
16
17
  def to_s
17
18
  "[CNAMERecord] #{fqdn} #{ttl} IN CNAME #{cname}"
18
19
  end
20
+
21
+ def validate_circular_reference
22
+ errors.add(:fqdn, 'A CNAME should not point to itself') unless fqdn != cname
23
+ end
19
24
  end
20
25
  end
@@ -1,3 +1,3 @@
1
1
  module RecordStore
2
- VERSION = '4.0.0'
2
+ VERSION = '4.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: record_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0
4
+ version: 4.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Willem van Bergen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-11-01 00:00:00.000000000 Z
12
+ date: 2017-05-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
@@ -267,7 +267,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
267
  version: '0'
268
268
  requirements: []
269
269
  rubyforge_project:
270
- rubygems_version: 2.6.7
270
+ rubygems_version: 2.6.11
271
271
  signing_key:
272
272
  specification_version: 4
273
273
  summary: Manage DNS using git