record_store 8.0.2 → 8.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/record_store/provider/cloudflare.rb +1 -1
- data/lib/record_store/record/a.rb +12 -2
- data/lib/record_store/record/aaaa.rb +12 -2
- data/lib/record_store/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 077fdafcb637ff49252d1e8aba5af4803cc4c458dee23465354ca77df48b9f7f
|
4
|
+
data.tar.gz: 4fe82c6141e811289c9cdd7d978e53d68693a3e22a564b846252a585ec25115b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c82a2c86d3ed27449b231695bd3edfba7b5d9b0c2e21f64c11cf52af89ad76e6c2364eb957022fc7743e90ecd3818c46c409f0332234ea16a41ea7e5c935ca6
|
7
|
+
data.tar.gz: 4d144671d258a63f11e8684efe80f2119a9bcc2a4a3786253eba28ba8adf1a648fc0439c2b22ef8d0b508cc52c4453c1300e7a74d4ffce23088e0fdfcb1c6248
|
data/CHANGELOG.md
CHANGED
@@ -132,7 +132,7 @@ module RecordStore
|
|
132
132
|
when Record::CAA
|
133
133
|
api_body[:data] = record.rdata
|
134
134
|
when Record::SRV
|
135
|
-
api_body[:data] = rdata
|
135
|
+
api_body[:data] = record.rdata
|
136
136
|
when Record::ALIAS
|
137
137
|
api_body[:type] = 'CNAME'
|
138
138
|
api_body[:content] = record.rdata_txt
|
@@ -1,13 +1,17 @@
|
|
1
1
|
module RecordStore
|
2
2
|
class Record::A < Record
|
3
|
-
|
3
|
+
attr_reader :address
|
4
4
|
|
5
5
|
validates_presence_of :address
|
6
6
|
validate :valid_address?
|
7
7
|
|
8
8
|
def initialize(record)
|
9
9
|
super
|
10
|
-
|
10
|
+
self.address = record.fetch(:address)
|
11
|
+
end
|
12
|
+
|
13
|
+
def address=(value)
|
14
|
+
@address = normalize_address(value)
|
11
15
|
end
|
12
16
|
|
13
17
|
def rdata
|
@@ -26,5 +30,11 @@ module RecordStore
|
|
26
30
|
rescue IPAddr::InvalidAddressError
|
27
31
|
errors.add(:address, 'is invalid')
|
28
32
|
end
|
33
|
+
|
34
|
+
def normalize_address(value)
|
35
|
+
IPAddr.new(value).to_s
|
36
|
+
rescue IPAddr::InvalidAddressError
|
37
|
+
value
|
38
|
+
end
|
29
39
|
end
|
30
40
|
end
|
@@ -1,13 +1,17 @@
|
|
1
1
|
module RecordStore
|
2
2
|
class Record::AAAA < Record
|
3
|
-
|
3
|
+
attr_reader :address
|
4
4
|
|
5
5
|
validates_presence_of :address
|
6
6
|
validate :valid_address?
|
7
7
|
|
8
8
|
def initialize(record)
|
9
9
|
super
|
10
|
-
|
10
|
+
self.address = record.fetch(:address)
|
11
|
+
end
|
12
|
+
|
13
|
+
def address=(value)
|
14
|
+
@address = normalize_address(value)
|
11
15
|
end
|
12
16
|
|
13
17
|
def rdata
|
@@ -26,5 +30,11 @@ module RecordStore
|
|
26
30
|
rescue IPAddr::InvalidAddressError
|
27
31
|
errors.add(:address, 'is invalid')
|
28
32
|
end
|
33
|
+
|
34
|
+
def normalize_address(value)
|
35
|
+
IPAddr.new(value).to_s
|
36
|
+
rescue IPAddr::InvalidAddressError
|
37
|
+
value
|
38
|
+
end
|
29
39
|
end
|
30
40
|
end
|
data/lib/record_store/version.rb
CHANGED
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: 8.0.
|
4
|
+
version: 8.0.4
|
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: 2024-11-
|
12
|
+
date: 2024-11-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -455,7 +455,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
455
455
|
- !ruby/object:Gem::Version
|
456
456
|
version: '0'
|
457
457
|
requirements: []
|
458
|
-
rubygems_version: 3.5.
|
458
|
+
rubygems_version: 3.5.23
|
459
459
|
signing_key:
|
460
460
|
specification_version: 4
|
461
461
|
summary: Manage DNS using git
|