zonesync 0.14.1 → 0.14.3

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: aef87fd752e2a1e3bdf9f96bbdfde30653a63343ab71e18ba9e98546fea5d46e
4
- data.tar.gz: b54a44acaca9238000db993fa6dd95b6f5fa1801122631e7f69d0ca81f0d3914
3
+ metadata.gz: 46a1af2deec25de218acd4d6cebf63f1a0e6d996d95ec4a0311603e943395501
4
+ data.tar.gz: 7b6b8e32fb8709a02299fa1a805facf2c1dec6cf3491010f960fed90516c31b9
5
5
  SHA512:
6
- metadata.gz: 621ec17d955e887859e9dad55d1f32e9963e0f392c2591b4ba0ed7c711f4bfd17fc217e92bdfc4488f861e37dca8b04298d900c48d77788345683217c12d7c5a
7
- data.tar.gz: 952e8e3b2936a9b080d84a3a9d7f8e058b13e7891f456e9b539b4d1635944b7dad3bcb8126a3c7a9c2b114528eda4dd2d3f980b14933f3dcf7080018eba54697
6
+ metadata.gz: 90730972e5edb267dafb7c4f7f3da11fbccf5befd25c0d1b99817804275a13543bd1f67b55d4945a982ece2790da74341293e394af120ebce2a8e64b79c77356
7
+ data.tar.gz: da7f4c54f907de870e88b8eeb8c33efa51e8dfe46206a31b366c90d6c6842b4d22e9fba426fb94fe4cea9347415acc692234dc86366c6a6d7cdbbfc2333f7283
data/README.md CHANGED
@@ -110,6 +110,22 @@ Zonesync.call(source: "Zonefile", destination: "zonesync", dry_run: true)
110
110
  Zonesync.generate(source: "zonesync", destination: "Zonefile")
111
111
  ```
112
112
 
113
+ ### Cloudflare proxy status
114
+
115
+ When using the Cloudflare provider, you can control whether a record is proxied through Cloudflare's CDN by adding a `cf_tags` comment to the record in your zone file:
116
+
117
+ ```
118
+ www IN A 192.0.2.1 ; cf_tags=cf-proxied:true
119
+ mail IN A 192.0.2.2 ; cf_tags=cf-proxied:false
120
+ api IN A 192.0.2.3
121
+ ```
122
+
123
+ - `cf_tags=cf-proxied:true` — enable Cloudflare proxy (orange cloud)
124
+ - `cf_tags=cf-proxied:false` — explicitly disable proxy (grey cloud)
125
+ - No `cf_tags` — don't touch the proxied setting (use Cloudflare's default)
126
+
127
+ When generating a zone file with `zonesync generate`, proxied records will automatically include the `cf_tags=cf-proxied:true` tag in their comments.
128
+
113
129
  ### Managing or avoiding conflicts with other people making edits to the DNS records
114
130
 
115
131
  Zonesync writes two additional TXT records: `zonesync_manifest` and `zonesync_checksum`. These two records together try to handle the situation where someone else makes edits directly to the DNS records managed by zonesync.
@@ -53,17 +53,7 @@ module Zonesync
53
53
 
54
54
  def conflicts_with?(other)
55
55
  return false unless name == other.name && type == other.type
56
-
57
- case type
58
- when "CNAME", "SOA"
59
- true
60
- when "MX"
61
- existing_priority = rdata.split(' ').first
62
- new_priority = other.rdata.split(' ').first
63
- existing_priority == new_priority
64
- else
65
- false
66
- end
56
+ Record.single_record_per_name?(type)
67
57
  end
68
58
 
69
59
  def self.single_record_per_name?(type)
@@ -68,8 +68,18 @@ module Zonesync
68
68
  end
69
69
 
70
70
  def change(old_record, new_record)
71
- remove(old_record)
72
- add(new_record)
71
+ new_set = if old_record.manifest? || old_record.checksum?
72
+ # our metadata records are singletons, always replace
73
+ [new_record]
74
+ else
75
+ existing_records = records.select do |r|
76
+ r.name == old_record.name && r.type == old_record.type
77
+ end
78
+ (existing_records.reject { |r| r.identical_to?(old_record) } + [new_record]).uniq
79
+ end
80
+
81
+ change_records("UPSERT", new_set)
82
+ invalidate_cache!
73
83
  end
74
84
 
75
85
  def add(record)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zonesync
4
- VERSION = "0.14.1"
4
+ VERSION = "0.14.3"
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.14.1
4
+ version: 0.14.3
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: 2026-02-24 00:00:00.000000000 Z
12
+ date: 2026-06-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor