record_store 5.2.2 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +3 -0
- data/lib/record_store/provider/dnsimple.rb +4 -5
- data/lib/record_store/provider/dynect.rb +2 -1
- data/lib/record_store/provider/google_cloud_dns.rb +4 -5
- data/lib/record_store/record.rb +1 -1
- data/lib/record_store/version.rb +1 -1
- data/record_store.gemspec +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 44a86871965b0fa3db8951d4d9f9bdd0fbb2c1c64744508107b96eeb21499101
|
4
|
+
data.tar.gz: b6e329067a74eb41d277409f5531ff21b49cdcb824c9d5e326257e1adcf17585
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57a79a8f04b021985cb19b44393f840e1d3febb4d774136e1ca0ad062cb3a2a6e4255cd13b6929a345a337c85cb36f9461a7c3cae9ec78d905d3c449ae5c15e5
|
7
|
+
data.tar.gz: 5bd60003b6d11fda8a52a7641a23b7fd3c64a6ae365b3a6d7a650e0dc1f7fd573f8cf0b4e9c4926b2b1763242d3da02a1dbaf184e26d506328fe84509a447d3b
|
data/CHANGELOG.md
CHANGED
@@ -64,11 +64,14 @@ module RecordStore
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def build_from_api(api_record, zone)
|
67
|
+
fqdn = api_record.name.present? ? "#{api_record.name}.#{zone}" : zone
|
68
|
+
fqdn = "#{fqdn}." unless fqdn.ends_with?('.')
|
69
|
+
|
67
70
|
record_type = api_record.type
|
68
71
|
record = {
|
69
72
|
record_id: api_record.id,
|
70
73
|
ttl: api_record.ttl,
|
71
|
-
fqdn:
|
74
|
+
fqdn: fqdn.downcase,
|
72
75
|
}
|
73
76
|
|
74
77
|
return if record_type == 'SOA'
|
@@ -97,10 +100,6 @@ module RecordStore
|
|
97
100
|
)
|
98
101
|
end
|
99
102
|
|
100
|
-
unless record.fetch(:fqdn).ends_with?('.')
|
101
|
-
record[:fqdn] += '.'
|
102
|
-
end
|
103
|
-
|
104
103
|
Record.const_get(record_type).new(record)
|
105
104
|
end
|
106
105
|
|
@@ -105,7 +105,8 @@ module RecordStore
|
|
105
105
|
record[:txtdata] = Record::TXT.unescape(record[:txtdata]) if %w[SPF TXT].include?(type)
|
106
106
|
|
107
107
|
fqdn = record.fetch(:fqdn)
|
108
|
-
|
108
|
+
fqdn = "#{fqdn}." unless fqdn.ends_with?('.')
|
109
|
+
record[:fqdn] = fqdn.downcase
|
109
110
|
|
110
111
|
Record.const_get(type).new(record)
|
111
112
|
end
|
@@ -79,10 +79,13 @@ module RecordStore
|
|
79
79
|
end
|
80
80
|
|
81
81
|
def build_from_api(record)
|
82
|
+
fqdn = record.name.downcase
|
83
|
+
fqdn = "#{fqdn}." unless fqdn.ends_with?('.')
|
84
|
+
|
82
85
|
record_params = {
|
83
86
|
id: record.object_id,
|
84
87
|
ttl: record.ttl,
|
85
|
-
fqdn:
|
88
|
+
fqdn: fqdn,
|
86
89
|
}
|
87
90
|
|
88
91
|
return if record.type == 'SOA'
|
@@ -111,10 +114,6 @@ module RecordStore
|
|
111
114
|
)
|
112
115
|
end
|
113
116
|
|
114
|
-
unless record_params.fetch(:fqdn).ends_with?('.')
|
115
|
-
record_params[:fqdn] += '.'
|
116
|
-
end
|
117
|
-
|
118
117
|
Record.const_get(record.type).new(record_params)
|
119
118
|
end
|
120
119
|
end
|
data/lib/record_store/record.rb
CHANGED
@@ -12,7 +12,7 @@ module RecordStore
|
|
12
12
|
validate :validate_label_length
|
13
13
|
|
14
14
|
def initialize(record)
|
15
|
-
@fqdn = Record.ensure_ends_with_dot(record.fetch(:fqdn))
|
15
|
+
@fqdn = Record.ensure_ends_with_dot(record.fetch(:fqdn)).downcase
|
16
16
|
@ttl = record.fetch(:ttl)
|
17
17
|
@id = record.fetch(:record_id, nil)
|
18
18
|
end
|
data/lib/record_store/version.rb
CHANGED
data/record_store.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
|
20
20
|
spec.required_ruby_version = '>= 2.0'
|
21
21
|
|
22
|
-
spec.add_runtime_dependency 'thor'
|
22
|
+
spec.add_runtime_dependency 'thor', '~> 0.20.3'
|
23
23
|
spec.add_runtime_dependency 'activesupport', '>= 4.2'
|
24
24
|
spec.add_runtime_dependency 'activemodel', '>= 4.2'
|
25
25
|
spec.add_runtime_dependency 'ejson'
|
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: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Willem van Bergen
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-02-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 0.20.3
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 0.20.3
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: activesupport
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -332,7 +332,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
332
332
|
version: '0'
|
333
333
|
requirements: []
|
334
334
|
rubyforge_project:
|
335
|
-
rubygems_version: 2.6
|
335
|
+
rubygems_version: 2.7.6
|
336
336
|
signing_key:
|
337
337
|
specification_version: 4
|
338
338
|
summary: Manage DNS using git
|