epp-xml 0.10.0 → 0.10.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8ecdf055fc60d2165333b26890a4468e2cca8eb
4
- data.tar.gz: c3cedc145e9b3cc61eb0ee54594baf0d826ffeb8
3
+ metadata.gz: a6e014f16dd7adb1748dd3015f6355ac4518b7ef
4
+ data.tar.gz: c7e957b18dd5760bda52a325473a06d38aee0ebb
5
5
  SHA512:
6
- metadata.gz: f001b44e7ab189e32449e9bdf3026e047a40fea22cdfccf3c242730917b842d27b62f50fb2cc7e0df011e94147a16068017334470f457f3916d996eed00af942
7
- data.tar.gz: cf25c49ae2c099f185dec83f03da77510d8009f9a37e9278185398cd780ba2ae127044c87bde4abd9b073537c5ce485a14d8f8cc9793647d937571a82a85588f
6
+ metadata.gz: 828c3c112bc24d0af011a499beab2e7525cd79a5f347110741f3accf0b90b4a5da4697a1a00da7e20a55207a8c5e776f3d780b77453d0f28abf9782e179bc5b1
7
+ data.tar.gz: 486e13682b3b075e73dc02117d98e637a109ba23b763f10fe3e74b3e015878a10e2ea0f9d0ae89f2f2d9c6484f4fcc477c95aec35292eed73c5fa618ee961b2c
@@ -0,0 +1,14 @@
1
+ module ClientTransactionId
2
+ attr_accessor :cl_trid_prefix, :cl_trid
3
+
4
+ def initialize(args = {})
5
+ self.cl_trid = args[:cl_trid]
6
+ self.cl_trid_prefix = args[:cl_trid_prefix]
7
+ end
8
+
9
+ def clTRID
10
+ return cl_trid if cl_trid
11
+ return "#{cl_trid_prefix}-#{Time.now.to_i}" if cl_trid_prefix
12
+ Time.now.to_i
13
+ end
14
+ end
@@ -1,6 +1,8 @@
1
- module EppXml
1
+ require 'client_transaction_id'
2
+
3
+ class EppXml
2
4
  class Contact
3
- include EppXml
5
+ include ClientTransactionId
4
6
 
5
7
  def create(xml_params = {})
6
8
  build('create', xml_params)
@@ -1,6 +1,8 @@
1
- module EppXml
1
+ require 'client_transaction_id'
2
+
3
+ class EppXml
2
4
  class Domain
3
- include EppXml
5
+ include ClientTransactionId
4
6
 
5
7
  def info(xml_params = {})
6
8
  build('info', xml_params)
@@ -1,6 +1,8 @@
1
- module EppXml
1
+ require 'client_transaction_id'
2
+
3
+ class EppXml
2
4
  class Keyrelay
3
- include EppXml
5
+ include ClientTransactionId
4
6
 
5
7
  def keyrelay(xml_params = {})
6
8
  xml = Builder::XmlMarkup.new
@@ -1,6 +1,8 @@
1
- module EppXml
1
+ require 'client_transaction_id'
2
+
3
+ class EppXml
2
4
  class Session
3
- include EppXml
5
+ include ClientTransactionId
4
6
 
5
7
  def login(xml_params = {})
6
8
  defaults = {
data/lib/epp-xml.rb CHANGED
@@ -4,19 +4,25 @@ require 'epp-xml/session'
4
4
  require 'epp-xml/domain'
5
5
  require 'epp-xml/contact'
6
6
  require 'epp-xml/keyrelay'
7
+ require 'client_transaction_id'
7
8
 
8
- module EppXml
9
- attr_accessor :cl_trid_prefix, :cl_trid
9
+ class EppXml
10
+ include ClientTransactionId
10
11
 
11
- def initialize(args = {})
12
- self.cl_trid = args[:cl_trid]
13
- self.cl_trid_prefix = args[:cl_trid_prefix]
12
+ def domain
13
+ @cached_domain ||= EppXml::Domain.new(cl_trid: cl_trid, cl_trid_prefix: cl_trid_prefix)
14
14
  end
15
15
 
16
- def clTRID
17
- return cl_trid if cl_trid
18
- return "#{cl_trid_prefix}-#{Time.now.to_i}" if cl_trid_prefix
19
- Time.now.to_i
16
+ def contact
17
+ @cached_contact ||= EppXml::Contact.new(cl_trid: cl_trid, cl_trid_prefix: cl_trid_prefix)
18
+ end
19
+
20
+ def session
21
+ @cached_session ||= EppXml::Session.new(cl_trid: cl_trid, cl_trid_prefix: cl_trid_prefix)
22
+ end
23
+
24
+ def keyrelay
25
+ @cached_keyrelay ||= EppXml::Keyrelay.new(cl_trid: cl_trid, cl_trid_prefix: cl_trid_prefix)
20
26
  end
21
27
 
22
28
  class << self
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.10.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GiTLAB LTD
@@ -72,6 +72,7 @@ executables: []
72
72
  extensions: []
73
73
  extra_rdoc_files: []
74
74
  files:
75
+ - lib/client_transaction_id.rb
75
76
  - lib/epp-xml.rb
76
77
  - lib/epp-xml/contact.rb
77
78
  - lib/epp-xml/domain.rb