kono_epp_client 0.1.0 → 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 +4 -4
- data/CHANGELOG.md +17 -0
- data/README.md +16 -0
- data/Rakefile +6 -0
- data/kono_epp_client.gemspec +39 -0
- data/lib/epp/server.rb +101 -93
- data/lib/kono_epp_client/VERSION +1 -0
- data/lib/kono_epp_client/version.rb +3 -0
- data/spec/epp/server_spec.rb +69 -0
- data/spec/support/snapshot.rb +1 -1
- data/spec/support/superdiff.rb +1 -0
- metadata +24 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c14b24f2b061e44d80192c0e9612382f6f3f2f159bb3266c3750968dc56640d
|
4
|
+
data.tar.gz: bb38b49904a2b3205a270fb0d308cab943a710c54879cc193d2bacc868d16c95
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4361d5610d860fd4d1bcadebe2dfb68eb19f52a12bd7e49eff016eec4ca756229efc69a3fc4473d9be7a4a622e7d993c52a8befb6bf0d7342e4c2fb28fbeee1d
|
7
|
+
data.tar.gz: 84f087306f9ce8b5fb2f16dc50e5022063e588b9535847e8edd85b6ad3fadc1d3f6e4d40815ff44e344a745101b4ec42ffb9377479ff0a8a240c801dc2fa6841
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
# Changelog
|
2
|
+
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
3
|
+
|
4
|
+
- - -
|
5
|
+
## 0.1.1 - 2024-05-23
|
6
|
+
#### Continuous Integration
|
7
|
+
- Cog typo - (f91c1b9) - Marino Bonetti
|
8
|
+
#### Features
|
9
|
+
- Add configuration options for transport - (d83d723) - Marino Bonetti
|
10
|
+
#### Miscellaneous Chores
|
11
|
+
- Configuration for development and deploy - (563edac) - Marino Bonetti
|
12
|
+
#### Tests
|
13
|
+
- Fix methods non present in std - (e0393ff) - Marino Bonetti
|
14
|
+
|
15
|
+
- - -
|
16
|
+
|
17
|
+
Changelog generated by [cocogitto](https://github.com/cocogitto/cocogitto).
|
data/README.md
CHANGED
@@ -1,2 +1,18 @@
|
|
1
1
|
# kono_epp_client
|
2
2
|
A simple EPP Client
|
3
|
+
|
4
|
+
|
5
|
+
|
6
|
+
## Development
|
7
|
+
Build dell'immagine di docker
|
8
|
+
```shell
|
9
|
+
docker compose build
|
10
|
+
```
|
11
|
+
Installazione dipendenze
|
12
|
+
```shell
|
13
|
+
docker compose run app bundle
|
14
|
+
```
|
15
|
+
Run rspec
|
16
|
+
```shell
|
17
|
+
docker compose run app bundle exec rspec
|
18
|
+
```
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative "lib/kono_epp_client/version"
|
2
|
+
|
3
|
+
Gem::Specification.new do |s|
|
4
|
+
s.name = 'kono_epp_client'
|
5
|
+
s.version = KonoEppClient::VERSION
|
6
|
+
s.date = '2019-10-08'
|
7
|
+
s.summary = "Kono Epp client"
|
8
|
+
s.description = "A simple EPP Client"
|
9
|
+
s.authors = ["Fabio Bonelli", "Jury Ghidinelli", "Marino Bonetti"]
|
10
|
+
s.email = ['jury@archimedianet.it', 'marinobonetti@gmail.com']
|
11
|
+
s.files = ["lib/kono_epp_client.rb"]
|
12
|
+
s.homepage = 'https://github.com/ArchimediaZerogroup/kono_epp_client'
|
13
|
+
s.license = 'MIT'
|
14
|
+
|
15
|
+
s.files = Dir.chdir(__dir__) do
|
16
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
(File.expand_path(f) == __FILE__) ||
|
18
|
+
f.start_with?(*[
|
19
|
+
"bin/", "test/", "spec/", "features/",
|
20
|
+
".git", ".gitlab-ci.yml", "appveyor", "Gemfile",
|
21
|
+
"cog.toml", "docker-compose.yml", "Dockerfile",
|
22
|
+
".rspec", ".rubocop.yml"
|
23
|
+
])
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
files = `git ls-files -z`.split("\x0")
|
28
|
+
s.test_files = files.grep(%r{^(spec)/})
|
29
|
+
|
30
|
+
s.add_dependency 'activesupport', '>= 5.2'
|
31
|
+
s.add_dependency 'rexml'
|
32
|
+
s.add_dependency 'nokogiri', '>= 1.10'
|
33
|
+
|
34
|
+
s.add_development_dependency "rspec"
|
35
|
+
s.add_development_dependency "super_diff"
|
36
|
+
s.add_development_dependency "rspec-html-matchers"
|
37
|
+
s.add_development_dependency 'rspec-snapshot'
|
38
|
+
|
39
|
+
end
|
data/lib/epp/server.rb
CHANGED
@@ -5,7 +5,9 @@ module KonoEppClient #:nodoc:
|
|
5
5
|
|
6
6
|
require 'nokogiri'
|
7
7
|
|
8
|
-
attr_accessor :tag, :password, :server, :port, :ssl_version, :old_server,
|
8
|
+
attr_accessor :tag, :password, :server, :port, :ssl_version, :old_server,
|
9
|
+
:services, :lang, :extensions, :version, :credit, :timeout,
|
10
|
+
:transport, :transport_options
|
9
11
|
|
10
12
|
# ==== Required Attrbiutes
|
11
13
|
#
|
@@ -23,6 +25,7 @@ module KonoEppClient #:nodoc:
|
|
23
25
|
# * <tt>:extensions</tt> - URLs to custom extensions to standard EPP. Use these to extend the standard EPP (e.g., Nominet uses extensions). Defaults to none.
|
24
26
|
# * <tt>:version</tt> - Set the EPP version. Defaults to "1.0".
|
25
27
|
# * <tt>:transport</tt> - Type of connection (http or tcp). Default to "tcp"
|
28
|
+
# * <tt>:transport_options</tt> - Overrides for transport configurations. Default to {}
|
26
29
|
# * <tt>:timeout</tt> - Timeou for connections in seconds. Default to "30"
|
27
30
|
# * <tt>:ssl_version</tt> - Version of the ssl protocol versione. Default to TLSv1
|
28
31
|
# * <tt>:ssl_version</tt> - Version of the ssl protocol versione. Default to TLSv1
|
@@ -30,20 +33,21 @@ module KonoEppClient #:nodoc:
|
|
30
33
|
def initialize(attributes = {})
|
31
34
|
requires!(attributes, :tag, :password, :server)
|
32
35
|
|
33
|
-
@tag
|
34
|
-
@password
|
35
|
-
@server
|
36
|
-
@port
|
37
|
-
@old_server
|
38
|
-
@lang
|
39
|
-
@services
|
40
|
-
@extensions
|
41
|
-
@version
|
42
|
-
@transport
|
43
|
-
@
|
44
|
-
@
|
45
|
-
|
46
|
-
|
36
|
+
@tag = attributes[:tag]
|
37
|
+
@password = attributes[:password]
|
38
|
+
@server = attributes[:server]
|
39
|
+
@port = attributes[:port] || 700
|
40
|
+
@old_server = attributes[:old_server] || false
|
41
|
+
@lang = attributes[:lang] || "en"
|
42
|
+
@services = attributes[:services] || ["urn:ietf:params:xml:ns:domain-1.0", "urn:ietf:params:xml:ns:contact-1.0", "urn:ietf:params:xml:ns:host-1.0"]
|
43
|
+
@extensions = attributes[:extensions] || []
|
44
|
+
@version = attributes[:version] || "1.0"
|
45
|
+
@transport = attributes[:transport] || :tcp
|
46
|
+
@transport_options = attributes[:transport_options] || {}
|
47
|
+
@timeout = attributes[:timeout] || 30
|
48
|
+
@ssl_version = attributes[:ssl_version] || :TLSv1
|
49
|
+
|
50
|
+
@logged_in = false
|
47
51
|
end
|
48
52
|
|
49
53
|
def connect_and_hello
|
@@ -61,13 +65,13 @@ module KonoEppClient #:nodoc:
|
|
61
65
|
# <tt><login></tt> and <tt><logout></tt> requests are also wrapped
|
62
66
|
# around the request, so we can close the socket immediately after
|
63
67
|
# the request is made.
|
64
|
-
def request(
|
68
|
+
def request(xml)
|
65
69
|
# open_connection
|
66
70
|
|
67
71
|
# @logged_in = true if login
|
68
72
|
|
69
73
|
begin
|
70
|
-
@response = send_request(
|
74
|
+
@response = send_request(xml)
|
71
75
|
ensure
|
72
76
|
if @logged_in && !old_server
|
73
77
|
@logged_in = false if logout
|
@@ -79,7 +83,7 @@ module KonoEppClient #:nodoc:
|
|
79
83
|
|
80
84
|
# Sends a standard login request to the EPP server.
|
81
85
|
def login
|
82
|
-
login = KonoEppLogin.new(
|
86
|
+
login = KonoEppLogin.new(tag, password)
|
83
87
|
|
84
88
|
# FIXME: Order matters
|
85
89
|
login.version = version
|
@@ -88,11 +92,11 @@ module KonoEppClient #:nodoc:
|
|
88
92
|
login.services = services
|
89
93
|
login.extensions = extensions
|
90
94
|
|
91
|
-
send_command(
|
95
|
+
send_command(login)
|
92
96
|
end
|
93
97
|
|
94
|
-
def change_password(
|
95
|
-
login = KonoEppLogin.new(
|
98
|
+
def change_password(new_password)
|
99
|
+
login = KonoEppLogin.new(tag, password)
|
96
100
|
|
97
101
|
# FIXME: Order matters
|
98
102
|
login.new_password = new_password
|
@@ -103,7 +107,7 @@ module KonoEppClient #:nodoc:
|
|
103
107
|
login.services = services
|
104
108
|
login.extensions = extensions
|
105
109
|
|
106
|
-
send_command(
|
110
|
+
send_command(login)
|
107
111
|
end
|
108
112
|
|
109
113
|
def logged_in?
|
@@ -118,145 +122,145 @@ module KonoEppClient #:nodoc:
|
|
118
122
|
|
119
123
|
# FIXME: Remove command wrappers?
|
120
124
|
def hello
|
121
|
-
send_request(
|
125
|
+
send_request(KonoEppHello.new.to_s)
|
122
126
|
end
|
123
127
|
|
124
|
-
def poll(
|
125
|
-
poll = KonoEppPoll.new(
|
128
|
+
def poll(id = nil)
|
129
|
+
poll = KonoEppPoll.new(id ? :ack : :req)
|
126
130
|
|
127
131
|
poll.ack_id = id if id
|
128
132
|
|
129
|
-
send_command(
|
133
|
+
send_command(poll)
|
130
134
|
end
|
131
135
|
|
132
|
-
def create_contact(
|
136
|
+
def create_contact(options)
|
133
137
|
contact = KonoEppCreateContact.new options
|
134
|
-
send_command(
|
138
|
+
send_command(contact)
|
135
139
|
end
|
136
140
|
|
137
141
|
def check_contacts(ids)
|
138
|
-
send_command(
|
142
|
+
send_command(KonoEppCheckContacts.new(ids))
|
139
143
|
end
|
140
144
|
|
141
|
-
def delete_contact(
|
145
|
+
def delete_contact(id)
|
142
146
|
contact = KonoEppDeleteContact.new id
|
143
|
-
send_command(
|
147
|
+
send_command(contact)
|
144
148
|
end
|
145
149
|
|
146
|
-
def update_contact(
|
150
|
+
def update_contact(options)
|
147
151
|
contact = KonoEppUpdateContact.new options
|
148
|
-
send_command(
|
152
|
+
send_command(contact)
|
149
153
|
end
|
150
154
|
|
151
|
-
def create_domain(
|
155
|
+
def create_domain(options)
|
152
156
|
domain = KonoEppCreateDomain.new options
|
153
|
-
send_command(
|
157
|
+
send_command(domain)
|
154
158
|
end
|
155
159
|
|
156
|
-
def check_domains(
|
157
|
-
send_command(
|
160
|
+
def check_domains(*domains)
|
161
|
+
send_command(KonoEppCheckDomains.new *domains)
|
158
162
|
end
|
159
163
|
|
160
|
-
def update_domain(
|
164
|
+
def update_domain(options)
|
161
165
|
domain = KonoEppUpdateDomain.new options
|
162
|
-
send_command(
|
166
|
+
send_command(domain)
|
163
167
|
end
|
164
168
|
|
165
|
-
def delete_domain(
|
169
|
+
def delete_domain(name)
|
166
170
|
domain = KonoEppDeleteDomain.new name
|
167
|
-
send_command(
|
171
|
+
send_command(domain)
|
168
172
|
end
|
169
173
|
|
170
|
-
def info_contact(
|
174
|
+
def info_contact(id)
|
171
175
|
contact = KonoEppInfoContact.new id
|
172
|
-
send_command(
|
176
|
+
send_command(contact)
|
173
177
|
end
|
174
178
|
|
175
|
-
def info_domain(
|
179
|
+
def info_domain(name)
|
176
180
|
info = KonoEppInfoDomain.new name
|
177
|
-
send_command(
|
181
|
+
send_command(info)
|
178
182
|
end
|
179
183
|
|
180
184
|
def transfer_domain(name, authinfo, op, extension: nil)
|
181
|
-
send_command(KonoEppTransferDomain.new(
|
185
|
+
send_command(KonoEppTransferDomain.new(name, authinfo, op, extension: extension))
|
182
186
|
end
|
183
187
|
|
184
188
|
# Sends a standard logout request to the EPP server.
|
185
189
|
def logout
|
186
|
-
send_command(
|
190
|
+
send_command(KonoEppLogout.new, 1500)
|
187
191
|
end
|
188
192
|
|
189
|
-
# private
|
193
|
+
# private
|
190
194
|
# Wrapper which sends XML to the server, and receives
|
191
195
|
# the response in return.
|
192
|
-
def send_request(
|
193
|
-
write(
|
196
|
+
def send_request(xml)
|
197
|
+
write(xml)
|
194
198
|
read
|
195
199
|
end
|
196
200
|
|
197
|
-
def send_command(
|
198
|
-
namespaces = {
|
199
|
-
|
201
|
+
def send_command(command, expected_result = 1000..1999)
|
202
|
+
namespaces = {'extepp' => 'http://www.nic.it/ITNIC-EPP/extepp-2.0',
|
203
|
+
'xmlns' => "urn:ietf:params:xml:ns:epp-1.0"}
|
200
204
|
|
201
|
-
xml = Nokogiri.XML(
|
205
|
+
xml = Nokogiri.XML(send_request(command.to_s))
|
202
206
|
|
203
207
|
# TODO: multiple <response> RFC 3730 §2.6
|
204
|
-
result = xml.at_xpath(
|
205
|
-
|
206
|
-
raise KonoEppErrorResponse.new(
|
208
|
+
result = xml.at_xpath("/xmlns:epp/xmlns:response[1]/xmlns:result",
|
209
|
+
namespaces)
|
210
|
+
raise KonoEppErrorResponse.new(:message => 'Malformed response') if result.nil?
|
207
211
|
|
208
|
-
xmlns_code = result.at_xpath(
|
209
|
-
raise KonoEppErrorResponse.new(
|
212
|
+
xmlns_code = result.at_xpath("@code")
|
213
|
+
raise KonoEppErrorResponse.new(:message => 'Malformed response') if xmlns_code.nil?
|
210
214
|
|
211
215
|
response_code = xmlns_code.value.to_i
|
212
216
|
|
213
|
-
xmlns_msg = result.xpath(
|
214
|
-
|
215
|
-
raise KonoEppErrorResponse.new(
|
217
|
+
xmlns_msg = result.xpath("xmlns:msg/text ()",
|
218
|
+
namespaces)
|
219
|
+
raise KonoEppErrorResponse.new(:message => 'Malformed response') if xmlns_msg.empty?
|
216
220
|
|
217
221
|
result_message = xmlns_msg.text.strip
|
218
222
|
|
219
223
|
# TODO: value
|
220
224
|
|
221
|
-
xmlns_ext_reason = result.xpath(
|
222
|
-
|
225
|
+
xmlns_ext_reason = result.xpath("xmlns:extValue/xmlns:reason",
|
226
|
+
namespaces)
|
223
227
|
result_message += ": #{xmlns_ext_reason.text.strip}" unless xmlns_ext_reason.empty?
|
224
228
|
|
225
|
-
xmlns_reason_code = result.xpath(
|
226
|
-
|
229
|
+
xmlns_reason_code = result.xpath("xmlns:extValue/xmlns:value/extepp:reasonCode",
|
230
|
+
namespaces)
|
227
231
|
reason_code = xmlns_reason_code.text.strip.to_i unless xmlns_reason_code.empty?
|
228
232
|
|
229
|
-
credit_msg = xml.xpath(
|
230
|
-
|
233
|
+
credit_msg = xml.xpath("//extepp:credit/text ()",
|
234
|
+
namespaces)
|
231
235
|
@credit = credit_msg.text.to_f unless credit_msg.empty?
|
232
236
|
|
233
237
|
if expected_result === response_code
|
234
238
|
return xml
|
235
239
|
end
|
236
240
|
|
237
|
-
args = {
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
case [
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
241
|
+
args = {:xml => xml,
|
242
|
+
:response_code => response_code,
|
243
|
+
:reason_code => reason_code,
|
244
|
+
:message => result_message}
|
245
|
+
|
246
|
+
case [response_code, reason_code]
|
247
|
+
when [2200, 6004]
|
248
|
+
raise KonoEppAuthenticationPasswordExpired.new(args)
|
249
|
+
when [2002, 4015]
|
250
|
+
raise KonoEppLoginNeeded.new(args)
|
251
|
+
when [2304, 9022]
|
252
|
+
raise KonoEppDomainHasStatusCliTransProhibited.new(args)
|
253
|
+
when [2304, 9026]
|
254
|
+
raise KonoEppDomainHasStatusClientUpdateProhibited.new(args)
|
255
|
+
else
|
256
|
+
raise KonoEppErrorResponse.new(args)
|
253
257
|
end
|
254
258
|
end
|
255
259
|
|
256
260
|
# Establishes the connection to the server. If the connection is
|
257
|
-
|
258
|
-
|
259
|
-
|
261
|
+
# established, then this method will call read and return
|
262
|
+
# the EPP <tt><greeting></tt> which is sent by the
|
263
|
+
# server upon connection.
|
260
264
|
def open_connection
|
261
265
|
# FIXME il timeout serve solamente nella versione tcp
|
262
266
|
# FIXME perchè utilizzare un'istanza di classe? non sarebbe meglio avere un metodo che genera il transport
|
@@ -266,10 +270,14 @@ module KonoEppClient #:nodoc:
|
|
266
270
|
when :tcp
|
267
271
|
@connection = KonoEppClient::Transport::TcpTransport.new(server, port)
|
268
272
|
when :http
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
+
|
274
|
+
options = {
|
275
|
+
ssl_version: ssl_version,
|
276
|
+
cookie_file: "#{@tag.downcase}.cookies.pstore"
|
277
|
+
}.merge(@transport_options)
|
278
|
+
|
279
|
+
@connection = KonoEppClient::Transport::HttpTransport.new(server, port, **options)
|
280
|
+
|
273
281
|
end
|
274
282
|
end
|
275
283
|
end
|
@@ -286,9 +294,9 @@ module KonoEppClient #:nodoc:
|
|
286
294
|
|
287
295
|
# Send XML to the server. If the socket returns EOF,
|
288
296
|
# the connection has closed and a SocketError is raised.
|
289
|
-
def write(
|
297
|
+
def write(xml)
|
290
298
|
Timeout.timeout @timeout do
|
291
|
-
@connection.write(
|
299
|
+
@connection.write(xml)
|
292
300
|
end
|
293
301
|
end
|
294
302
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
0.1.1
|
@@ -0,0 +1,69 @@
|
|
1
|
+
RSpec.describe KonoEppClient::Server do
|
2
|
+
|
3
|
+
let(:params) {
|
4
|
+
{
|
5
|
+
tag: "abc",
|
6
|
+
password: "123123",
|
7
|
+
server: "epp.pubtest.nic.it"
|
8
|
+
}
|
9
|
+
}
|
10
|
+
|
11
|
+
let(:instance) { described_class.new(params) }
|
12
|
+
|
13
|
+
describe "initialization" do
|
14
|
+
|
15
|
+
it "base" do
|
16
|
+
expect(instance).to have_attributes(
|
17
|
+
**params,
|
18
|
+
port: 700,
|
19
|
+
old_server: false,
|
20
|
+
lang: "en",
|
21
|
+
services: ["urn:ietf:params:xml:ns:domain-1.0", "urn:ietf:params:xml:ns:contact-1.0", "urn:ietf:params:xml:ns:host-1.0"],
|
22
|
+
extensions: [],
|
23
|
+
version: "1.0",
|
24
|
+
transport: :tcp,
|
25
|
+
transport_options: {},
|
26
|
+
timeout: 30,
|
27
|
+
ssl_version: :TLSv1
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
describe "#open_connection" do
|
33
|
+
|
34
|
+
it "default transport" do
|
35
|
+
|
36
|
+
double = instance_double(KonoEppClient::Transport::TcpTransport)
|
37
|
+
|
38
|
+
expect(KonoEppClient::Transport::TcpTransport).to receive(:new).with(params[:server], 700).and_return(double)
|
39
|
+
|
40
|
+
expect { instance.open_connection }.to change { instance.instance_variable_get(:@connection) }.
|
41
|
+
to(double)
|
42
|
+
end
|
43
|
+
|
44
|
+
context "transport http" do
|
45
|
+
|
46
|
+
let(:params) {
|
47
|
+
super().merge(
|
48
|
+
transport: :http,
|
49
|
+
transport_options: {cookie_file: "file_to_coockies"},
|
50
|
+
)
|
51
|
+
}
|
52
|
+
|
53
|
+
it "use http transport" do
|
54
|
+
double = instance_double(KonoEppClient::Transport::HttpTransport)
|
55
|
+
|
56
|
+
expect(KonoEppClient::Transport::HttpTransport).to receive(:new).with(
|
57
|
+
params[:server],
|
58
|
+
700, ssl_version: :TLSv1, cookie_file: "file_to_coockies").and_return(double)
|
59
|
+
|
60
|
+
expect { instance.open_connection }.to change { instance.instance_variable_get(:@connection) }.
|
61
|
+
to(double)
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
|
67
|
+
end
|
68
|
+
|
69
|
+
end
|
data/spec/support/snapshot.rb
CHANGED
@@ -9,7 +9,7 @@ RSpec.configure do |config|
|
|
9
9
|
extension = ".#{example.metadata[:snapshot]}" unless example.metadata[:snapshot] === true
|
10
10
|
class_name = example.metadata[:described_class].name.underscore
|
11
11
|
test_name = example.metadata[:full_description].gsub(example.metadata[:described_class].name, "").tr(" ", "_")
|
12
|
-
raise "component snapshot has no content" if raw_rendered_content.
|
12
|
+
raise "component snapshot has no content" if raw_rendered_content.nil? or raw_rendered_content.empty?
|
13
13
|
str_content = raw_rendered_content
|
14
14
|
if extension == ".xml"
|
15
15
|
str_content = Nokogiri.XML(str_content).to_xml
|
@@ -0,0 +1 @@
|
|
1
|
+
require "super_diff/rspec"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kono_epp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Bonelli
|
@@ -68,6 +68,20 @@ dependencies:
|
|
68
68
|
- - ">="
|
69
69
|
- !ruby/object:Gem::Version
|
70
70
|
version: '0'
|
71
|
+
- !ruby/object:Gem::Dependency
|
72
|
+
name: super_diff
|
73
|
+
requirement: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
type: :development
|
79
|
+
prerelease: false
|
80
|
+
version_requirements: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
71
85
|
- !ruby/object:Gem::Dependency
|
72
86
|
name: rspec-html-matchers
|
73
87
|
requirement: !ruby/object:Gem::Requirement
|
@@ -104,7 +118,10 @@ executables: []
|
|
104
118
|
extensions: []
|
105
119
|
extra_rdoc_files: []
|
106
120
|
files:
|
121
|
+
- CHANGELOG.md
|
107
122
|
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- kono_epp_client.gemspec
|
108
125
|
- lib/epp/epp_command.rb
|
109
126
|
- lib/epp/epp_command/check_contacts.rb
|
110
127
|
- lib/epp/epp_command/create_contact.rb
|
@@ -127,6 +144,8 @@ files:
|
|
127
144
|
- lib/epp/transport/http.rb
|
128
145
|
- lib/epp/transport/tcp.rb
|
129
146
|
- lib/kono_epp_client.rb
|
147
|
+
- lib/kono_epp_client/VERSION
|
148
|
+
- lib/kono_epp_client/version.rb
|
130
149
|
- lib/require_parameters.rb
|
131
150
|
- spec/epp/epp_command/kono_epp_check_contacts_spec.rb
|
132
151
|
- spec/epp/epp_command/kono_epp_check_domains_spec.rb
|
@@ -134,6 +153,7 @@ files:
|
|
134
153
|
- spec/epp/epp_command/kono_epp_transfer_domain_spec.rb
|
135
154
|
- spec/epp/epp_command/kono_epp_update_domain_spec.rb
|
136
155
|
- spec/epp/kono_epp_command_spec.rb
|
156
|
+
- spec/epp/server_spec.rb
|
137
157
|
- spec/fixtures/snapshots/kono_epp_check_contacts/_construct.xml.snap
|
138
158
|
- spec/fixtures/snapshots/kono_epp_check_domains/_construct.xml.snap
|
139
159
|
- spec/fixtures/snapshots/kono_epp_create_domain/_create.xml.snap
|
@@ -149,6 +169,7 @@ files:
|
|
149
169
|
- spec/support/context.rb
|
150
170
|
- spec/support/matchers.rb
|
151
171
|
- spec/support/snapshot.rb
|
172
|
+
- spec/support/superdiff.rb
|
152
173
|
homepage: https://github.com/ArchimediaZerogroup/kono_epp_client
|
153
174
|
licenses:
|
154
175
|
- MIT
|
@@ -179,6 +200,7 @@ test_files:
|
|
179
200
|
- spec/epp/epp_command/kono_epp_transfer_domain_spec.rb
|
180
201
|
- spec/epp/epp_command/kono_epp_update_domain_spec.rb
|
181
202
|
- spec/epp/kono_epp_command_spec.rb
|
203
|
+
- spec/epp/server_spec.rb
|
182
204
|
- spec/fixtures/snapshots/kono_epp_check_contacts/_construct.xml.snap
|
183
205
|
- spec/fixtures/snapshots/kono_epp_check_domains/_construct.xml.snap
|
184
206
|
- spec/fixtures/snapshots/kono_epp_create_domain/_create.xml.snap
|
@@ -194,3 +216,4 @@ test_files:
|
|
194
216
|
- spec/support/context.rb
|
195
217
|
- spec/support/matchers.rb
|
196
218
|
- spec/support/snapshot.rb
|
219
|
+
- spec/support/superdiff.rb
|