epp-client 0.0.3 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +24 -0
- data/.simplecov +16 -0
- data/.travis.yml +11 -0
- data/.yardopts +4 -0
- data/Gemfile +20 -0
- data/Gemfile.lock +51 -0
- data/LICENSE +1 -1
- data/README.md +75 -0
- data/Rakefile +2 -37
- data/epp-client.gemspec +15 -58
- data/gemfiles/Gemfile.ruby18 +13 -0
- data/lib/epp-client.rb +94 -7
- data/lib/epp-client/client.rb +117 -20
- data/lib/epp-client/commands/check.rb +11 -0
- data/lib/epp-client/commands/command.rb +24 -0
- data/lib/epp-client/commands/create.rb +11 -0
- data/lib/epp-client/commands/delete.rb +11 -0
- data/lib/epp-client/commands/info.rb +11 -0
- data/lib/epp-client/commands/login.rb +40 -0
- data/lib/epp-client/commands/logout.rb +11 -0
- data/lib/epp-client/commands/poll.rb +28 -0
- data/lib/epp-client/commands/read_write_command.rb +18 -0
- data/lib/epp-client/commands/renew.rb +11 -0
- data/lib/epp-client/commands/transfer.rb +25 -0
- data/lib/epp-client/commands/update.rb +11 -0
- data/lib/epp-client/contact/check.rb +23 -0
- data/lib/epp-client/contact/check_response.rb +22 -0
- data/lib/epp-client/contact/command.rb +87 -0
- data/lib/epp-client/contact/create.rb +34 -0
- data/lib/epp-client/contact/create_response.rb +14 -0
- data/lib/epp-client/contact/delete.rb +21 -0
- data/lib/epp-client/contact/delete_response.rb +9 -0
- data/lib/epp-client/contact/info.rb +21 -0
- data/lib/epp-client/contact/info_response.rb +74 -0
- data/lib/epp-client/contact/response.rb +34 -0
- data/lib/epp-client/contact/transfer.rb +21 -0
- data/lib/epp-client/contact/transfer_response.rb +26 -0
- data/lib/epp-client/contact/update.rb +80 -0
- data/lib/epp-client/contact/update_response.rb +9 -0
- data/lib/epp-client/domain/check.rb +23 -0
- data/lib/epp-client/domain/check_response.rb +22 -0
- data/lib/epp-client/domain/command.rb +92 -0
- data/lib/epp-client/domain/create.rb +49 -0
- data/lib/epp-client/domain/create_response.rb +17 -0
- data/lib/epp-client/domain/delete.rb +21 -0
- data/lib/epp-client/domain/delete_response.rb +9 -0
- data/lib/epp-client/domain/info.rb +21 -0
- data/lib/epp-client/domain/info_response.rb +66 -0
- data/lib/epp-client/domain/renew.rb +34 -0
- data/lib/epp-client/domain/renew_response.rb +14 -0
- data/lib/epp-client/domain/response.rb +34 -0
- data/lib/epp-client/domain/transfer.rb +27 -0
- data/lib/epp-client/domain/transfer_response.rb +29 -0
- data/lib/epp-client/domain/update.rb +81 -0
- data/lib/epp-client/domain/update_response.rb +9 -0
- data/lib/epp-client/host/check.rb +23 -0
- data/lib/epp-client/host/check_response.rb +22 -0
- data/lib/epp-client/host/command.rb +47 -0
- data/lib/epp-client/host/create.rb +24 -0
- data/lib/epp-client/host/create_response.rb +14 -0
- data/lib/epp-client/host/delete.rb +21 -0
- data/lib/epp-client/host/delete_response.rb +9 -0
- data/lib/epp-client/host/info.rb +21 -0
- data/lib/epp-client/host/info_response.rb +42 -0
- data/lib/epp-client/host/response.rb +34 -0
- data/lib/epp-client/host/update.rb +76 -0
- data/lib/epp-client/host/update_response.rb +9 -0
- data/lib/epp-client/request.rb +29 -74
- data/lib/epp-client/requests/abstract.rb +30 -0
- data/lib/epp-client/requests/command.rb +28 -0
- data/lib/epp-client/requests/extension.rb +28 -0
- data/lib/epp-client/requests/hello.rb +12 -0
- data/lib/epp-client/response.rb +45 -8
- data/lib/epp-client/response_helper.rb +25 -0
- data/lib/epp-client/server.rb +167 -63
- data/lib/epp-client/testing.rb +59 -0
- data/lib/epp-client/version.rb +3 -0
- data/lib/epp-client/xml_helper.rb +71 -0
- data/test/commands/test_check_command.rb +33 -0
- data/test/commands/test_create_command.rb +53 -0
- data/test/commands/test_delete_command.rb +28 -0
- data/test/commands/test_info_command.rb +28 -0
- data/test/commands/test_login_command.rb +56 -0
- data/test/commands/test_logout_command.rb +22 -0
- data/test/commands/test_poll_command.rb +54 -0
- data/test/commands/test_renew_command.rb +39 -0
- data/test/commands/test_transfer_command.rb +37 -0
- data/test/commands/test_update_command.rb +60 -0
- data/test/contact/test_contact_check.rb +33 -0
- data/test/contact/test_contact_check_response.rb +38 -0
- data/test/contact/test_contact_create.rb +70 -0
- data/test/contact/test_contact_create_response.rb +33 -0
- data/test/contact/test_contact_delete.rb +28 -0
- data/test/contact/test_contact_delete_response.rb +23 -0
- data/test/contact/test_contact_info.rb +28 -0
- data/test/contact/test_contact_info_response.rb +100 -0
- data/test/contact/test_contact_transfer.rb +28 -0
- data/test/contact/test_contact_transfer_response.rb +100 -0
- data/test/contact/test_contact_update.rb +83 -0
- data/test/contact/test_contact_update_response.rb +23 -0
- data/test/domain/test_domain_check.rb +33 -0
- data/test/domain/test_domain_check_response.rb +38 -0
- data/test/domain/test_domain_create.rb +53 -0
- data/test/domain/test_domain_create_response.rb +39 -0
- data/test/domain/test_domain_delete.rb +28 -0
- data/test/domain/test_domain_delete_response.rb +23 -0
- data/test/domain/test_domain_info.rb +28 -0
- data/test/domain/test_domain_info_response.rb +107 -0
- data/test/domain/test_domain_renew.rb +39 -0
- data/test/domain/test_domain_renew_response.rb +32 -0
- data/test/domain/test_domain_transfer.rb +37 -0
- data/test/domain/test_domain_transfer_response.rb +112 -0
- data/test/domain/test_domain_update.rb +73 -0
- data/test/domain/test_domain_update_response.rb +23 -0
- data/test/fixtures/responses/contact/check.xml +27 -0
- data/test/fixtures/responses/contact/create.xml +19 -0
- data/test/fixtures/responses/contact/delete.xml +12 -0
- data/test/fixtures/responses/contact/info.xml +49 -0
- data/test/fixtures/responses/contact/transfer-query.xml +23 -0
- data/test/fixtures/responses/contact/transfer-request.xml +23 -0
- data/test/fixtures/responses/contact/update.xml +12 -0
- data/test/fixtures/responses/domain/check.xml +27 -0
- data/test/fixtures/responses/domain/create.xml +20 -0
- data/test/fixtures/responses/domain/delete.xml +12 -0
- data/test/fixtures/responses/domain/info-no-exDate.xml +38 -0
- data/test/fixtures/responses/domain/info.xml +39 -0
- data/test/fixtures/responses/domain/renew.xml +19 -0
- data/test/fixtures/responses/domain/transfer-query.xml +24 -0
- data/test/fixtures/responses/domain/transfer-request.xml +24 -0
- data/test/fixtures/responses/domain/update.xml +12 -0
- data/test/fixtures/responses/greeting.xml +25 -0
- data/test/fixtures/responses/host/check.xml +27 -0
- data/test/fixtures/responses/host/create.xml +19 -0
- data/test/fixtures/responses/host/delete.xml +12 -0
- data/test/fixtures/responses/host/info.xml +30 -0
- data/test/fixtures/responses/host/update.xml +12 -0
- data/test/helper.rb +89 -0
- data/test/host/test_host_check.rb +33 -0
- data/test/host/test_host_check_response.rb +38 -0
- data/test/host/test_host_create.rb +37 -0
- data/test/host/test_host_create_response.rb +33 -0
- data/test/host/test_host_delete.rb +28 -0
- data/test/host/test_host_delete_response.rb +23 -0
- data/test/host/test_host_info.rb +28 -0
- data/test/host/test_host_info_response.rb +72 -0
- data/test/host/test_host_update.rb +68 -0
- data/test/host/test_host_update_response.rb +23 -0
- data/test/requests/test_command_request.rb +16 -0
- data/test/requests/test_extension_request.rb +55 -0
- data/test/requests/test_hello_request.rb +15 -0
- data/test/support/schemas/all.xsd +21 -0
- data/test/support/schemas/contact-1.0.xsd +387 -0
- data/test/support/schemas/domain-1.0.xsd +432 -0
- data/test/support/schemas/epp-1.0.xsd +403 -0
- data/test/support/schemas/eppcom-1.0.xsd +93 -0
- data/test/support/schemas/host-1.0.xsd +240 -0
- data/test/test_client.rb +54 -0
- data/test/test_request.rb +15 -0
- data/test/test_server.rb +57 -0
- metadata +270 -91
- data/.document +0 -5
- data/README.rdoc +0 -17
- data/VERSION +0 -1
- data/lib/epp-client/hello_request.rb +0 -9
- data/test/test_epp-client.rb +0 -7
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 80878ef18fa5460776840d8c1c512a36cf48e8e6
|
4
|
+
data.tar.gz: bf787e1cf786d17c0f226e69d067e83c1c1867ff
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bed66d9db6da5af4ea69f2690446707358f945975c0b0ff970a8892cf64185488e1f94768d14e4d7b1957db090d221cf9f79b5cd8b500e0a9a9de626f41e6f30
|
7
|
+
data.tar.gz: 04fa093a95aa55c84e3094e64681788c44de675895ac36361b46a729d9941638d9e16eab7b62ff5f164d6b4969fbecd4bd52ce2aabea8ab5bdffeddc974d3697
|
data/.gitignore
ADDED
data/.simplecov
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
SimpleCov.start do
|
2
|
+
add_group 'Core' do |src_file|
|
3
|
+
File.dirname(src_file.filename) =~ %r</lib(/epp-client)?$>
|
4
|
+
end
|
5
|
+
|
6
|
+
add_group 'Commands', 'lib/epp-client/commands'
|
7
|
+
add_group 'Requests', 'lib/epp-client/requests'
|
8
|
+
add_group 'Responses', 'lib/epp-client/responses'
|
9
|
+
|
10
|
+
add_group 'EPP Domain', 'lib/epp-client/domain'
|
11
|
+
add_group 'EPP Contact', 'lib/epp-client/contact'
|
12
|
+
add_group 'EPP Host', 'lib/epp-client/host'
|
13
|
+
|
14
|
+
add_filter '/.bundle/'
|
15
|
+
add_filter '/test/'
|
16
|
+
end
|
data/.travis.yml
ADDED
data/.yardopts
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in epp-client.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
gem 'rake'
|
7
|
+
|
8
|
+
group :doc do
|
9
|
+
gem 'yard'
|
10
|
+
gem 'redcarpet'
|
11
|
+
end
|
12
|
+
|
13
|
+
group :test do
|
14
|
+
gem 'shoulda'
|
15
|
+
gem 'mocha'
|
16
|
+
end
|
17
|
+
|
18
|
+
group :coverage do
|
19
|
+
gem 'simplecov', :platforms => [:ruby_19, :ruby_20, :rbx]
|
20
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
epp-client (1.0.0)
|
5
|
+
libxml-ruby
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
activesupport (4.0.0)
|
11
|
+
i18n (~> 0.6, >= 0.6.4)
|
12
|
+
minitest (~> 4.2)
|
13
|
+
multi_json (~> 1.3)
|
14
|
+
thread_safe (~> 0.1)
|
15
|
+
tzinfo (~> 0.3.37)
|
16
|
+
atomic (1.1.13)
|
17
|
+
i18n (0.6.5)
|
18
|
+
libxml-ruby (2.7.0)
|
19
|
+
metaclass (0.0.1)
|
20
|
+
minitest (4.7.5)
|
21
|
+
mocha (0.14.0)
|
22
|
+
metaclass (~> 0.0.1)
|
23
|
+
multi_json (1.7.9)
|
24
|
+
rake (10.1.0)
|
25
|
+
redcarpet (3.0.0)
|
26
|
+
shoulda (3.5.0)
|
27
|
+
shoulda-context (~> 1.0, >= 1.0.1)
|
28
|
+
shoulda-matchers (>= 1.4.1, < 3.0)
|
29
|
+
shoulda-context (1.1.5)
|
30
|
+
shoulda-matchers (2.3.0)
|
31
|
+
activesupport (>= 3.0.0)
|
32
|
+
simplecov (0.7.1)
|
33
|
+
multi_json (~> 1.0)
|
34
|
+
simplecov-html (~> 0.7.1)
|
35
|
+
simplecov-html (0.7.1)
|
36
|
+
thread_safe (0.1.2)
|
37
|
+
atomic
|
38
|
+
tzinfo (0.3.37)
|
39
|
+
yard (0.8.7)
|
40
|
+
|
41
|
+
PLATFORMS
|
42
|
+
ruby
|
43
|
+
|
44
|
+
DEPENDENCIES
|
45
|
+
epp-client!
|
46
|
+
mocha
|
47
|
+
rake
|
48
|
+
redcarpet
|
49
|
+
shoulda
|
50
|
+
simplecov
|
51
|
+
yard
|
data/LICENSE
CHANGED
data/README.md
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
# EPP Client
|
2
|
+
|
3
|
+
Client for communicating with EPP services
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'epp-client'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install epp-client
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
client = EPP::Client.new('username', 'password', 'epp.server.com')
|
22
|
+
client.hello
|
23
|
+
puts client._last_request.inspect
|
24
|
+
puts client._last_response.inspect
|
25
|
+
|
26
|
+
Any other methods called on `client` will be passed through to an
|
27
|
+
authenticated EPP server connection. As a quick example, either a
|
28
|
+
string of XML, an XML::Node or XML::Document can be passed or a
|
29
|
+
block may be used
|
30
|
+
|
31
|
+
### domain:check using string payload
|
32
|
+
|
33
|
+
client.check <<-EOXML
|
34
|
+
<domain:check
|
35
|
+
xmlns:domain="urn:ietf:params:xml:ns:domain-1.0">
|
36
|
+
<domain:name>example.com</domain:name>
|
37
|
+
<domain:name>example.net</domain:name>
|
38
|
+
<domain:name>example.org</domain:name>
|
39
|
+
</domain:check>
|
40
|
+
EOXML
|
41
|
+
|
42
|
+
### domain:check using XML::Node payload
|
43
|
+
|
44
|
+
xml = XML::Node.new('check')
|
45
|
+
ns = XML::Namespace.new(xml, 'domain', 'urn:ietf:params:xml:ns:domain-1.0')
|
46
|
+
xml.namespaces.namespace = ns
|
47
|
+
|
48
|
+
%w(example.com example.net example.org).each do |name|
|
49
|
+
xml << XML::Node.new('name', name, ns)
|
50
|
+
end
|
51
|
+
|
52
|
+
client.check xml
|
53
|
+
|
54
|
+
### domain:check using block
|
55
|
+
|
56
|
+
client.check do |xml|
|
57
|
+
xml << (check = XML::Node.new('check'))
|
58
|
+
ns = XML::Namespace.new(check, 'domain', 'urn:ietf:params:xml:ns:domain-1.0')
|
59
|
+
check.namespaces.namespace = ns
|
60
|
+
|
61
|
+
%w(example.com example.net example.org).each do |name|
|
62
|
+
check << XML::Node.new('name', name, ns)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
If you leave off the block parameter then the return value of the block will be
|
67
|
+
inserted into the `xml`.
|
68
|
+
|
69
|
+
## Contributing
|
70
|
+
|
71
|
+
1. Fork it
|
72
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
73
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
74
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
75
|
+
5. Create new Pull Request
|
data/Rakefile
CHANGED
@@ -1,25 +1,5 @@
|
|
1
|
-
|
2
|
-
require
|
3
|
-
|
4
|
-
begin
|
5
|
-
require 'jeweler'
|
6
|
-
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "epp-client"
|
8
|
-
gem.summary = %Q{EPP (Extensible Provisioning Protocol) Client}
|
9
|
-
gem.description = %Q{Client for communicating with EPP services}
|
10
|
-
gem.email = "geoff@geoffgarside.co.uk"
|
11
|
-
gem.homepage = "http://github.com/geoffgarside/epp-client"
|
12
|
-
gem.authors = ["Geoff Garside"]
|
13
|
-
gem.add_development_dependency "shoulda", ">= 0"
|
14
|
-
gem.add_development_dependency "yard", ">= 0"
|
15
|
-
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
16
|
-
|
17
|
-
gem.add_dependency "libxml-ruby", ">= 0"
|
18
|
-
end
|
19
|
-
Jeweler::GemcutterTasks.new
|
20
|
-
rescue LoadError
|
21
|
-
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
22
|
-
end
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require "bundler/gem_tasks"
|
23
3
|
|
24
4
|
require 'rake/testtask'
|
25
5
|
Rake::TestTask.new(:test) do |test|
|
@@ -28,21 +8,6 @@ Rake::TestTask.new(:test) do |test|
|
|
28
8
|
test.verbose = true
|
29
9
|
end
|
30
10
|
|
31
|
-
begin
|
32
|
-
require 'rcov/rcovtask'
|
33
|
-
Rcov::RcovTask.new do |test|
|
34
|
-
test.libs << 'test'
|
35
|
-
test.pattern = 'test/**/test_*.rb'
|
36
|
-
test.verbose = true
|
37
|
-
end
|
38
|
-
rescue LoadError
|
39
|
-
task :rcov do
|
40
|
-
abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
|
41
|
-
end
|
42
|
-
end
|
43
|
-
|
44
|
-
task :test => :check_dependencies
|
45
|
-
|
46
11
|
task :default => :test
|
47
12
|
|
48
13
|
begin
|
data/epp-client.gemspec
CHANGED
@@ -1,64 +1,21 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/epp-client/version', __FILE__)
|
5
3
|
|
6
|
-
Gem::Specification.new do |
|
7
|
-
|
8
|
-
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Geoff Garside"]
|
6
|
+
gem.email = ["geoff@geoffgarside.co.uk"]
|
7
|
+
gem.description = %q{Client for communicating with EPP services}
|
8
|
+
gem.summary = %q{EPP (Extensible Provisioning Protocol) Client}
|
9
|
+
gem.homepage = "https://github.com/m247/epp-client"
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"LICENSE",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
".document",
|
21
|
-
"LICENSE",
|
22
|
-
"README.rdoc",
|
23
|
-
"Rakefile",
|
24
|
-
"VERSION",
|
25
|
-
"epp-client.gemspec",
|
26
|
-
"lib/epp-client.rb",
|
27
|
-
"lib/epp-client/client.rb",
|
28
|
-
"lib/epp-client/hello_request.rb",
|
29
|
-
"lib/epp-client/old_server.rb",
|
30
|
-
"lib/epp-client/request.rb",
|
31
|
-
"lib/epp-client/response.rb",
|
32
|
-
"lib/epp-client/response_error.rb",
|
33
|
-
"lib/epp-client/server.rb",
|
34
|
-
"test/helper.rb",
|
35
|
-
"test/test_epp-client.rb"
|
36
|
-
]
|
37
|
-
s.homepage = %q{http://github.com/geoffgarside/epp-client}
|
38
|
-
s.require_paths = ["lib"]
|
39
|
-
s.rubygems_version = %q{1.7.2}
|
40
|
-
s.summary = %q{EPP (Extensible Provisioning Protocol) Client}
|
41
|
-
s.test_files = [
|
42
|
-
"test/helper.rb",
|
43
|
-
"test/test_epp-client.rb"
|
44
|
-
]
|
11
|
+
gem.files = `git ls-files`.split($\)
|
12
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
13
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
14
|
+
gem.name = "epp-client"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = EPP::VERSION
|
45
17
|
|
46
|
-
|
47
|
-
s.specification_version = 3
|
18
|
+
gem.extra_rdoc_files = %w(LICENSE README.md)
|
48
19
|
|
49
|
-
|
50
|
-
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
51
|
-
s.add_development_dependency(%q<yard>, [">= 0"])
|
52
|
-
s.add_runtime_dependency(%q<libxml-ruby>, [">= 0"])
|
53
|
-
else
|
54
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
55
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
56
|
-
s.add_dependency(%q<libxml-ruby>, [">= 0"])
|
57
|
-
end
|
58
|
-
else
|
59
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
60
|
-
s.add_dependency(%q<yard>, [">= 0"])
|
61
|
-
s.add_dependency(%q<libxml-ruby>, [">= 0"])
|
62
|
-
end
|
20
|
+
gem.add_dependency 'libxml-ruby'
|
63
21
|
end
|
64
|
-
|
@@ -0,0 +1,13 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in epp-client.gemspec
|
4
|
+
gemspec :path => '../'
|
5
|
+
|
6
|
+
gem 'rake'
|
7
|
+
gem 'activesupport', '~> 3.2.14'
|
8
|
+
|
9
|
+
group :test do
|
10
|
+
gem 'shoulda-matchers', '~> 1.5.6'
|
11
|
+
gem 'shoulda'
|
12
|
+
gem 'mocha'
|
13
|
+
end
|
data/lib/epp-client.rb
CHANGED
@@ -1,14 +1,101 @@
|
|
1
1
|
require 'openssl'
|
2
2
|
require 'socket'
|
3
|
+
require 'time'
|
3
4
|
require 'xml'
|
4
5
|
|
6
|
+
require File.expand_path('../epp-client/version', __FILE__)
|
7
|
+
|
5
8
|
# EPP Module
|
6
9
|
module EPP
|
7
|
-
|
8
|
-
|
9
|
-
autoload :OldServer, File.dirname(__FILE__) + '/epp-client/old_server.rb'
|
10
|
-
autoload :Request, File.dirname(__FILE__) + '/epp-client/request.rb'
|
11
|
-
autoload :Response, File.dirname(__FILE__) + '/epp-client/response.rb'
|
12
|
-
autoload :ResponseError, File.dirname(__FILE__) + '/epp-client/response_error.rb'
|
13
|
-
autoload :HelloRequest, File.dirname(__FILE__) + '/epp-client/hello_request.rb'
|
10
|
+
# Generic error class for all EPP errors
|
11
|
+
class Error < RuntimeError; end
|
14
12
|
end
|
13
|
+
|
14
|
+
require File.expand_path('../epp-client/xml_helper.rb', __FILE__)
|
15
|
+
require File.expand_path('../epp-client/response_helper.rb', __FILE__)
|
16
|
+
|
17
|
+
module EPP
|
18
|
+
autoload :OldServer, File.expand_path('../epp-client/old_server.rb', __FILE__)
|
19
|
+
|
20
|
+
module Requests
|
21
|
+
autoload :Hello, File.expand_path('../epp-client/requests/hello.rb', __FILE__)
|
22
|
+
autoload :Command, File.expand_path('../epp-client/requests/command.rb', __FILE__)
|
23
|
+
autoload :Extension, File.expand_path('../epp-client/requests/extension.rb', __FILE__)
|
24
|
+
end
|
25
|
+
|
26
|
+
module Commands
|
27
|
+
autoload :Check, File.expand_path('../epp-client/commands/check.rb', __FILE__)
|
28
|
+
autoload :Create, File.expand_path('../epp-client/commands/create.rb', __FILE__)
|
29
|
+
autoload :Delete, File.expand_path('../epp-client/commands/delete.rb', __FILE__)
|
30
|
+
autoload :Info, File.expand_path('../epp-client/commands/info.rb', __FILE__)
|
31
|
+
autoload :Login, File.expand_path('../epp-client/commands/login.rb', __FILE__)
|
32
|
+
autoload :Logout, File.expand_path('../epp-client/commands/logout.rb', __FILE__)
|
33
|
+
autoload :Poll, File.expand_path('../epp-client/commands/poll.rb', __FILE__)
|
34
|
+
autoload :Renew, File.expand_path('../epp-client/commands/renew.rb', __FILE__)
|
35
|
+
autoload :Transfer, File.expand_path('../epp-client/commands/transfer.rb', __FILE__)
|
36
|
+
autoload :Update, File.expand_path('../epp-client/commands/update.rb', __FILE__)
|
37
|
+
end
|
38
|
+
|
39
|
+
module Domain
|
40
|
+
NAMESPACE = 'urn:ietf:params:xml:ns:domain-1.0'
|
41
|
+
SCHEMA_LOCATION = 'urn:ietf:params:xml:ns:domain-1.0 domain-1.0.xsd'
|
42
|
+
|
43
|
+
autoload :Check, File.expand_path('../epp-client/domain/check.rb', __FILE__)
|
44
|
+
autoload :Create, File.expand_path('../epp-client/domain/create.rb', __FILE__)
|
45
|
+
autoload :Delete, File.expand_path('../epp-client/domain/delete.rb', __FILE__)
|
46
|
+
autoload :Info, File.expand_path('../epp-client/domain/info.rb', __FILE__)
|
47
|
+
autoload :Renew, File.expand_path('../epp-client/domain/renew.rb', __FILE__)
|
48
|
+
autoload :Transfer, File.expand_path('../epp-client/domain/transfer.rb', __FILE__)
|
49
|
+
autoload :Update, File.expand_path('../epp-client/domain/update.rb', __FILE__)
|
50
|
+
|
51
|
+
autoload :CheckResponse, File.expand_path('../epp-client/domain/check_response.rb', __FILE__)
|
52
|
+
autoload :CreateResponse, File.expand_path('../epp-client/domain/create_response.rb', __FILE__)
|
53
|
+
autoload :DeleteResponse, File.expand_path('../epp-client/domain/delete_response.rb', __FILE__)
|
54
|
+
autoload :InfoResponse, File.expand_path('../epp-client/domain/info_response.rb', __FILE__)
|
55
|
+
autoload :RenewResponse, File.expand_path('../epp-client/domain/renew_response.rb', __FILE__)
|
56
|
+
autoload :TransferResponse, File.expand_path('../epp-client/domain/transfer_response.rb', __FILE__)
|
57
|
+
autoload :UpdateResponse, File.expand_path('../epp-client/domain/update_response.rb', __FILE__)
|
58
|
+
end
|
59
|
+
|
60
|
+
module Contact
|
61
|
+
NAMESPACE = 'urn:ietf:params:xml:ns:contact-1.0'
|
62
|
+
SCHEMA_LOCATION = 'urn:ietf:params:xml:ns:contact-1.0 contact-1.0.xsd'
|
63
|
+
|
64
|
+
autoload :Check, File.expand_path('../epp-client/contact/check.rb', __FILE__)
|
65
|
+
autoload :Create, File.expand_path('../epp-client/contact/create.rb', __FILE__)
|
66
|
+
autoload :Delete, File.expand_path('../epp-client/contact/delete.rb', __FILE__)
|
67
|
+
autoload :Info, File.expand_path('../epp-client/contact/info.rb', __FILE__)
|
68
|
+
autoload :Transfer, File.expand_path('../epp-client/contact/transfer.rb', __FILE__)
|
69
|
+
autoload :Update, File.expand_path('../epp-client/contact/update.rb', __FILE__)
|
70
|
+
|
71
|
+
autoload :CheckResponse, File.expand_path('../epp-client/contact/check_response.rb', __FILE__)
|
72
|
+
autoload :CreateResponse, File.expand_path('../epp-client/contact/create_response.rb', __FILE__)
|
73
|
+
autoload :DeleteResponse, File.expand_path('../epp-client/contact/delete_response.rb', __FILE__)
|
74
|
+
autoload :InfoResponse, File.expand_path('../epp-client/contact/info_response.rb', __FILE__)
|
75
|
+
autoload :TransferResponse, File.expand_path('../epp-client/contact/transfer_response.rb', __FILE__)
|
76
|
+
autoload :UpdateResponse, File.expand_path('../epp-client/contact/update_response.rb', __FILE__)
|
77
|
+
end
|
78
|
+
|
79
|
+
module Host
|
80
|
+
NAMESPACE = 'urn:ietf:params:xml:ns:host-1.0'
|
81
|
+
SCHEMA_LOCATION = 'urn:ietf:params:xml:ns:host-1.0 host-1.0.xsd'
|
82
|
+
|
83
|
+
autoload :Check, File.expand_path('../epp-client/host/check.rb', __FILE__)
|
84
|
+
autoload :Create, File.expand_path('../epp-client/host/create.rb', __FILE__)
|
85
|
+
autoload :Delete, File.expand_path('../epp-client/host/delete.rb', __FILE__)
|
86
|
+
autoload :Info, File.expand_path('../epp-client/host/info.rb', __FILE__)
|
87
|
+
autoload :Update, File.expand_path('../epp-client/host/update.rb', __FILE__)
|
88
|
+
|
89
|
+
autoload :CheckResponse, File.expand_path('../epp-client/host/check_response.rb', __FILE__)
|
90
|
+
autoload :CreateResponse, File.expand_path('../epp-client/host/create_response.rb', __FILE__)
|
91
|
+
autoload :DeleteResponse, File.expand_path('../epp-client/host/delete_response.rb', __FILE__)
|
92
|
+
autoload :InfoResponse, File.expand_path('../epp-client/host/info_response.rb', __FILE__)
|
93
|
+
autoload :UpdateResponse, File.expand_path('../epp-client/host/update_response.rb', __FILE__)
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
require File.expand_path('../epp-client/client', __FILE__)
|
98
|
+
require File.expand_path('../epp-client/server.rb', __FILE__)
|
99
|
+
require File.expand_path('../epp-client/request.rb', __FILE__)
|
100
|
+
require File.expand_path('../epp-client/response.rb', __FILE__)
|
101
|
+
require File.expand_path('../epp-client/response_error.rb', __FILE__)
|