record_store 5.5.3 → 5.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml +1027 -0
- data/.rubocop.yml +19 -0
- data/.travis.yml +1 -0
- data/bin/console +2 -2
- data/bin/record-store +1 -1
- data/bin/rubocop +29 -0
- data/dev.yml +4 -0
- data/lib/record_store.rb +4 -1
- data/lib/record_store/changeset.rb +8 -4
- data/lib/record_store/cli.rb +50 -48
- data/lib/record_store/provider.rb +11 -13
- data/lib/record_store/provider/dnsimple.rb +1 -2
- data/lib/record_store/provider/dynect.rb +6 -6
- data/lib/record_store/provider/google_cloud_dns.rb +5 -6
- data/lib/record_store/provider/ns1.rb +13 -9
- data/lib/record_store/provider/ns1/client.rb +3 -4
- data/lib/record_store/record.rb +27 -9
- data/lib/record_store/record/a.rb +4 -6
- data/lib/record_store/record/aaaa.rb +4 -6
- data/lib/record_store/record/alias.rb +5 -1
- data/lib/record_store/record/caa.rb +7 -3
- data/lib/record_store/record/cname.rb +5 -1
- data/lib/record_store/record/mx.rb +11 -3
- data/lib/record_store/record/ns.rb +5 -1
- data/lib/record_store/record/srv.rb +20 -4
- data/lib/record_store/record/txt.rb +1 -1
- data/lib/record_store/version.rb +1 -1
- data/lib/record_store/zone.rb +22 -16
- data/lib/record_store/zone/config.rb +1 -1
- data/lib/record_store/zone/yaml_definitions.rb +3 -2
- data/record_store.gemspec +4 -3
- data/template/bin/record-store +1 -1
- metadata +19 -2
@@ -27,7 +27,7 @@ module RecordStore
|
|
27
27
|
def to_hash
|
28
28
|
config_hash = {
|
29
29
|
providers: providers,
|
30
|
-
ignore_patterns: ignore_patterns.map(&:to_hash)
|
30
|
+
ignore_patterns: ignore_patterns.map(&:to_hash),
|
31
31
|
}
|
32
32
|
config_hash.merge!(supports_alias: supports_alias) if supports_alias
|
33
33
|
|
@@ -10,7 +10,7 @@ module RecordStore
|
|
10
10
|
def defined
|
11
11
|
@defined ||= yaml_files
|
12
12
|
.map { |file| load_yml_zone_definition(file) }
|
13
|
-
.index_by
|
13
|
+
.index_by(&:unrooted_name)
|
14
14
|
end
|
15
15
|
|
16
16
|
def [](name)
|
@@ -34,7 +34,7 @@ module RecordStore
|
|
34
34
|
name = name.chomp('.')
|
35
35
|
zone_file = "#{RecordStore.zones_path}/#{name}.yml"
|
36
36
|
zone = { name => { config: config.to_hash } }
|
37
|
-
records = records.map(&:to_hash).sort_by! {|r| [r.fetch(:fqdn), r.fetch(:type), r[:nsdname] || r[:address]]}
|
37
|
+
records = records.map(&:to_hash).sort_by! { |r| [r.fetch(:fqdn), r.fetch(:type), r[:nsdname] || r[:address]] }
|
38
38
|
|
39
39
|
if format == :file
|
40
40
|
zone[name][:records] = records
|
@@ -80,6 +80,7 @@ module RecordStore
|
|
80
80
|
File.unlink(*Dir["#{dir}/*"])
|
81
81
|
Dir.unlink(dir)
|
82
82
|
rescue Errno::ENOENT
|
83
|
+
nil
|
83
84
|
end
|
84
85
|
|
85
86
|
def write_record_files(name, records)
|
data/record_store.gemspec
CHANGED
@@ -9,11 +9,12 @@ 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',
|
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'."
|
13
14
|
spec.homepage = 'https://github.com/Shopify/record_store'
|
14
15
|
spec.license = 'MIT'
|
15
16
|
|
16
|
-
spec.files =
|
17
|
+
spec.files = %x(git ls-files -z).split("\x0").reject { |f| f.match(/^(test|DESIGN)/) }
|
17
18
|
spec.executables = ['record-store']
|
18
19
|
spec.require_paths = ['lib']
|
19
20
|
|
@@ -33,7 +34,6 @@ Gem::Specification.new do |spec|
|
|
33
34
|
spec.add_runtime_dependency 'ruby-limiter', '~> 1.0', '>= 1.0.1'
|
34
35
|
spec.add_runtime_dependency 'ns1'
|
35
36
|
|
36
|
-
|
37
37
|
spec.add_development_dependency 'byebug'
|
38
38
|
spec.add_development_dependency 'rake'
|
39
39
|
spec.add_development_dependency 'bundler'
|
@@ -41,4 +41,5 @@ Gem::Specification.new do |spec|
|
|
41
41
|
spec.add_development_dependency 'vcr'
|
42
42
|
spec.add_development_dependency 'pry'
|
43
43
|
spec.add_development_dependency 'webmock'
|
44
|
+
spec.add_development_dependency 'rubocop'
|
44
45
|
end
|
data/template/bin/record-store
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: 5.5.
|
4
|
+
version: 5.5.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: 2019-
|
12
|
+
date: 2019-10-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
@@ -283,6 +283,20 @@ dependencies:
|
|
283
283
|
- - ">="
|
284
284
|
- !ruby/object:Gem::Version
|
285
285
|
version: '0'
|
286
|
+
- !ruby/object:Gem::Dependency
|
287
|
+
name: rubocop
|
288
|
+
requirement: !ruby/object:Gem::Requirement
|
289
|
+
requirements:
|
290
|
+
- - ">="
|
291
|
+
- !ruby/object:Gem::Version
|
292
|
+
version: '0'
|
293
|
+
type: :development
|
294
|
+
prerelease: false
|
295
|
+
version_requirements: !ruby/object:Gem::Requirement
|
296
|
+
requirements:
|
297
|
+
- - ">="
|
298
|
+
- !ruby/object:Gem::Version
|
299
|
+
version: '0'
|
286
300
|
description: Manage DNS through a git-based workflow. If you're looking for the original
|
287
301
|
'record_store', that has been renamed to 'sequel_record_store'.
|
288
302
|
email:
|
@@ -294,6 +308,8 @@ extensions: []
|
|
294
308
|
extra_rdoc_files: []
|
295
309
|
files:
|
296
310
|
- ".gitignore"
|
311
|
+
- ".rubocop-https---shopify-github-io-ruby-style-guide-rubocop-yml"
|
312
|
+
- ".rubocop.yml"
|
297
313
|
- ".travis.yml"
|
298
314
|
- CHANGELOG.md
|
299
315
|
- Gemfile
|
@@ -302,6 +318,7 @@ files:
|
|
302
318
|
- Rakefile
|
303
319
|
- bin/console
|
304
320
|
- bin/record-store
|
321
|
+
- bin/rubocop
|
305
322
|
- bin/setup
|
306
323
|
- bin/test
|
307
324
|
- dev.yml
|