zonesync 0.5.2 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/zonesync/cloudflare.rb +6 -4
- data/lib/zonesync/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d4c787f0f82dabd1145741b2621cc6e5c4c7b019f83918349aba92cde05b445
|
4
|
+
data.tar.gz: 6cc9654056a88bf0233b2a9311145388771d7cbe432dd741e0603c1f6d9702de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bae5201c55f2d24e8915ba14bdc6dab7104960b4e21615056826f692983e9385d2b386c120d146b5e195e93a61736eeb1c081eef9c8bc524631bbd1ec18aff08
|
7
|
+
data.tar.gz: ec58e33d0960cf7847bb53a7c26d6e534a2ad0c34459067dd7ee0eb3c00338c98004453ff3d0a81f33d754a96145f24e0ce315e076fde987591806b3ee3d7e40
|
data/README.md
CHANGED
@@ -58,9 +58,12 @@ We need to tell `zonesync` about our DNS host by building a small YAML file. The
|
|
58
58
|
|
59
59
|
```
|
60
60
|
provider: Cloudflare
|
61
|
+
zone_id: <CLOUDFLARE_DOMAIN_ZONE_ID>
|
62
|
+
token: <CLOUDFLARE_API_TOKEN>
|
63
|
+
# or instead of token you can auth with:
|
61
64
|
email: <CLOUDFLARE_EMAIL>
|
62
65
|
key: <CLOUDFLARE_API_KEY>
|
63
|
-
|
66
|
+
``
|
64
67
|
|
65
68
|
**Route 53**
|
66
69
|
|
data/lib/zonesync/cloudflare.rb
CHANGED
@@ -65,10 +65,12 @@ module Zonesync
|
|
65
65
|
@http = HTTP.new("https://api.cloudflare.com/client/v4/zones/#{credentials[:zone_id]}/dns_records")
|
66
66
|
@http.before_request do |request|
|
67
67
|
request["Content-Type"] = "application/json"
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
68
|
+
if credentials[:token]
|
69
|
+
request["Authorization"] = "Bearer #{credentials[:token]}"
|
70
|
+
else
|
71
|
+
request["X-Auth-Email"] = credentials[:email]
|
72
|
+
request["X-Auth-Key"] = credentials[:key]
|
73
|
+
end
|
72
74
|
end
|
73
75
|
@http
|
74
76
|
end
|
data/lib/zonesync/version.rb
CHANGED
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.
|
4
|
+
version: 0.6.0
|
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-
|
12
|
+
date: 2024-04-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: dns-zonefile
|