Skip to content

Commit

Permalink
Merge pull request #229 from Shopify/dependabot/bundler/rubocop-shopi…
Browse files Browse the repository at this point in the history
…fy-tw-2.15.1

Update rubocop-shopify requirement from ~> 2.14.0 to ~> 2.15.1
  • Loading branch information
sbfaulkner committed Feb 26, 2024
2 parents 70acb21 + d6660dd commit 29fa599
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion lib/record_store/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def apply

option :name, desc: 'Zone to download', aliases: '-n', type: :string, required: true
option :provider, desc: 'Provider in which this zone exists', aliases: '-p', type: :string
desc 'download', 'Downloads all records from zone and creates YAML zone definition in zones/ '\
desc 'download', 'Downloads all records from zone and creates YAML zone definition in zones/ ' \
'e.g. record-store download --name=shopify.io'
def download
name = options.fetch('name')
Expand Down
4 changes: 2 additions & 2 deletions lib/record_store/zone.rb
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,8 @@ def validate_no_empty_non_terminal
.select { |record| record.match?(/^([a-zA-Z0-9\-_]+)#{Regexp.escape(suffix)}$/) }
terminal_records.each do |terminal_record|
non_terminal = terminal_record.partition('.').last
errors.add(:records, "found empty non-terminal #{non_terminal} "\
"(caused by existing records #{wildcard} and #{terminal_record})")\
errors.add(:records, "found empty non-terminal #{non_terminal} " \
"(caused by existing records #{wildcard} and #{terminal_record})") \
unless intermediate_records.include?(non_terminal)
end
end
Expand Down
6 changes: 3 additions & 3 deletions record_store.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
spec.email = ['willem@railsdoctors.com', 'emil@shopify.com']

spec.summary = 'Manage DNS using git'
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'."
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'."
spec.homepage = 'https://github.com/Shopify/record_store'
spec.license = 'MIT'

Expand Down Expand Up @@ -47,7 +47,7 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'pry'
spec.add_development_dependency 'rake'
spec.add_development_dependency 'rubocop', '~> 1.60.2'
spec.add_development_dependency 'rubocop-shopify', '~> 2.14.0'
spec.add_development_dependency 'rubocop-shopify', '~> 2.15.1'
spec.add_development_dependency 'vcr'
spec.add_development_dependency 'webmock'
end
4 changes: 2 additions & 2 deletions test/providers/ns1_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,8 @@ def test_colons_always_escaped_when_exported_from_ns1
end

def test_very_long_txt_record_more_than_255_chars_ns1
txtdata = '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789'\
'0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789'\
txtdata = '0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' \
'0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789' \
'0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789'

imported_txt_record = Record::TXT.new(
Expand Down
12 changes: 6 additions & 6 deletions test/record_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -294,36 +294,36 @@ def test_rdata_txt_returns_zonefile_compliant_formatting
def test_consistent_print_formatting
assert_equal('[ARecord] test.dns-test.shopify.io. 600 IN A 10.11.12.13', RECORD_FIXTURES[:a].to_s)
assert_equal(
'[AAAARecord] aaaa.dns-test.shopify.io. 60 IN AAAA '\
'[AAAARecord] aaaa.dns-test.shopify.io. 60 IN AAAA ' \
'2001:0db8:85a3:0000:0000:EA75:1337:BEEF',
RECORD_FIXTURES[:aaaa].to_s,
)
assert_equal(
'[ALIASRecord] dns-test.shopify.io. 60 IN ALIAS '\
'[ALIASRecord] dns-test.shopify.io. 60 IN ALIAS ' \
'dns-test.herokuapp.com.',
RECORD_FIXTURES[:alias_rr].to_s,
)
assert_equal(
'[CAARecord] cname.dns-test.shopify.io. 1800 IN CAA 0 issue '\
'[CAARecord] cname.dns-test.shopify.io. 1800 IN CAA 0 issue ' \
'"digicert.com"',
RECORD_FIXTURES[:caa].to_s,
)
assert_equal(
'[CNAMERecord] cname.dns-test.shopify.io. 60 IN CNAME '\
'[CNAMERecord] cname.dns-test.shopify.io. 60 IN CNAME ' \
'dns-test.shopify.io.',
RECORD_FIXTURES[:cname].to_s,
)
assert_equal('[MXRecord] mx.dns-test.shopify.io. 60 IN MX 10 mail-server.example.com.', RECORD_FIXTURES[:mx].to_s)
assert_equal('[NSRecord] dns-test.shopify.io. 3600 IN NS ns1.dynect.net.', RECORD_FIXTURES[:ns].to_s)
assert_equal(
'[SRVRecord] _service._tcp.srv.dns-test.shopify.io. 60 IN SRV 10 47 80 '\
'[SRVRecord] _service._tcp.srv.dns-test.shopify.io. 60 IN SRV 10 47 80 ' \
'target-srv.dns-test.shopify.io.',
RECORD_FIXTURES[:srv].to_s,
)
assert_equal('[TXTRecord] txt.dns-test.shopify.io. 60 IN TXT "Hello, world!"', RECORD_FIXTURES[:txt].to_s)
assert_equal('[SPFRecord] dns-test.shopify.io. 3600 IN SPF "v=spf1 -all"', RECORD_FIXTURES[:spf].to_s)
assert_equal(
'[SSHFPRecord] dns-test.shopify.io. 3600 IN SSHFP 4 2 '\
'[SSHFPRecord] dns-test.shopify.io. 3600 IN SSHFP 4 2 ' \
'4e0ebbeac8d2e4e73af888b20e2243e5a2a08bad6476c832c985e54b21eff4a3',
RECORD_FIXTURES[:sshfp].to_s,
)
Expand Down
10 changes: 5 additions & 5 deletions test/zone_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -163,12 +163,12 @@ def test_zone_with_cname_records
refute_predicate(zone, :valid?)
assert_equal(2, zone.errors[:records].length)
assert_equal(
"Multiple CNAME records are defined for www.example.com.: [CNAMERecord] www.example.com. "\
"Multiple CNAME records are defined for www.example.com.: [CNAMERecord] www.example.com. " \
"600 IN CNAME alternative.example.com.",
zone.errors[:records][0],
)
assert_equal(
"Multiple CNAME records are defined for www.example.com.: [CNAMERecord] www.example.com. "\
"Multiple CNAME records are defined for www.example.com.: [CNAMERecord] www.example.com. " \
"600 IN CNAME real.example.com.",
zone.errors[:records][1],
)
Expand All @@ -180,7 +180,7 @@ def test_zone_with_cname_records
refute_predicate(zone, :valid?)
assert_equal(1, zone.errors[:records].length)
assert_equal(
"A CNAME record is defined for www.example.com., so this record is not allowed: "\
"A CNAME record is defined for www.example.com., so this record is not allowed: " \
"[ARecord] www.example.com. 600 IN A 1.2.3.4",
zone.errors[:records].first,
)
Expand All @@ -191,7 +191,7 @@ def test_zone_with_cname_records
refute_predicate(zone, :valid?)
assert_equal(1, zone.errors[:records].length)
assert_equal(
'A CNAME record cannot be defined on the root of the zone: [CNAMERecord] example.com. '\
'A CNAME record cannot be defined on the root of the zone: [CNAMERecord] example.com. ' \
'600 IN CNAME www.example.com.',
zone.errors[:records][0],
)
Expand Down Expand Up @@ -423,7 +423,7 @@ def test_zone_validates_matching_ttls_for_records_with_same_type_and_fqdn

refute_predicate(invalid_zone, :valid?)
assert_equal(
"All TXT records for matching-records.com. "\
"All TXT records for matching-records.com. " \
"should have the same TTL",
invalid_zone.errors[:records].first,
)
Expand Down

0 comments on commit 29fa599

Please sign in to comment.