rgdaddy 0.1.1
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 +7 -0
- data/.gitignore +21 -0
- data/.travis.yml +3 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +17 -0
- data/LICENSE.txt +21 -0
- data/README.md +69 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/lib/rgdaddy.rb +247 -0
- data/lib/rgdaddy/version.rb +3 -0
- data/rgdaddy.gemspec +28 -0
- metadata +114 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: c368c911bf93b86467f9ba432be526267ea85995
|
|
4
|
+
data.tar.gz: d841e5057cc36c76317e90ec6c65e0d837133d53
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 69e9dcc4f4b7d1d5a70d7b5c5588ea6d80faf8737ecb7d12b38081432db50f9282fc6e6e80b9363a5a644012e8c3b0fb4f5e8083845395ea69eb4affb7605093
|
|
7
|
+
data.tar.gz: da167900d91f7e9138eddf8d757c066135a042e742f1788ffec3f91e819ef0e9b5ea1563c8009bb17fa188f13dfff7ad647fe90d588f73e2d7ce58e6005272f9
|
data/.gitignore
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
|
|
2
|
+
#
|
|
3
|
+
# If you find yourself ignoring temporary files generated by your text editor
|
|
4
|
+
# or operating system, you probably want to add a global ignore instead:
|
|
5
|
+
# git config --global core.excludesfile '~/.gitignore_global'
|
|
6
|
+
|
|
7
|
+
# Ignore bundler config.
|
|
8
|
+
/.bundle
|
|
9
|
+
|
|
10
|
+
# File backups
|
|
11
|
+
*~
|
|
12
|
+
|
|
13
|
+
# Gets created when joe crashes
|
|
14
|
+
DEADJOE
|
|
15
|
+
|
|
16
|
+
# Ignore ruby-version and ruby-gem
|
|
17
|
+
.ruby-gemset
|
|
18
|
+
.ruby-version
|
|
19
|
+
|
|
20
|
+
# pkg Dir
|
|
21
|
+
pkg/
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Contributor Code of Conduct
|
|
2
|
+
|
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
|
4
|
+
|
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
|
|
6
|
+
|
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
|
8
|
+
|
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
|
10
|
+
|
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
|
12
|
+
|
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015 sage
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# RGDaddy
|
|
2
|
+
|
|
3
|
+
Welcome to RGDaddy gem! This gem allows you to interact with GoDaddy DNS Panel.
|
|
4
|
+
At the beginning was created as an option to use GoDaddy as a Dynamic DNS Server.
|
|
5
|
+
|
|
6
|
+
Actualy it only suport modifying A records.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Add this line to your application's Gemfile:
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
gem 'rgdaddy'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
And then execute:
|
|
18
|
+
|
|
19
|
+
$ bundle
|
|
20
|
+
|
|
21
|
+
Or install it yourself as:
|
|
22
|
+
|
|
23
|
+
$ gem install rgdaddy
|
|
24
|
+
|
|
25
|
+
## Usage
|
|
26
|
+
|
|
27
|
+
```ruby
|
|
28
|
+
require 'rgdaddy'
|
|
29
|
+
|
|
30
|
+
# Create a RGDaddy object
|
|
31
|
+
r=RGDaddy::RGDaddy.new;
|
|
32
|
+
|
|
33
|
+
# Then login to GoDaddy
|
|
34
|
+
r.login('RGDADDY_USER','RGDADDY_PASSWORD');
|
|
35
|
+
|
|
36
|
+
# Recover GoDaddy DNS A records as RGDaddy::Record array
|
|
37
|
+
result=r.get_dns_records("ZONE_NAME.COM","A")
|
|
38
|
+
|
|
39
|
+
# Print the array
|
|
40
|
+
result.each { |f|
|
|
41
|
+
puts f
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
# Update DNS records with update_dns_record(ZONE_NAME,RECORD_ID,HOSTNAME,IP,TTL,RECORD_TYPE)
|
|
45
|
+
r.update_dns_record("ZONE_NAME.com",7,"A_HOSTNAME","127.0.0.1",600,"A")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Close GoDaddy session
|
|
49
|
+
r.logout()
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Development
|
|
54
|
+
|
|
55
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
56
|
+
`bin/console` for an interactive prompt that will allow you to experiment.
|
|
57
|
+
|
|
58
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
59
|
+
To release a new version, update the version number in `version.rb`, and then
|
|
60
|
+
run `bundle exec rake release` to create a git tag for the version, push git
|
|
61
|
+
commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
62
|
+
|
|
63
|
+
## Contributing
|
|
64
|
+
|
|
65
|
+
1. Fork it ( https://github.com/xpanadero/rgdaddy/fork )
|
|
66
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
|
67
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
|
68
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
|
69
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "rgdaddy"
|
|
5
|
+
|
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
8
|
+
|
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
10
|
+
# require "pry"
|
|
11
|
+
# Pry.start
|
|
12
|
+
|
|
13
|
+
require "irb"
|
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/rgdaddy.rb
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
require "rgdaddy/version"
|
|
2
|
+
require "net/https"
|
|
3
|
+
require "uri"
|
|
4
|
+
require 'nokogiri'
|
|
5
|
+
|
|
6
|
+
module RGDaddy
|
|
7
|
+
|
|
8
|
+
class RGDaddyException < RuntimeError
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
class RGDaddy
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@@gd_sso_login_url = "https://sso.godaddy.com/v1/"
|
|
15
|
+
@@gd_dns_url = "https://dns.godaddy.com"
|
|
16
|
+
@@gd_zonefile_url = 'https://dns.godaddy.com/ZoneFile.aspx?zoneType=0&sa=&zone='
|
|
17
|
+
@@gd_zonefile_edit_record_url = 'https://dns.godaddy.com/ZoneFile_WS.asmx/EditRecordField'
|
|
18
|
+
@@gd_zonefile_save_record_url = 'https://dns.godaddy.com/ZoneFile_WS.asmx/SaveRecords'
|
|
19
|
+
@@gd_zonefile_logout_url = "https://idp.godaddy.com/logout.aspx?spkey=authapigd1&from_idp=1&path=%2f&app=&realm=idp"
|
|
20
|
+
|
|
21
|
+
@@logged_in = false
|
|
22
|
+
@@auth_cookies = "";
|
|
23
|
+
@@gd_nonce = "";
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def login(user = nil, password = nil)
|
|
27
|
+
|
|
28
|
+
uri = URI.parse(@@gd_sso_login_url)
|
|
29
|
+
https = Net::HTTP.new(uri.host, uri.port)
|
|
30
|
+
https.use_ssl = true
|
|
31
|
+
request = Net::HTTP::Post.new(uri.request_uri,default_headers)
|
|
32
|
+
|
|
33
|
+
request.set_form_data(
|
|
34
|
+
'app' => 'fos',
|
|
35
|
+
'realm' => 'idp',
|
|
36
|
+
'name' => user,
|
|
37
|
+
'password' => password
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
response = https.request(request)
|
|
41
|
+
cookies_string=response.get_fields('set-cookie').collect{ |x| x.split(';')[0] }.join('; ')
|
|
42
|
+
|
|
43
|
+
@@auth_cookies =cookies_string
|
|
44
|
+
|
|
45
|
+
raise RGDaddyException, "Invalid authentication credentials" if !cookies_string.match(/auth\_idp/)
|
|
46
|
+
|
|
47
|
+
@@logged_in = true
|
|
48
|
+
|
|
49
|
+
# Follow 302 redirect and collect all the authentication cookies
|
|
50
|
+
while response.code == "302"
|
|
51
|
+
|
|
52
|
+
login=URI.parse(response.header['location'])
|
|
53
|
+
|
|
54
|
+
https = Net::HTTP.new(login.host, login.port)
|
|
55
|
+
https.use_ssl = true
|
|
56
|
+
|
|
57
|
+
request = Net::HTTP::Get.new(login.request_uri,default_headers)
|
|
58
|
+
response = https.request(request)
|
|
59
|
+
|
|
60
|
+
cookies_string=response.get_fields('set-cookie').collect{ |x| x.split(';')[0] }.join('; ')
|
|
61
|
+
|
|
62
|
+
@@auth_cookies << "; " << cookies_string
|
|
63
|
+
|
|
64
|
+
end
|
|
65
|
+
return true
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def logout
|
|
69
|
+
|
|
70
|
+
raise RGDaddyException, "Not logged in, please call login method first" if !@@logged_in
|
|
71
|
+
|
|
72
|
+
uri= URI.parse(@@gd_zonefile_logout_url)
|
|
73
|
+
|
|
74
|
+
https = Net::HTTP.new(uri.host, uri.port)
|
|
75
|
+
https.use_ssl = true
|
|
76
|
+
|
|
77
|
+
request = Net::HTTP::Get.new(uri.request_uri,default_headers)
|
|
78
|
+
response = https.request(request)
|
|
79
|
+
|
|
80
|
+
@@auth_cookies = "";
|
|
81
|
+
@@logged_in = false;
|
|
82
|
+
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def get_dns_records(zone, type ="A")
|
|
87
|
+
|
|
88
|
+
raise RGDaddyException, "Not logged in, please call login method first" if !@@logged_in
|
|
89
|
+
raise RGDaddyException, "Only A record type is currently supported" if type != "A"
|
|
90
|
+
|
|
91
|
+
finish = false
|
|
92
|
+
uri= URI.parse(@@gd_zonefile_url + zone)
|
|
93
|
+
while not finish
|
|
94
|
+
|
|
95
|
+
https = Net::HTTP.new(uri.host, uri.port)
|
|
96
|
+
https.use_ssl = true
|
|
97
|
+
|
|
98
|
+
request = Net::HTTP::Get.new(uri.request_uri,default_headers)
|
|
99
|
+
response = https.request(request)
|
|
100
|
+
|
|
101
|
+
if response.get_fields('set-cookie') != nil
|
|
102
|
+
cookies_string=response.get_fields('set-cookie').collect{ |x| x.split(';')[0] }.join('; ')
|
|
103
|
+
@@auth_cookies << "; " << cookies_string
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
if response.code == "302"
|
|
107
|
+
uri=URI.parse(response.header['location'])
|
|
108
|
+
if uri.host == nil
|
|
109
|
+
uri=URI.parse(@@gd_dns_url + response.header['location'])
|
|
110
|
+
end
|
|
111
|
+
else
|
|
112
|
+
finish = true
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
parse_nonce(response.body)
|
|
116
|
+
parse_dns_zone(response.body,zone)
|
|
117
|
+
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
def update_dns_record(zone,id,name,ip,ttl,type = "A")
|
|
122
|
+
|
|
123
|
+
raise RGDaddyException, "Not logged in, please call login method first" if !@@logged_in
|
|
124
|
+
raise RGDaddyException, "Only A record type is currently supported" if type != "A"
|
|
125
|
+
|
|
126
|
+
uri = URI.parse(@@gd_zonefile_edit_record_url)
|
|
127
|
+
https = Net::HTTP.new(uri.host, uri.port)
|
|
128
|
+
https.use_ssl = true
|
|
129
|
+
request = Net::HTTP::Post.new(uri.request_uri,default_headers("json"))
|
|
130
|
+
|
|
131
|
+
request.body =
|
|
132
|
+
"{\"sInput\":\"<PARAMS>\
|
|
133
|
+
<PARAM name=\\\"type\\\" value=\\\"arecord\\\" />\
|
|
134
|
+
<PARAM name=\\\"fieldName\\\" value=\\\"data\\\" />\
|
|
135
|
+
<PARAM name=\\\"fieldValue\\\" value=\\\"#{ip}\\\" />\
|
|
136
|
+
<PARAM name=\\\"lstIndex\\\" value=\\\"#{id}\\\" />\
|
|
137
|
+
</PARAMS>\"}"
|
|
138
|
+
|
|
139
|
+
response = https.request(request)
|
|
140
|
+
|
|
141
|
+
raise RGDaddyException, "Error on EditRecord call, maybe GoDaddy has made changes on the JSON request" if !response.body.match(/SUCCESS/)
|
|
142
|
+
|
|
143
|
+
uri = URI.parse(@@gd_zonefile_save_record_url)
|
|
144
|
+
https = Net::HTTP.new(uri.host, uri.port)
|
|
145
|
+
https.use_ssl = true
|
|
146
|
+
request = Net::HTTP::Post.new(uri.request_uri,default_headers("json"))
|
|
147
|
+
|
|
148
|
+
request.body =
|
|
149
|
+
"{\"sInput\":\"<PARAMS>\
|
|
150
|
+
<PARAM name=\\\"domainName\\\" value=\\\"#{zone}\\\" />\
|
|
151
|
+
<PARAM name=\\\"zoneType\\\" value=\\\"0\\\" />\
|
|
152
|
+
<PARAM name=\\\"aRecEditCount\\\" value=\\\"1\\\" />\
|
|
153
|
+
<PARAM name=\\\"aRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
154
|
+
<PARAM name=\\\"aRecEdit0Index\\\" value=\\\"#{id}\\\" />\
|
|
155
|
+
<PARAM name=\\\"cnameRecEditCount\\\" value=\\\"0\\\" />\
|
|
156
|
+
<PARAM name=\\\"cnameRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
157
|
+
<PARAM name=\\\"mxRecEditCount\\\" value=\\\"0\\\" />\
|
|
158
|
+
<PARAM name=\\\"mxRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
159
|
+
<PARAM name=\\\"txtRecEditCount\\\" value=\\\"0\\\" />\
|
|
160
|
+
<PARAM name=\\\"txtRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
161
|
+
<PARAM name=\\\"srvRecEditCount\\\" value=\\\"0\\\" />\
|
|
162
|
+
<PARAM name=\\\"srvRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
163
|
+
<PARAM name=\\\"aaaaRecEditCount\\\" value=\\\"0\\\" />\
|
|
164
|
+
<PARAM name=\\\"aaaaRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
165
|
+
<PARAM name=\\\"soaRecEditCount\\\" value=\\\"0\\\" />\
|
|
166
|
+
<PARAM name=\\\"soaRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
167
|
+
<PARAM name=\\\"nsRecEditCount\\\" value=\\\"0\\\" />\
|
|
168
|
+
<PARAM name=\\\"nsRecDeleteCount\\\" value=\\\"0\\\" />\
|
|
169
|
+
<PARAM name=\\\"nonce\\\" value=\\\"#{@@gd_nonce}\\\" />\
|
|
170
|
+
</PARAMS>\"}"
|
|
171
|
+
|
|
172
|
+
response = https.request(request)
|
|
173
|
+
|
|
174
|
+
raise RGDaddyException, "Error on SaveRecord call, maybe GoDaddy has made changes on the JSON request" if !response.body.match(/SUCCESS/)
|
|
175
|
+
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
private
|
|
179
|
+
def default_headers(type = "w")
|
|
180
|
+
|
|
181
|
+
headers = {
|
|
182
|
+
'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36',
|
|
183
|
+
'Cookie' => @@auth_cookies,
|
|
184
|
+
'Referer' => @@gd_zonefile_url
|
|
185
|
+
}
|
|
186
|
+
if type == "json"
|
|
187
|
+
headers.merge!({
|
|
188
|
+
"Content-Type" => "application/json",
|
|
189
|
+
"Accept" => "application/json",
|
|
190
|
+
})
|
|
191
|
+
end
|
|
192
|
+
return headers
|
|
193
|
+
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
def parse_dns_zone(html_zone,zone, type = "A")
|
|
197
|
+
#page = Nokogiri::HTML(open("outgd.html"), nil, 'utf-8');
|
|
198
|
+
page = Nokogiri::HTML(html_zone)
|
|
199
|
+
|
|
200
|
+
records_array = []
|
|
201
|
+
|
|
202
|
+
page.xpath("//table[contains(@id,'tblARecords')]/tr").map do |item|
|
|
203
|
+
name = item.at_xpath(".//input[contains(@id,'txtHost')]")
|
|
204
|
+
if name
|
|
205
|
+
record = Record.new()
|
|
206
|
+
record.zone = zone
|
|
207
|
+
record.id = name['id'].match(/tblARecords\_(\d+)\_txtHost/)[1].to_i
|
|
208
|
+
record.name = name['value']
|
|
209
|
+
record.ip = item.at_xpath(".//input[contains(@id,'txtPointsto')]")['value']
|
|
210
|
+
record.ttl = item.at_xpath(".//input[contains(@id,'TTL')]")['value']
|
|
211
|
+
records_array.push(record)
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
return records_array
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
def parse_nonce(html_zone)
|
|
218
|
+
@@gd_nonce=html_zone.match(/nonce\=\"(\w+)\"\;/)[1]
|
|
219
|
+
raise RGDaddyException, "Error parsing GoDaddy nonce, maybe a change has made on the API" if @@gd_nonce == nil
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
class Record
|
|
225
|
+
attr_accessor :zone,:id,:name,:ip,:ttl
|
|
226
|
+
|
|
227
|
+
def initalize()
|
|
228
|
+
set(nil,-1,nil,nil,-1)
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def set(zone,id,name,ip,ttl)
|
|
232
|
+
# Instance variables
|
|
233
|
+
@zone = zone;
|
|
234
|
+
@id = id;
|
|
235
|
+
@name = name;
|
|
236
|
+
@ip = ip;
|
|
237
|
+
@ttl = ttl;
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
def to_s
|
|
241
|
+
"Zone: #{@zone} - ID: #{@id} - Name: #{@name} - IP: #{@ip} - TTL: #{@ttl} seconds"
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
end
|
|
247
|
+
|
data/rgdaddy.gemspec
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'rgdaddy/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |spec|
|
|
7
|
+
spec.name = "rgdaddy"
|
|
8
|
+
spec.version = RGDaddy::VERSION
|
|
9
|
+
spec.authors = ["Xavier Panadero Lleonart"]
|
|
10
|
+
spec.email = ["xpanadero@gmail.com"]
|
|
11
|
+
|
|
12
|
+
spec.summary = %{Ruby GoDaddy DNS Client}
|
|
13
|
+
spec.description = %q{A gem that allows you to modify GoDaddy DNS A Records. GoDaddy active account and DNS zone is required}
|
|
14
|
+
spec.homepage = "https://github.com/xpanadero"
|
|
15
|
+
spec.license = "MIT"
|
|
16
|
+
spec.required_ruby_version = '~> 2.0'
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
21
|
+
spec.require_paths = ["lib"]
|
|
22
|
+
|
|
23
|
+
spec.add_dependency 'nokogiri', '>= 1.6.6.2'
|
|
24
|
+
|
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.8"
|
|
26
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
|
27
|
+
spec.add_development_dependency 'minitest', '~> 5.0.0'
|
|
28
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: rgdaddy
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Xavier Panadero Lleonart
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: bin
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: nokogiri
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: 1.6.6.2
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: 1.6.6.2
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - "~>"
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '1.8'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - "~>"
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '1.8'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - "~>"
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '10.0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - "~>"
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '10.0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: minitest
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - "~>"
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: 5.0.0
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - "~>"
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: 5.0.0
|
|
69
|
+
description: A gem that allows you to modify GoDaddy DNS A Records. GoDaddy active
|
|
70
|
+
account and DNS zone is required
|
|
71
|
+
email:
|
|
72
|
+
- xpanadero@gmail.com
|
|
73
|
+
executables: []
|
|
74
|
+
extensions: []
|
|
75
|
+
extra_rdoc_files: []
|
|
76
|
+
files:
|
|
77
|
+
- ".gitignore"
|
|
78
|
+
- ".travis.yml"
|
|
79
|
+
- CODE_OF_CONDUCT.md
|
|
80
|
+
- Gemfile
|
|
81
|
+
- Gemfile.lock
|
|
82
|
+
- LICENSE.txt
|
|
83
|
+
- README.md
|
|
84
|
+
- Rakefile
|
|
85
|
+
- bin/console
|
|
86
|
+
- bin/setup
|
|
87
|
+
- lib/rgdaddy.rb
|
|
88
|
+
- lib/rgdaddy/version.rb
|
|
89
|
+
- rgdaddy.gemspec
|
|
90
|
+
homepage: https://github.com/xpanadero
|
|
91
|
+
licenses:
|
|
92
|
+
- MIT
|
|
93
|
+
metadata: {}
|
|
94
|
+
post_install_message:
|
|
95
|
+
rdoc_options: []
|
|
96
|
+
require_paths:
|
|
97
|
+
- lib
|
|
98
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
99
|
+
requirements:
|
|
100
|
+
- - "~>"
|
|
101
|
+
- !ruby/object:Gem::Version
|
|
102
|
+
version: '2.0'
|
|
103
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
|
+
requirements:
|
|
105
|
+
- - ">="
|
|
106
|
+
- !ruby/object:Gem::Version
|
|
107
|
+
version: '0'
|
|
108
|
+
requirements: []
|
|
109
|
+
rubyforge_project:
|
|
110
|
+
rubygems_version: 2.4.5
|
|
111
|
+
signing_key:
|
|
112
|
+
specification_version: 4
|
|
113
|
+
summary: Ruby GoDaddy DNS Client
|
|
114
|
+
test_files: []
|