record_store 5.5.3 → 5.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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 { |zone| zone.unrooted_name }
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)
@@ -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', that has been renamed to 'sequel_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 = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|DESIGN)}) }
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
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $:.unshift File.expand_path('../../lib', __FILE__)
3
+ $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
4
4
  require 'bundler/setup'
5
5
  require 'record_store'
6
6
 
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.3
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-09-30 00:00:00.000000000 Z
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