dnsdeploy 0.0.1 → 0.0.2
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 +4 -4
- data/History.md +10 -0
- data/lib/dnsdeploy/base.rb +9 -8
- data/lib/dnsdeploy/local.rb +3 -3
- data/lib/dnsdeploy/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c9d6cfa6925af281c9d41a6becc2518aa531aa0
|
4
|
+
data.tar.gz: 5680902a6b4c3d9f5e16df8eec07a4fd447ca7bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84462a70458d3d0a067ce5ddb984eec9cb8e6ea98f5585ce17771b2371114219bc22305d5c0724c8aba82adc74b7eeee239e68379ecc67478a886aff96061350
|
7
|
+
data.tar.gz: e1852dfcd43b1587fbe75f3f7daed1f72b0fef0988ba6abaef8206b1c2893556e7b327b2339507dd84b14b11421ba50c114de972896a0501d4e442df7f8d9413
|
data/History.md
ADDED
data/lib/dnsdeploy/base.rb
CHANGED
@@ -1,18 +1,19 @@
|
|
1
1
|
module Dnsdeploy
|
2
2
|
class Base
|
3
|
-
def initialize(
|
4
|
-
@
|
3
|
+
def initialize(records_file_path)
|
4
|
+
@records_file_path = records_file_path
|
5
|
+
@local_records_json = File.new(records_file_path).read
|
5
6
|
end
|
6
7
|
|
7
|
-
def self.update_records(
|
8
|
-
self.new(
|
8
|
+
def self.update_records(records_file_path)
|
9
|
+
self.new(records_file_path).update_records
|
9
10
|
end
|
10
11
|
|
11
12
|
def validate
|
12
|
-
JSON.load(@
|
13
|
-
puts "#{@
|
13
|
+
JSON.load(@local_records_json)
|
14
|
+
puts "#{@records_file_path} is valid json".green
|
14
15
|
rescue => e
|
15
|
-
puts "unable to parse #{@
|
16
|
+
puts "unable to parse #{@records_file_path}".red
|
16
17
|
end
|
17
18
|
|
18
19
|
def update_records
|
@@ -39,7 +40,7 @@ module Dnsdeploy
|
|
39
40
|
end
|
40
41
|
|
41
42
|
def local
|
42
|
-
@local ||= Dnsdeploy::Local.new(@
|
43
|
+
@local ||= Dnsdeploy::Local.new(@local_records_json)
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
data/lib/dnsdeploy/local.rb
CHANGED
@@ -2,8 +2,8 @@ require 'singleton'
|
|
2
2
|
|
3
3
|
module Dnsdeploy
|
4
4
|
class Local
|
5
|
-
def initialize(
|
6
|
-
@
|
5
|
+
def initialize(local_records_json)
|
6
|
+
@local_records_json = local_records_json
|
7
7
|
end
|
8
8
|
|
9
9
|
def all_records
|
@@ -31,7 +31,7 @@ module Dnsdeploy
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def json
|
34
|
-
@json ||= JSON.load(@
|
34
|
+
@json ||= JSON.load(@local_records_json)
|
35
35
|
end
|
36
36
|
|
37
37
|
def dnsimple_domain(zone)
|
data/lib/dnsdeploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dnsdeploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- beanieboi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dnsimple-ruby
|
@@ -91,6 +91,7 @@ files:
|
|
91
91
|
- ".gitignore"
|
92
92
|
- ".rspec"
|
93
93
|
- Gemfile
|
94
|
+
- History.md
|
94
95
|
- LICENSE.txt
|
95
96
|
- README.md
|
96
97
|
- Rakefile
|