dynect 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/dynect.rb +27 -0
  2. metadata +46 -53
@@ -124,6 +124,30 @@ class Dynect
124
124
  response.records.first
125
125
  end
126
126
 
127
+ def list_nodes(zone, options = {})
128
+ args = @creds.merge("zone" => zone)
129
+ args.merge!(options)
130
+
131
+ response = @driver.NodeGet args
132
+ check_for_errors("when listing nodes", response)
133
+ end
134
+
135
+ def add_node(node, zone, options ={})
136
+ args = @creds.merge("zone" => zone, "node" => "#{node}.#{zone}")
137
+ args.merge!(options)
138
+
139
+ response = @driver.NodeAdd args
140
+ check_for_errors("when adding a node", response)
141
+ end
142
+
143
+ def delete_node(node, zone, options ={})
144
+ args = @creds.merge("zone" => zone, "node" => "#{node}.#{zone}")
145
+ args.merge!(options)
146
+
147
+ response = @driver.NodeDelete args
148
+ check_for_errors("when deleting a node", response)
149
+ end
150
+
127
151
  private
128
152
 
129
153
  def check_for_errors(message, response)
@@ -144,6 +168,9 @@ private
144
168
  @driver.add_method("RecordAdd", "args")
145
169
  @driver.add_method("RecordUpdate", "args")
146
170
  @driver.add_method("RecordDelete", "args")
171
+ @driver.add_method("NodeGet", "args")
172
+ @driver.add_method("NodeAdd", "args")
173
+ @driver.add_method("NodeDelete", "args")
147
174
  end
148
175
 
149
176
  end
metadata CHANGED
@@ -1,74 +1,67 @@
1
1
  --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.4
3
+ specification_version: 1
2
4
  name: dynect
3
5
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
6
+ version: 0.0.2
7
+ date: 2008-01-03 00:00:00 -06:00
8
+ summary: Simple wrapper for Dynect SOAP API.
9
+ require_paths:
10
+ - lib
11
+ email: dave@obtiva.com
12
+ homepage: http://rubyforge.org/projects/dynect/
13
+ rubyforge_project: dynect
14
+ description: Simple wrapper for Dynect SOAP API.
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
5
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
6
29
  authors:
7
30
  - Dave Hoover
8
31
  - Colin Harris
9
- autorequire:
10
- bindir: bin
11
- cert_chain: []
32
+ files:
33
+ - lib/dynect.rb
34
+ test_files:
35
+ - spec/dynec_a_record_spec.rb
36
+ - spec/dynec_cname_record_spec.rb
37
+ - spec/dynec_soa_record_spec.rb
38
+ - spec/dynect_zone_spec.rb
39
+ rdoc_options: []
40
+
41
+ extra_rdoc_files: []
42
+
43
+ executables: []
44
+
45
+ extensions: []
46
+
47
+ requirements: []
12
48
 
13
- date: 2008-01-02 00:00:00 -06:00
14
- default_executable:
15
49
  dependencies:
16
50
  - !ruby/object:Gem::Dependency
17
51
  name: soap4r
18
52
  version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
53
+ version_requirements: !ruby/object:Gem::Version::Requirement
20
54
  requirements:
21
- - - ">="
55
+ - - ">"
22
56
  - !ruby/object:Gem::Version
23
- version: "0"
57
+ version: 0.0.0
24
58
  version:
25
59
  - !ruby/object:Gem::Dependency
26
60
  name: rspec
27
61
  version_requirement:
28
- version_requirements: !ruby/object:Gem::Requirement
62
+ version_requirements: !ruby/object:Gem::Version::Requirement
29
63
  requirements:
30
- - - ">="
64
+ - - ">"
31
65
  - !ruby/object:Gem::Version
32
- version: "0"
66
+ version: 0.0.0
33
67
  version:
34
- description: Simple wrapper for Dynect SOAP API.
35
- email: dave@obtiva.com
36
- executables: []
37
-
38
- extensions: []
39
-
40
- extra_rdoc_files: []
41
-
42
- files:
43
- - lib/dynect.rb
44
- has_rdoc: true
45
- homepage: http://rubyforge.org/projects/dynect/
46
- post_install_message:
47
- rdoc_options: []
48
-
49
- require_paths:
50
- - lib
51
- required_ruby_version: !ruby/object:Gem::Requirement
52
- requirements:
53
- - - ">="
54
- - !ruby/object:Gem::Version
55
- version: "0"
56
- version:
57
- required_rubygems_version: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: "0"
62
- version:
63
- requirements: []
64
-
65
- rubyforge_project: dynect
66
- rubygems_version: 1.0.0
67
- signing_key:
68
- specification_version: 2
69
- summary: Simple wrapper for Dynect SOAP API.
70
- test_files:
71
- - spec/dynec_a_record_spec.rb
72
- - spec/dynec_cname_record_spec.rb
73
- - spec/dynec_soa_record_spec.rb
74
- - spec/dynect_zone_spec.rb