record_store 6.7.1 → 7.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.rubocop.yml +0 -1
- data/.ruby-version +1 -0
- data/CHANGELOG.md +6 -0
- data/dev.yml +1 -1
- data/lib/record_store/cli.rb +5 -3
- data/lib/record_store/version.rb +1 -1
- data/lib/record_store/zone.rb +24 -2
- data/record_store.gemspec +7 -7
- metadata +21 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4660a1728cb56ba74b30cb043651657b5c771d09b3c2db4cd490668f03816347
|
4
|
+
data.tar.gz: d2c5a964d0144796cfd527f07c980e9f7ae9d2fc29b4b62270eb44c16433adc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76b79d9ba3bcef04ab34d8f39bc8c29ddcd2d46f819f99d0c51f02ae0184f76dd15bf41cf1ba5db629fa601912bf2a06a314a4053f3f75b0cca11c6052cdda5a
|
7
|
+
data.tar.gz: 46790fdab35c62eb6999dc27f91e71690065344c72c2e09c3e1cb9063d55cc1aa2819846d6d5337f55c4a13f1159ccae6ae16b828b7d6d042dc3e8e787a3eb29
|
data/.github/workflows/ci.yml
CHANGED
data/.rubocop.yml
CHANGED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
3.2.1
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,11 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 7.0.0
|
4
|
+
- Validate that there are no A/AAAA record conflicts with ALIAS records
|
5
|
+
|
6
|
+
## 6.7.2
|
7
|
+
- Fix ActiveModel::Error usage for validate_records (behaviour change in ActiveModel 7)
|
8
|
+
|
3
9
|
# 6.7.1
|
4
10
|
- Change update_record to update_zone_record for DNSimple
|
5
11
|
|
data/dev.yml
CHANGED
data/lib/record_store/cli.rb
CHANGED
@@ -149,7 +149,7 @@ module RecordStore
|
|
149
149
|
|
150
150
|
option :name, desc: 'Zone to download', aliases: '-n', type: :string, required: true
|
151
151
|
option :provider, desc: 'Provider in which this zone exists', aliases: '-p', type: :string
|
152
|
-
desc 'download', 'Downloads all records from zone and creates YAML zone definition in zones/ '\
|
152
|
+
desc 'download', 'Downloads all records from zone and creates YAML zone definition in zones/ ' \
|
153
153
|
'e.g. record-store download --name=shopify.io'
|
154
154
|
def download
|
155
155
|
name = options.fetch('name')
|
@@ -289,8 +289,10 @@ module RecordStore
|
|
289
289
|
|
290
290
|
invalid_records.each do |record|
|
291
291
|
puts " #{record}"
|
292
|
-
record.errors.each do |field,
|
293
|
-
|
292
|
+
record.errors.messages.each do |field, errors|
|
293
|
+
errors.each do |msg|
|
294
|
+
puts " - #{field}: #{msg}"
|
295
|
+
end
|
294
296
|
end
|
295
297
|
end
|
296
298
|
end
|
data/lib/record_store/version.rb
CHANGED
data/lib/record_store/zone.rb
CHANGED
@@ -22,6 +22,7 @@ module RecordStore
|
|
22
22
|
validate :validate_can_handle_alias_records
|
23
23
|
validate :validate_no_duplicate_keys
|
24
24
|
validate :validate_zone_record_not_shadowed
|
25
|
+
validate :validate_alias_has_no_conflicts
|
25
26
|
|
26
27
|
class << self
|
27
28
|
def download(name, provider_name, **write_options)
|
@@ -265,6 +266,27 @@ module RecordStore
|
|
265
266
|
end
|
266
267
|
end
|
267
268
|
|
269
|
+
# CNAME conflict is handled by validate_cname_records_for_same_fqdn
|
270
|
+
ALIAS_CONFLICTS = [
|
271
|
+
"A",
|
272
|
+
"AAAA",
|
273
|
+
]
|
274
|
+
|
275
|
+
def validate_alias_has_no_conflicts
|
276
|
+
alias_records = records.select { |record| record.is_a?(Record::ALIAS) }
|
277
|
+
|
278
|
+
alias_records.each do |alias_record|
|
279
|
+
records.each do |record|
|
280
|
+
next unless ALIAS_CONFLICTS.include?(record.type)
|
281
|
+
next unless record.fqdn == alias_record.fqdn
|
282
|
+
|
283
|
+
errors.add(:records, "#{record.type} record conflicts with ALIAS:\n" \
|
284
|
+
"- #{alias_record}\n" \
|
285
|
+
"- #{record}")
|
286
|
+
end
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
268
290
|
def validate_provider_can_handle_zone_records
|
269
291
|
record_types = records.map(&:type).to_set
|
270
292
|
return unless config.valid?
|
@@ -312,8 +334,8 @@ module RecordStore
|
|
312
334
|
.select { |record| record.match?(/^([a-zA-Z0-9\-_]+)#{Regexp.escape(suffix)}$/) }
|
313
335
|
terminal_records.each do |terminal_record|
|
314
336
|
non_terminal = terminal_record.partition('.').last
|
315
|
-
errors.add(:records, "found empty non-terminal #{non_terminal} "\
|
316
|
-
"(caused by existing records #{wildcard} and #{terminal_record})")\
|
337
|
+
errors.add(:records, "found empty non-terminal #{non_terminal} " \
|
338
|
+
"(caused by existing records #{wildcard} and #{terminal_record})") \
|
317
339
|
unless intermediate_records.include?(non_terminal)
|
318
340
|
end
|
319
341
|
end
|
data/record_store.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
9
9
|
spec.email = ['willem@railsdoctors.com', 'emil@shopify.com']
|
10
10
|
|
11
11
|
spec.summary = 'Manage DNS using git'
|
12
|
-
spec.description = "Manage DNS through a git-based workflow. If you're looking for the original 'record_store',"\
|
13
|
-
"
|
12
|
+
spec.description = "Manage DNS through a git-based workflow. If you're looking for the original 'record_store', " \
|
13
|
+
"that has been renamed to 'sequel_record_store'."
|
14
14
|
spec.homepage = 'https://github.com/Shopify/record_store'
|
15
15
|
spec.license = 'MIT'
|
16
16
|
|
@@ -24,20 +24,20 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.executables = ['record-store']
|
25
25
|
spec.require_paths = ['lib']
|
26
26
|
|
27
|
-
spec.required_ruby_version = '>=
|
27
|
+
spec.required_ruby_version = '>= 3.0.0'
|
28
28
|
|
29
29
|
spec.add_runtime_dependency 'activemodel', '>= 4.2'
|
30
30
|
spec.add_runtime_dependency 'activesupport', '>= 4.2'
|
31
31
|
spec.add_runtime_dependency 'ejson'
|
32
32
|
spec.add_runtime_dependency 'thor', '>= 0.20.3', '< 1.4.0'
|
33
33
|
|
34
|
-
spec.add_runtime_dependency 'dnsimple', '>= 4.4', '<
|
34
|
+
spec.add_runtime_dependency 'dnsimple', '>= 4.4', '< 9.1'
|
35
35
|
spec.add_runtime_dependency 'fog-dynect', '>= 0.4', '< 0.6'
|
36
36
|
spec.add_runtime_dependency 'fog-json'
|
37
37
|
spec.add_runtime_dependency 'fog-xml'
|
38
38
|
spec.add_runtime_dependency 'google-cloud-dns', '~> 0.31'
|
39
39
|
spec.add_runtime_dependency 'ns1'
|
40
|
-
spec.add_runtime_dependency 'oci', '
|
40
|
+
spec.add_runtime_dependency 'oci', '>= 2.14', '< 2.21'
|
41
41
|
spec.add_runtime_dependency 'ruby-limiter', '>= 1.0.1', '< 3'
|
42
42
|
|
43
43
|
spec.add_development_dependency 'bundler'
|
@@ -46,8 +46,8 @@ Gem::Specification.new do |spec|
|
|
46
46
|
spec.add_development_dependency 'mocha'
|
47
47
|
spec.add_development_dependency 'pry'
|
48
48
|
spec.add_development_dependency 'rake'
|
49
|
-
spec.add_development_dependency 'rubocop', '~> 1.
|
50
|
-
spec.add_development_dependency 'rubocop-shopify', '~> 2.
|
49
|
+
spec.add_development_dependency 'rubocop', '~> 1.62.1'
|
50
|
+
spec.add_development_dependency 'rubocop-shopify', '~> 2.15.1'
|
51
51
|
spec.add_development_dependency 'vcr'
|
52
52
|
spec.add_development_dependency 'webmock'
|
53
53
|
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
|
+
version: 7.0.0
|
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-
|
12
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemodel
|
@@ -82,7 +82,7 @@ dependencies:
|
|
82
82
|
version: '4.4'
|
83
83
|
- - "<"
|
84
84
|
- !ruby/object:Gem::Version
|
85
|
-
version: '
|
85
|
+
version: '9.1'
|
86
86
|
type: :runtime
|
87
87
|
prerelease: false
|
88
88
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -92,7 +92,7 @@ dependencies:
|
|
92
92
|
version: '4.4'
|
93
93
|
- - "<"
|
94
94
|
- !ruby/object:Gem::Version
|
95
|
-
version: '
|
95
|
+
version: '9.1'
|
96
96
|
- !ruby/object:Gem::Dependency
|
97
97
|
name: fog-dynect
|
98
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,16 +173,22 @@ dependencies:
|
|
173
173
|
name: oci
|
174
174
|
requirement: !ruby/object:Gem::Requirement
|
175
175
|
requirements:
|
176
|
-
- - "
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '2.14'
|
179
|
+
- - "<"
|
177
180
|
- !ruby/object:Gem::Version
|
178
|
-
version: 2.
|
181
|
+
version: '2.21'
|
179
182
|
type: :runtime
|
180
183
|
prerelease: false
|
181
184
|
version_requirements: !ruby/object:Gem::Requirement
|
182
185
|
requirements:
|
183
|
-
- - "
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '2.14'
|
189
|
+
- - "<"
|
184
190
|
- !ruby/object:Gem::Version
|
185
|
-
version: 2.
|
191
|
+
version: '2.21'
|
186
192
|
- !ruby/object:Gem::Dependency
|
187
193
|
name: ruby-limiter
|
188
194
|
requirement: !ruby/object:Gem::Requirement
|
@@ -293,28 +299,28 @@ dependencies:
|
|
293
299
|
requirements:
|
294
300
|
- - "~>"
|
295
301
|
- !ruby/object:Gem::Version
|
296
|
-
version: 1.
|
302
|
+
version: 1.62.1
|
297
303
|
type: :development
|
298
304
|
prerelease: false
|
299
305
|
version_requirements: !ruby/object:Gem::Requirement
|
300
306
|
requirements:
|
301
307
|
- - "~>"
|
302
308
|
- !ruby/object:Gem::Version
|
303
|
-
version: 1.
|
309
|
+
version: 1.62.1
|
304
310
|
- !ruby/object:Gem::Dependency
|
305
311
|
name: rubocop-shopify
|
306
312
|
requirement: !ruby/object:Gem::Requirement
|
307
313
|
requirements:
|
308
314
|
- - "~>"
|
309
315
|
- !ruby/object:Gem::Version
|
310
|
-
version: 2.
|
316
|
+
version: 2.15.1
|
311
317
|
type: :development
|
312
318
|
prerelease: false
|
313
319
|
version_requirements: !ruby/object:Gem::Requirement
|
314
320
|
requirements:
|
315
321
|
- - "~>"
|
316
322
|
- !ruby/object:Gem::Version
|
317
|
-
version: 2.
|
323
|
+
version: 2.15.1
|
318
324
|
- !ruby/object:Gem::Dependency
|
319
325
|
name: vcr
|
320
326
|
requirement: !ruby/object:Gem::Requirement
|
@@ -360,6 +366,7 @@ files:
|
|
360
366
|
- ".gitignore"
|
361
367
|
- ".rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml"
|
362
368
|
- ".rubocop.yml"
|
369
|
+
- ".ruby-version"
|
363
370
|
- ".travis.yml"
|
364
371
|
- CHANGELOG.md
|
365
372
|
- Gemfile
|
@@ -432,14 +439,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
432
439
|
requirements:
|
433
440
|
- - ">="
|
434
441
|
- !ruby/object:Gem::Version
|
435
|
-
version:
|
442
|
+
version: 3.0.0
|
436
443
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
437
444
|
requirements:
|
438
445
|
- - ">="
|
439
446
|
- !ruby/object:Gem::Version
|
440
447
|
version: '0'
|
441
448
|
requirements: []
|
442
|
-
rubygems_version: 3.5.
|
449
|
+
rubygems_version: 3.5.7
|
443
450
|
signing_key:
|
444
451
|
specification_version: 4
|
445
452
|
summary: Manage DNS using git
|