epp-xml 0.7.0 → 0.8.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 01fc42c3e5b120b9a12230dcf4f1c9608fbe5964
4
- data.tar.gz: c2a0717a978b370d7f6823eb8f14ca23a5319475
3
+ metadata.gz: 9cc914a1998b173168323fa9319c8a1805ae3342
4
+ data.tar.gz: b98f19b224b1ccc3d72e0ca73b01847b604cdb84
5
5
  SHA512:
6
- metadata.gz: 0d9435f8154d3e487b229b32a531d6abb740e50fca05099ac9d0453d93f76946deff2aadb0963d2c07c80c1896fa2df9800d0b7fa3c236e29ed67f21bdebb624
7
- data.tar.gz: b3a0f54d5cfa83050ed0c2873ab44f12ad9d15975d0cb72f79232807a4d1f28a86391b9d2950350f3e22c9ae3810bbbb21d7f8cee46ae94eacca6c2c8ec8ddbd
6
+ metadata.gz: 134f03ab3232b842a877556b5e47f15a4903a14faf816997e3528f9c3e13ed05ae9241d89508b35549109554209531cdcda96fa2dbc739ac79900258c5f46115
7
+ data.tar.gz: b3e6fce628cf656dccb756853f4d7874bdc9f50c187de874452097ac8a3e8e088bda319f880eead810abac352b62da3056c1b9ebd5a32f32b2a5d235f95c846e
@@ -0,0 +1,39 @@
1
+ module EppXmlCore
2
+ module Keyrelay
3
+ def keyrelay(xml_params = {})
4
+ xml = Builder::XmlMarkup.new
5
+
6
+ xml.instruct!(:xml, standalone: 'no')
7
+ xml.epp(
8
+ 'xmlns' => 'urn:ietf:params:xml:ns:epp-1.0',
9
+ 'xmlns:secDNS' => 'urn:ietf:params:xml:ns:secDNS-1.1',
10
+ 'xmlns:domain' => 'urn:ietf:params:xml:ns:domain-1.0',
11
+ 'xmlns:ext' => 'urn:ietf:params:xml:ns:keyrelay-1.0'
12
+ ) do
13
+ xml.extension do
14
+ xml.tag!('ext:command') do
15
+ xml.tag!('ext:keyrelay') do
16
+
17
+ xml.tag!('ext:name', xml_params[:name][:value])
18
+
19
+ xml.tag!('ext:keyData') do
20
+ EppXml.generate_xml_from_hash(xml_params[:keyData], xml, 'secDNS:')
21
+ end
22
+
23
+ xml.tag!('ext:authInfo') do
24
+ EppXml.generate_xml_from_hash(xml_params[:authInfo], xml, 'domain:')
25
+ end
26
+
27
+ xml.tag!('ext:expiry') do
28
+ EppXml.generate_xml_from_hash(xml_params[:expiry], xml, 'ext:')
29
+ end if xml_params[:expiry]
30
+
31
+ end
32
+ xml.tag!('ext:clTRID', 'ABC-12345')
33
+ end
34
+ end
35
+ end
36
+ end
37
+
38
+ end
39
+ end
data/lib/epp-xml.rb CHANGED
@@ -3,6 +3,7 @@ require 'builder'
3
3
  require 'epp-xml/session'
4
4
  require 'epp-xml/domain'
5
5
  require 'epp-xml/contact'
6
+ require 'epp-xml/keyrelay'
6
7
 
7
8
  module EppXml
8
9
  class Session
@@ -17,6 +18,10 @@ module EppXml
17
18
  extend ::EppXmlCore::Contact
18
19
  end
19
20
 
21
+ class Keyrelay
22
+ extend ::EppXmlCore::Keyrelay
23
+ end
24
+
20
25
  def self.generate_xml_from_hash(xml_params, xml, ns = '')
21
26
  xml_params.each do |k, v|
22
27
  # Value is a hash which has string type value
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epp-xml
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GiTLAB LTD
@@ -75,6 +75,7 @@ files:
75
75
  - lib/epp-xml.rb
76
76
  - lib/epp-xml/contact.rb
77
77
  - lib/epp-xml/domain.rb
78
+ - lib/epp-xml/keyrelay.rb
78
79
  - lib/epp-xml/session.rb
79
80
  homepage: https://github.com/gitlabeu/epp-xml
80
81
  licenses: