cloudflare-dns-update 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/.rspec +4 -0
- data/.travis.yml +19 -0
- data/Gemfile +6 -1
- data/README.md +21 -8
- data/Rakefile +9 -0
- data/bin/cloudflare-dns-update +3 -111
- data/cloudflare-dns-update.gemspec +8 -6
- data/lib/cloudflare/dns/update.rb +1 -1
- data/lib/cloudflare/dns/update/command.rb +168 -0
- data/lib/cloudflare/dns/update/version.rb +2 -2
- data/spec/cloudflare/dns/update/command_spec.rb +50 -0
- data/spec/spec_helper.rb +29 -0
- metadata +56 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 139312af49a524c2b48844c8a0fa74a388b18b52
|
4
|
+
data.tar.gz: 1a27eef227948c07d63b3d87e958c9fdb6a5aaa8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c9b4fccfb946c75d3b48c9671fe05b303c52db40a93b8b36f010be8a5c7fe29ddbd69682f9a6e3e6782ec10d3afa4b8463d97ca2273b9b2df07a2bdbcd8f1ce
|
7
|
+
data.tar.gz: 24048eaa654109883df94a27ee150829ed8cc1bc1113dde904f19dc2f7d2e8ba019cae2de37b927b7ba2a1fc2fc3db339ad2a6bc07f7954c8fa63c9c0385650e
|
data/.gitignore
CHANGED
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
language: ruby
|
2
|
+
sudo: false
|
3
|
+
dist: trusty
|
4
|
+
cache: bundler
|
5
|
+
rvm:
|
6
|
+
- 2.0
|
7
|
+
- 2.1
|
8
|
+
- 2.2
|
9
|
+
- 2.3
|
10
|
+
- 2.4
|
11
|
+
- jruby-head
|
12
|
+
- ruby-head
|
13
|
+
matrix:
|
14
|
+
allow_failures:
|
15
|
+
- rvm: ruby-head
|
16
|
+
- rvm: jruby-head
|
17
|
+
env:
|
18
|
+
global:
|
19
|
+
secure: LU7mGKnIrWrnrdtq7Ug7HTxzqJoB+NbLHwT8dPmGf4GIfNosO4Jx+G4JLzUd/sCHzUR+XXrsMd7El8WkTVV28+nt6Cv2JvO4EJRIplnAL8Yauc0YSWRwA9nGYhcc2TJc5czbL0mZkJSOv4B+aWco0VWerJfgLYurIA05XrQFGGY=
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
#
|
1
|
+
# Cloudflare::DNS::Update
|
2
2
|
|
3
|
-
This gem provides a simple executable tool for managing
|
3
|
+
This gem provides a simple executable tool for managing Cloudflare records to provide dynamic DNS like functionality. You need to add it to whatever `cron` system your host system uses.
|
4
|
+
|
5
|
+
[![Build Status](https://secure.travis-ci.org/ioquatix/cloudflare-dns-update.svg)](http://travis-ci.org/ioquatix/cloudflare-dns-update)
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -18,18 +20,25 @@ Simply set up configurations for each domain you wish to update, and add to `/et
|
|
18
20
|
|
19
21
|
#!/usr/bin/env sh
|
20
22
|
|
21
|
-
cloudflare-dns-update --configuration /srv/dyndns/
|
23
|
+
cloudflare-dns-update --configuration /srv/dyndns/example.A.yml
|
24
|
+
cloudflare-dns-update --configuration /srv/dyndns/example.AAAA.yml
|
22
25
|
|
23
|
-
Note that in case you want to update more than one domains in a zone with the same IP address, you can have multiple domains in a configuration file. Follow instructions of the configuration process.
|
26
|
+
Note that in case you want to update more than one domains in a zone with the same IP address, you can have multiple domains in a configuration file. Follow instructions of the configuration process. Just to note, each domain would be updated with the same content. Having both IPv4 and IPv6 records in the same configuration file is not possible nor recommended. Please create separate configuration files.
|
24
27
|
|
25
28
|
The configuration file would end up looking something like this:
|
26
29
|
|
27
30
|
---
|
28
|
-
:key:
|
29
|
-
:email:
|
30
|
-
:zone:
|
31
|
+
:key: b10_NOT_A_REAL_KEY_fe5
|
32
|
+
:email: cloudflare-account@example.com
|
33
|
+
:zone: example.com
|
31
34
|
:content_command: curl ipinfo.io/ip
|
32
35
|
|
36
|
+
### IPv6 Support
|
37
|
+
|
38
|
+
It is possible to update IPv6 when you have a dynamically allocated prefix. To get your current IPv6 address, the following command can be used:
|
39
|
+
|
40
|
+
/sbin/ip -6 addr | awk -F '[ \t]+|/' '$3 == "::1" { next;} $3 ~ /^fe80::/ { next ; } /inet6/ {print $3}'
|
41
|
+
|
33
42
|
## Contributing
|
34
43
|
|
35
44
|
1. Fork it
|
@@ -38,11 +47,15 @@ The configuration file would end up looking something like this:
|
|
38
47
|
4. Push to the branch (`git push origin my-new-feature`)
|
39
48
|
5. Create new Pull Request
|
40
49
|
|
50
|
+
## See Also
|
51
|
+
|
52
|
+
- [cloudflare](https://github.com/ioquatix/cloudflare) – Provides access to Cloudflare.
|
53
|
+
|
41
54
|
## License
|
42
55
|
|
43
56
|
Released under the MIT license.
|
44
57
|
|
45
|
-
Copyright,
|
58
|
+
Copyright, 2017, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
|
46
59
|
|
47
60
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
48
61
|
of this software and associated documentation files (the "Software"), to deal
|
data/Rakefile
CHANGED
data/bin/cloudflare-dns-update
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
# Copyright,
|
3
|
+
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
4
4
|
#
|
5
5
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
# of this software and associated documentation files (the "Software"), to deal
|
@@ -20,114 +20,6 @@
|
|
20
20
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
21
|
# THE SOFTWARE.
|
22
22
|
|
23
|
-
require '
|
24
|
-
require 'yaml/store'
|
23
|
+
require 'cloudflare/dns/update/command'
|
25
24
|
|
26
|
-
|
27
|
-
|
28
|
-
def check_result(result, success_message = 'Finished.')
|
29
|
-
if result['result'] == 'success'
|
30
|
-
puts success_message
|
31
|
-
yield
|
32
|
-
else
|
33
|
-
puts result['msg'] # error message
|
34
|
-
exit(1)
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
def get_input(message)
|
39
|
-
$stdout.write(message + ' ')
|
40
|
-
gets.chomp
|
41
|
-
end
|
42
|
-
|
43
|
-
def run(*command)
|
44
|
-
puts "Running command #{command.join(' ')}"
|
45
|
-
|
46
|
-
IO.popen(*command) do |io|
|
47
|
-
return io.read.chomp
|
48
|
-
end
|
49
|
-
end
|
50
|
-
|
51
|
-
opts = Trollop::options do
|
52
|
-
opt :configuration, "Path to the configuration database.", :default => "cloudflare-dns.yml"
|
53
|
-
end
|
54
|
-
|
55
|
-
configuration_store = YAML::Store.new(opts[:configuration])
|
56
|
-
|
57
|
-
configuration_store.transaction do |configuration|
|
58
|
-
unless configuration[:key] && configuration[:email]
|
59
|
-
puts "This configuration file appears to be new, we require some details."
|
60
|
-
configuration[:key] = get_input "CloudFlare Key:"
|
61
|
-
configuration[:email] = get_input "CloudFlare Email:"
|
62
|
-
end
|
63
|
-
end
|
64
|
-
|
65
|
-
cloudflare = nil
|
66
|
-
|
67
|
-
configuration_store.transaction do |configuration|
|
68
|
-
cloudflare = CloudFlare.connection(configuration[:key], configuration[:email])
|
69
|
-
end
|
70
|
-
|
71
|
-
configuration_store.transaction do |configuration|
|
72
|
-
unless configuration[:zone]
|
73
|
-
puts "What zone do you want to modify? e.g. 'oriontransfer.co.nz'"
|
74
|
-
configuration[:zone] = get_input "DNS Zone:"
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
configuration_store.transaction do |configuration|
|
79
|
-
unless configuration[:domains] || configuration[:domain]
|
80
|
-
puts "Getting list of domains for #{configuration[:zone]}..."
|
81
|
-
|
82
|
-
result = cloudflare.rec_load_all(configuration[:zone])
|
83
|
-
|
84
|
-
records = result['response']['recs']['objs']
|
85
|
-
|
86
|
-
records.each.with_index do |record, index|
|
87
|
-
puts "(#{index}) #{record['name']} #{record['type']} #{record['content']}"
|
88
|
-
end
|
89
|
-
|
90
|
-
input = get_input "Which record to update?\nYou can select more than one record by separating numbers with comma (e.g. 0,2,5):"
|
91
|
-
indexes = input.split(',').map(&:strip)
|
92
|
-
|
93
|
-
configuration[:domains] = indexes.inject([]) do |a, index|
|
94
|
-
a << records[index.to_i]
|
95
|
-
end
|
96
|
-
end
|
97
|
-
end
|
98
|
-
|
99
|
-
configuration_store.transaction do |configuration|
|
100
|
-
unless configuration[:content_command]
|
101
|
-
puts "What command to get content for record? e.g. 'curl ipinfo.io/ip'"
|
102
|
-
configuration[:content_command] = get_input "Command to get latest IP address:"
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
|
-
configuration_store.transaction do |configuration|
|
107
|
-
content = run(configuration[:content_command])
|
108
|
-
domains = configuration[:domains] || [configuration[:domain]]
|
109
|
-
|
110
|
-
domains.each do |domain|
|
111
|
-
if domain['content'] != content
|
112
|
-
puts "Content changed #{content.dump}, updating record..."
|
113
|
-
# zone, type, zoneid, name, content, ttl, service_mode = nil, prio = nil, service = nil, srvname = nil, protocol = nil, weight = nil, port = nil, target = nil
|
114
|
-
|
115
|
-
arguments = [
|
116
|
-
configuration[:zone],
|
117
|
-
domain['type'],
|
118
|
-
domain['rec_id'],
|
119
|
-
domain['name'],
|
120
|
-
content,
|
121
|
-
domain['ttl']
|
122
|
-
]
|
123
|
-
|
124
|
-
result = cloudflare.rec_edit(*arguments)
|
125
|
-
|
126
|
-
puts "Updating domain content: #{content}"
|
127
|
-
domain['content'] = content
|
128
|
-
configuration[:domain] = domain
|
129
|
-
else
|
130
|
-
puts "Content hasn't changed."
|
131
|
-
end
|
132
|
-
end
|
133
|
-
end
|
25
|
+
Cloudflare::DNS::Update::Command::Top.parse(ARGV).invoke
|
@@ -5,15 +5,15 @@ require 'cloudflare/dns/update/version'
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "cloudflare-dns-update"
|
8
|
-
spec.version =
|
8
|
+
spec.version = Cloudflare::DNS::Update::VERSION
|
9
9
|
spec.authors = ["Samuel Williams"]
|
10
10
|
spec.email = ["samuel.williams@oriontransfer.co.nz"]
|
11
11
|
spec.description = <<-EOF
|
12
|
-
Provides a client tool for updating
|
12
|
+
Provides a client tool for updating Cloudflare records, with a specific
|
13
13
|
emphasis on updating IP addresses for domain records. This provides
|
14
14
|
dyndns-like functionality.
|
15
15
|
EOF
|
16
|
-
spec.summary = "A dyndns client for
|
16
|
+
spec.summary = "A dyndns client for Cloudflare."
|
17
17
|
spec.homepage = ""
|
18
18
|
spec.license = "MIT"
|
19
19
|
|
@@ -22,9 +22,11 @@ Gem::Specification.new do |spec|
|
|
22
22
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
|
25
|
+
spec.add_dependency "samovar", "~> 1.3"
|
26
|
+
spec.add_dependency "tty-prompt", "~> 0.12.0"
|
27
|
+
spec.add_dependency "cloudflare", "~> 3.0"
|
28
|
+
|
29
|
+
spec.add_development_dependency "rspec", "~> 3.6"
|
25
30
|
spec.add_development_dependency "bundler", "~> 1.3"
|
26
31
|
spec.add_development_dependency "rake"
|
27
|
-
|
28
|
-
spec.add_dependency "trollop", "~> 2.0.0"
|
29
|
-
spec.add_dependency "cloudflare", "~> 2.0.0"
|
30
32
|
end
|
@@ -0,0 +1,168 @@
|
|
1
|
+
# Copyright, 2017, by Samuel G. D. Williams. <http://www.codeotaku.com>
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
# of this software and associated documentation files (the "Software"), to deal
|
5
|
+
# in the Software without restriction, including without limitation the rights
|
6
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
# copies of the Software, and to permit persons to whom the Software is
|
8
|
+
# furnished to do so, subject to the following conditions:
|
9
|
+
#
|
10
|
+
# The above copyright notice and this permission notice shall be included in
|
11
|
+
# all copies or substantial portions of the Software.
|
12
|
+
#
|
13
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
# THE SOFTWARE.
|
20
|
+
|
21
|
+
require 'samovar'
|
22
|
+
require 'yaml/store'
|
23
|
+
require 'tty/prompt'
|
24
|
+
|
25
|
+
require 'open3'
|
26
|
+
require 'json'
|
27
|
+
|
28
|
+
require 'cloudflare'
|
29
|
+
require_relative 'version'
|
30
|
+
|
31
|
+
module Cloudflare::DNS::Update
|
32
|
+
module Command
|
33
|
+
# The top level utopia command.
|
34
|
+
class Top < Samovar::Command
|
35
|
+
self.description = "Update remote DNS records according to locally run commands."
|
36
|
+
|
37
|
+
options do
|
38
|
+
option '-c/--configuration <path>', "Use the specified configuration file."
|
39
|
+
option '-h/--help', "Print out help information."
|
40
|
+
option '-v/--version', "Print out the application version."
|
41
|
+
end
|
42
|
+
|
43
|
+
def prompt
|
44
|
+
@prompt ||= TTY::Prompt.new
|
45
|
+
end
|
46
|
+
|
47
|
+
def configuration_store
|
48
|
+
@store ||= YAML::Store.new(@options[:configuration])
|
49
|
+
end
|
50
|
+
|
51
|
+
attr_accessor :connection
|
52
|
+
|
53
|
+
def connect!
|
54
|
+
configuration_store.transaction do |configuration|
|
55
|
+
unless configuration[:key]
|
56
|
+
prompt.puts "This configuration file appears to be new, we require some details."
|
57
|
+
configuration[:key] = prompt.mask("Cloudflare Key:")
|
58
|
+
configuration[:email] = prompt.ask("Cloudflare Email:")
|
59
|
+
end
|
60
|
+
|
61
|
+
key = configuration[:key]
|
62
|
+
email = configuration[:email]
|
63
|
+
|
64
|
+
@connection = Cloudflare.connect(key: key, email: email)
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
def initialize_zone
|
69
|
+
configuration_store.transaction do |configuration|
|
70
|
+
unless configuration[:zone]
|
71
|
+
zone = prompt.select("What zone do you want to update?", @connection.zones.all)
|
72
|
+
|
73
|
+
configuration[:zone] = zone.record
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
def initialize_domains
|
79
|
+
configuration_store.transaction do |configuration|
|
80
|
+
domains = configuration[:domains]
|
81
|
+
|
82
|
+
while domains.nil? || domains.empty?
|
83
|
+
prompt.puts "Getting list of domains for #{configuration[:zone]}..."
|
84
|
+
|
85
|
+
zone_id = configuration[:zone][:id]
|
86
|
+
zone = @connection.zones.find_by_id(zone_id)
|
87
|
+
|
88
|
+
dns_records = prompt.multi_select("What records do you want to update (select 1 or more)?", zone.dns_records.all)
|
89
|
+
|
90
|
+
domains = configuration[:domains] = dns_records.map(&:record)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
95
|
+
def initialize_command
|
96
|
+
configuration_store.transaction do |configuration|
|
97
|
+
unless configuration[:content_command]
|
98
|
+
configuration[:content_command] = prompt.ask("What command to get content for record?", default: 'curl ipinfo.io/ip')
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
def update_domains
|
104
|
+
configuration_store.transaction do |configuration|
|
105
|
+
prompt.puts "Executing content command: #{configuration[:content_command]}"
|
106
|
+
content, status = Open3.capture2(configuration[:content_command])
|
107
|
+
|
108
|
+
unless status.success?
|
109
|
+
raise RuntimeError.new("Content command failed with non-zero output: #{status}")
|
110
|
+
end
|
111
|
+
|
112
|
+
unless zone = @connection.zones.find_by_id(configuration[:zone][:id])
|
113
|
+
raise RuntimeError.new("Couldn't load zone #{configuration[:zone].inspect} from API!")
|
114
|
+
end
|
115
|
+
|
116
|
+
domains = configuration[:domains]
|
117
|
+
|
118
|
+
content.chomp!
|
119
|
+
|
120
|
+
configuration[:domains].each do |record|
|
121
|
+
if record[:content] != content
|
122
|
+
puts "Content changed #{content.inspect}, updating record..."
|
123
|
+
|
124
|
+
domain = zone.dns_records.find_by_id(record[:id])
|
125
|
+
|
126
|
+
changes = {
|
127
|
+
type: domain.record[:type],
|
128
|
+
name: domain.record[:name],
|
129
|
+
content: content
|
130
|
+
}
|
131
|
+
|
132
|
+
response = domain.put(changes.to_json, content_type: 'application/json')
|
133
|
+
|
134
|
+
if response.successful?
|
135
|
+
puts "Updated domain content to #{content}."
|
136
|
+
record[:content] = content
|
137
|
+
else
|
138
|
+
puts "Failed to update domain content to #{content}: #{response.errors.join(', ')}!"
|
139
|
+
end
|
140
|
+
else
|
141
|
+
puts "Content hasn't changed."
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
return content
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
def invoke(program_name: File.basename($0))
|
150
|
+
if @options[:version]
|
151
|
+
puts VERSION
|
152
|
+
elsif @options[:help]
|
153
|
+
print_usage(program_name)
|
154
|
+
else
|
155
|
+
track_time do
|
156
|
+
connect!
|
157
|
+
|
158
|
+
initialize_zone
|
159
|
+
initialize_domains
|
160
|
+
initialize_command
|
161
|
+
|
162
|
+
update_domains
|
163
|
+
end
|
164
|
+
end
|
165
|
+
end
|
166
|
+
end
|
167
|
+
end
|
168
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
|
2
|
+
require 'cloudflare/dns/update/command'
|
3
|
+
|
4
|
+
RSpec.describe Cloudflare::DNS::Update::Command::Top, order: :defined do
|
5
|
+
include_context Cloudflare::RSpec::Connection
|
6
|
+
|
7
|
+
let(:configuration_path) {File.join(__dir__, 'test.yaml')}
|
8
|
+
|
9
|
+
subject{described_class.new(["-c", configuration_path])}
|
10
|
+
|
11
|
+
let(:zone) {connection.zones.all.first}
|
12
|
+
let(:name) {"dyndns"}
|
13
|
+
let(:qualified_name) {"dyndns.#{zone.record[:name]}"}
|
14
|
+
|
15
|
+
it "should create dns record" do
|
16
|
+
response = zone.dns_records.post({
|
17
|
+
type: "A",
|
18
|
+
name: name,
|
19
|
+
content: "127.0.0.1",
|
20
|
+
ttl: 240,
|
21
|
+
proxied: false
|
22
|
+
}.to_json, content_type: 'application/json')
|
23
|
+
|
24
|
+
expect(response).to be_successful
|
25
|
+
end
|
26
|
+
|
27
|
+
let(:dns_record) {zone.dns_records.find_by_name(qualified_name)}
|
28
|
+
|
29
|
+
it "should update dns record" do
|
30
|
+
subject.connection = connection
|
31
|
+
|
32
|
+
puts
|
33
|
+
|
34
|
+
subject.configuration_store.transaction do |configuration|
|
35
|
+
configuration[:content_command] = 'curl ipinfo.io/ip'
|
36
|
+
configuration[:zone] = zone.record
|
37
|
+
configuration[:domains] = [dns_record.record]
|
38
|
+
end
|
39
|
+
|
40
|
+
content = subject.update_domains
|
41
|
+
|
42
|
+
response = dns_record.get
|
43
|
+
|
44
|
+
expect(response.result[:content]).to be == content
|
45
|
+
end
|
46
|
+
|
47
|
+
it "should delete dns record" do
|
48
|
+
expect(dns_record.delete).to be_successful
|
49
|
+
end
|
50
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
if ENV['COVERAGE'] || ENV['TRAVIS']
|
3
|
+
begin
|
4
|
+
require 'simplecov'
|
5
|
+
|
6
|
+
SimpleCov.start do
|
7
|
+
add_filter "/spec/"
|
8
|
+
end
|
9
|
+
|
10
|
+
if ENV['TRAVIS']
|
11
|
+
require 'coveralls'
|
12
|
+
Coveralls.wear!
|
13
|
+
end
|
14
|
+
rescue LoadError
|
15
|
+
warn "Could not load simplecov: #{$!}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
require "bundler/setup"
|
20
|
+
require "cloudflare/rspec/connection"
|
21
|
+
|
22
|
+
RSpec.configure do |config|
|
23
|
+
# Enable flags like --only-failures and --next-failure
|
24
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
25
|
+
|
26
|
+
config.expect_with :rspec do |c|
|
27
|
+
c.syntax = :expect
|
28
|
+
end
|
29
|
+
end
|
metadata
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cloudflare-dns-update
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: samovar
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
|
-
type: :
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
@@ -25,48 +25,76 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: tty-prompt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
34
|
-
type: :
|
33
|
+
version: 0.12.0
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 0.12.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: cloudflare
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: '3.0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
62
|
-
type: :
|
61
|
+
version: '3.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '3.6'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.3'
|
76
|
+
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - "~>"
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
69
|
-
|
82
|
+
version: '1.3'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: "\tProvides a client tool for updating Cloudflare records, with a specific\n\temphasis
|
70
98
|
on updating IP addresses for domain records. This provides\n\tdyndns-like functionality.\n"
|
71
99
|
email:
|
72
100
|
- samuel.williams@oriontransfer.co.nz
|
@@ -76,13 +104,18 @@ extensions: []
|
|
76
104
|
extra_rdoc_files: []
|
77
105
|
files:
|
78
106
|
- ".gitignore"
|
107
|
+
- ".rspec"
|
108
|
+
- ".travis.yml"
|
79
109
|
- Gemfile
|
80
110
|
- README.md
|
81
111
|
- Rakefile
|
82
112
|
- bin/cloudflare-dns-update
|
83
113
|
- cloudflare-dns-update.gemspec
|
84
114
|
- lib/cloudflare/dns/update.rb
|
115
|
+
- lib/cloudflare/dns/update/command.rb
|
85
116
|
- lib/cloudflare/dns/update/version.rb
|
117
|
+
- spec/cloudflare/dns/update/command_spec.rb
|
118
|
+
- spec/spec_helper.rb
|
86
119
|
homepage: ''
|
87
120
|
licenses:
|
88
121
|
- MIT
|
@@ -103,8 +136,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
136
|
version: '0'
|
104
137
|
requirements: []
|
105
138
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
139
|
+
rubygems_version: 2.6.10
|
107
140
|
signing_key:
|
108
141
|
specification_version: 4
|
109
|
-
summary: A dyndns client for
|
110
|
-
test_files:
|
142
|
+
summary: A dyndns client for Cloudflare.
|
143
|
+
test_files:
|
144
|
+
- spec/cloudflare/dns/update/command_spec.rb
|
145
|
+
- spec/spec_helper.rb
|