zonesync 0.6.0 → 0.6.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9d4c787f0f82dabd1145741b2621cc6e5c4c7b019f83918349aba92cde05b445
4
- data.tar.gz: 6cc9654056a88bf0233b2a9311145388771d7cbe432dd741e0603c1f6d9702de
3
+ metadata.gz: da2a32c21af6c64a37bdb9a998089318ba12cbf3e20e0699a757adafe23d6e29
4
+ data.tar.gz: 6614061b9bc864e1f5a6219d25ac96d93f45cf5a98a9234c75bc7241e51eb909
5
5
  SHA512:
6
- metadata.gz: bae5201c55f2d24e8915ba14bdc6dab7104960b4e21615056826f692983e9385d2b386c120d146b5e195e93a61736eeb1c081eef9c8bc524631bbd1ec18aff08
7
- data.tar.gz: ec58e33d0960cf7847bb53a7c26d6e534a2ad0c34459067dd7ee0eb3c00338c98004453ff3d0a81f33d754a96145f24e0ce315e076fde987591806b3ee3d7e40
6
+ metadata.gz: c79134908c21f775a9aa58eccadd072684d0657b3e23bf9b953a050ef4c558cd557f9bbed9c57a522c7ab3e0521bd0a3254c19c8b2415a36c25e236be242a74c
7
+ data.tar.gz: 17d1e8928f168ea9bd4e93a9add850c2c5e7e7c168d3982d133817bdef63a9c085ae4d2b108aa8b51f1d5cab692f597d8d035aece15c7b44fa2547ad7baa0f91
@@ -47,7 +47,9 @@ module Zonesync
47
47
  if %w[CNAME MX].include?(attrs["type"])
48
48
  rdata = normalize_trailing_period(rdata)
49
49
  end
50
-
50
+ if %w[TXT SPF NAPTR].include?(attrs["type"])
51
+ rdata = normalize_quoting(rdata)
52
+ end
51
53
  Record.new(
52
54
  normalize_trailing_period(attrs["name"]),
53
55
  attrs["type"],
@@ -60,6 +62,10 @@ module Zonesync
60
62
  value =~ /\.$/ ? value : value + "."
61
63
  end
62
64
 
65
+ def normalize_quoting value
66
+ value =~ /^".+"$/ ? value : %("#{value}")
67
+ end
68
+
63
69
  def http
64
70
  return @http if @http
65
71
  @http = HTTP.new("https://api.cloudflare.com/client/v4/zones/#{credentials[:zone_id]}/dns_records")
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zonesync
4
- VERSION = "0.6.0"
4
+ VERSION = "0.6.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zonesync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-04-11 00:00:00.000000000 Z
12
+ date: 2024-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dns-zonefile