epp-client-base 0.11.1 → 0.12.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  module EPPClient
2
2
  module Domain
3
3
  EPPClient::Poll::PARSERS['domain:panData'] = :domain_pending_action_process
4
+ EPPClient::Poll::PARSERS['domain:trnData'] = :domain_transfer_response
4
5
 
5
6
  def domain_check_xml(*domains) # :nodoc:
6
7
  command do |xml|
@@ -390,5 +391,21 @@ module EPPClient
390
391
  :paDate => DateTime.parse(dom.xpath('domain:paDate', EPPClient::SCHEMAS_URL).text),
391
392
  }
392
393
  end
394
+
395
+ def domain_transfer_response(xml) #:nodoc:
396
+ dom = xml.xpath('epp:resData/domain:trnData', EPPClient::SCHEMAS_URL)
397
+ ret = {
398
+ :name => dom.xpath('domain:name', EPPClient::SCHEMAS_URL).text,
399
+ :trStatus => dom.xpath('domain:trStatus', EPPClient::SCHEMAS_URL).text,
400
+ :reID => dom.xpath('domain:reID', EPPClient::SCHEMAS_URL).text,
401
+ :reDate => DateTime.parse(dom.xpath('domain:reDate', EPPClient::SCHEMAS_URL).text),
402
+ :acID => dom.xpath('domain:acID', EPPClient::SCHEMAS_URL).text,
403
+ :acDate => DateTime.parse(dom.xpath('domain:acDate', EPPClient::SCHEMAS_URL).text)
404
+ }
405
+ if (exDate = dom.xpath('domain:exDate', EPPClient::SCHEMAS_URL)).size > 0
406
+ ret[:exDate] = DateTime.parse(exDate)
407
+ end
408
+ ret
409
+ end
393
410
  end
394
411
  end
@@ -35,8 +35,9 @@ module EPPClient
35
35
  ret[:msg] = msg.text
36
36
  ret[:msg_xml] = msg.to_s
37
37
  end
38
- if (obj = xml.xpath('epp:resData', EPPClient::SCHEMAS_URL)).size > 0
39
- ret[:obj_xml] = obj.to_s
38
+ if (obj = xml.xpath('epp:resData', EPPClient::SCHEMAS_URL)).size > 0 ||
39
+ (obj = xml.xpath('epp:extension', EPPClient::SCHEMAS_URL)).size > 0
40
+ ret[:obj_xml] = obj.to_s
40
41
  PARSERS.each do |xpath,parser|
41
42
  if obj.xpath(xpath, EPPClient::SCHEMAS_URL).size > 0
42
43
  ret[:obj] = case parser
@@ -1,3 +1,3 @@
1
1
  module EPPClient
2
- VERSION = "0.11.1"
2
+ VERSION = "0.12.0"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epp-client-base
3
3
  version: !ruby/object:Gem::Version
4
- hash: 49
4
+ hash: 47
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 11
9
- - 1
10
- version: 0.11.1
8
+ - 12
9
+ - 0
10
+ version: 0.12.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mathieu Arnold
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-07 00:00:00 Z
18
+ date: 2013-07-02 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler