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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b84abff77df7d77d0f88940c816abfcc5b1082cda8083cbfcf5476f5e046c3e6
4
- data.tar.gz: 1f8c8c7bb693cadf2554cc6f5ff761c22d6d4f91da62d53f09ed9d3f4b986e96
3
+ metadata.gz: 9d4c787f0f82dabd1145741b2621cc6e5c4c7b019f83918349aba92cde05b445
4
+ data.tar.gz: 6cc9654056a88bf0233b2a9311145388771d7cbe432dd741e0603c1f6d9702de
5
5
  SHA512:
6
- metadata.gz: 9734a3e1fcc8f9bef842f1cab50d2e4cd2f31d284b3a022c0aa7cbc165357fbada8f932ef87c89d74ee0721ad56cebaa84d582e8bc9bd2500a437d0612e21930
7
- data.tar.gz: e325c240e820c5417bdda7c65b7767ced3d1d373c20c5e37c976ba18052dedf140d694d5d03d99c8a41104f49b10a91532216470bc7ddfcf980eef6e2e859dbb
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
 
@@ -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
- request["X-Auth-Email"] = credentials[:email]
69
- request["X-Auth-Key"] = credentials[:key]
70
- end
71
- @http.after_response do |response|
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Zonesync
4
- VERSION = "0.5.2"
4
+ VERSION = "0.6.0"
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.5.2
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-02-06 00:00:00.000000000 Z
12
+ date: 2024-04-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dns-zonefile