record_store 6.7.2 → 7.0.1
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 +1 -1
- data/lib/record_store/record.rb +1 -1
- 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: 5380713a7eb24d7be7ea68e2d6e2691bc929bccc22cf5098ce805665b1f2493b
|
4
|
+
data.tar.gz: 7a4a1354479436ed184cad12e3eb8d434c0e8fa610bbd734d66ca494bb4c5365
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e5bfe2bf6e97fc9a771c2472bfc4d49d94333bde7bd40c01b67203a674df743be0fc9db80cff14c126aa1d4a9b295d7028c954b372f2b033e0c56feeb1fe6b1
|
7
|
+
data.tar.gz: b49194a0c1e24f3a3929832c561236c9828c75ee97859233a8ce127cd7f7321526359d43f01f3653962778354b330a095dd94675aeaebb0195afa5bfe60fe1ab
|
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.1
|
4
|
+
- Allow an underscore in the middle of a CNAME record
|
5
|
+
|
6
|
+
## 7.0.0
|
7
|
+
- Validate that there are no A/AAAA record conflicts with ALIAS records
|
8
|
+
|
3
9
|
## 6.7.2
|
4
10
|
- Fix ActiveModel::Error usage for validate_records (behaviour change in ActiveModel 7)
|
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')
|
data/lib/record_store/record.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module RecordStore
|
2
2
|
class Record
|
3
|
-
FQDN_REGEX = /\A(\*\.)?([a-z0-9_]+(-[
|
3
|
+
FQDN_REGEX = /\A(\*\.)?([a-z0-9_]+(-[_a-z0-9]+)*\._?)+[a-z]{2,}\.\Z/i
|
4
4
|
CNAME_REGEX = /\A(\*\.)?([a-z0-9_]+((-|--)?[a-z0-9]+)*\._?)+[a-z]{2,}\.\Z/i
|
5
5
|
|
6
6
|
include ActiveModel::Validations
|
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.22'
|
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.64.0'
|
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.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: 2024-
|
12
|
+
date: 2024-06-19 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.22'
|
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.22'
|
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.64.0
|
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.64.0
|
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.13
|
443
450
|
signing_key:
|
444
451
|
specification_version: 4
|
445
452
|
summary: Manage DNS using git
|