ultraspeed-epp 1.0.7 → 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/lib/epp.rb CHANGED
@@ -12,5 +12,5 @@ require File.dirname(__FILE__) + '/epp/server.rb'
12
12
  require File.dirname(__FILE__) + '/epp/exceptions.rb'
13
13
 
14
14
  module Epp #:nodoc:
15
- VERSION = '1.0.6'
15
+ VERSION = '1.0.8'
16
16
  end
@@ -1,8 +1,9 @@
1
1
  class EppErrorResponse < StandardError #:nodoc:
2
- attr_accessor :response
2
+ attr_accessor :response_xml, :response_code, :message
3
3
 
4
4
  # Generic EPP exception. Accepts a response code and a message
5
5
  def initialize(attributes = {})
6
+ @response_xml = attributes[:xml]
6
7
  @response_code = attributes[:code]
7
8
  @message = attributes[:message]
8
9
  end
@@ -91,7 +91,7 @@ module Epp #:nodoc:
91
91
  if result_code == 1000
92
92
  return true
93
93
  else
94
- raise EppErrorResponse.new(:code => result_code, :message => result_message)
94
+ raise EppErrorResponse.new(:xml => response, :code => result_code, :message => result_message)
95
95
  end
96
96
  end
97
97
 
@@ -117,7 +117,7 @@ module Epp #:nodoc:
117
117
  if result_code == 1500
118
118
  return true
119
119
  else
120
- raise EppErrorResponse.new(:code => result_code, :message => result_message)
120
+ raise EppErrorResponse.new(:xml => response, :code => result_code, :message => result_message)
121
121
  end
122
122
  end
123
123
 
@@ -160,16 +160,19 @@ module Epp #:nodoc:
160
160
  # it will return a string containing the XML from the server.
161
161
  def get_frame
162
162
  if @old_server
163
- data = ''
163
+ data = ""
164
164
  first_char = @socket.read(1)
165
+
165
166
  if first_char.nil? and @socket.eof?
166
167
  raise SocketError.new("Connection closed by remote server")
167
168
  elsif first_char.nil?
168
169
  raise SocketError.new("Error reading frame from remote server")
169
170
  else
170
171
  data << first_char
172
+
171
173
  while char = @socket.read(1)
172
174
  data << char
175
+
173
176
  return data if data =~ %r|<\/epp>\n$|mi # at end
174
177
  end
175
178
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultraspeed-epp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.7
4
+ version: 1.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Delsman
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-04 00:00:00 -07:00
12
+ date: 2009-05-16 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -33,7 +33,8 @@ dependencies:
33
33
  version: 0.8.1
34
34
  version:
35
35
  description: Basic functionality for connecting and making requests on EPP (Extensible Provisioning Protocol) servers.
36
- email: jdelsman@ultraspeed.com
36
+ email:
37
+ - jdelsman@ultraspeed.com
37
38
  executables: []
38
39
 
39
40
  extensions: []