Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated domain versions #10

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
1.0.5
* lib/epp-xml/domain.rb : all tag strings moved to class constants

2.0.0
* EPP XML schema "eis-1.0.xsd" replaced with "ee-1.1.xsd"

* lib/epp-xml/domain.rb (delete method):
- added extra argument for 'delete' action verification
- deleted usage of 'build' method
Expand Down
2 changes: 1 addition & 1 deletion epp-xml.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'epp-xml'
s.version = '1.1.0'
s.version = '2.0.0'
s.summary = 'Gem for generating XML for EIS EPP requests'
s.description = 'Gem for generating valid XML for EIS Extensible Provisioning Protocol requests'
s.author = 'Estonian Internet Foundation'
Expand Down
2 changes: 1 addition & 1 deletion lib/epp-xml/domain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Domain

XMLNS = 'https://epp.tld.ee/schema/epp-ee-1.0.xsd'.freeze

XMLNS_DOMAIN = 'https://epp.tld.ee/schema/domain-eis-1.0.xsd'.freeze
XMLNS_DOMAIN = 'https://epp.tld.ee/schema/domain-ee-1.1.xsd'.freeze

XMLNS_SECDNS = 'urn:ietf:params:xml:ns:secDNS-1.1'.freeze

Expand Down
2 changes: 1 addition & 1 deletion lib/epp-xml/keyrelay.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def keyrelay(xml_params = {}, custom_params = {})
xml.epp(
'xmlns' => 'https://epp.tld.ee/schema/epp-ee-1.0.xsd',
'xmlns:secDNS' => 'urn:ietf:params:xml:ns:secDNS-1.1',
'xmlns:domain' => 'https://epp.tld.ee/schema/domain-eis-1.0.xsd',
'xmlns:domain' => 'https://epp.tld.ee/schema/domain-ee-1.1.xsd',
'xmlns:ext' => 'urn:ietf:params:xml:ns:keyrelay-1.0'
) do
xml.tag!('command') do
Expand Down
2 changes: 1 addition & 1 deletion lib/epp-xml/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def login(xml_params = {})
},
svcs: {
_objURIs: [
{ objURI: { value: 'https://epp.tld.ee/schema/domain-eis-1.0.xsd' } },
{ objURI: { value: 'https://epp.tld.ee/schema/domain-ee-1.1.xsd' } },
{ objURI: { value: 'https://epp.tld.ee/schema/contact-ee-1.1.xsd' } },
{ objURI: { value: 'urn:ietf:params:xml:ns:host-1.0' } },
{ objURI: { value: 'urn:ietf:params:xml:ns:keyrelay-1.0' } }
Expand Down
41 changes: 21 additions & 20 deletions spec/domain_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<command>
<create>
<domain:create
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd" />
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd" />
</create>
<clTRID>ABC-12345</clTRID>
</command>
Expand All @@ -26,7 +26,7 @@
<command>
<create>
<domain:create
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>one.ee</domain:name>
<domain:period unit="d">345</domain:period>
<domain:ns>
Expand Down Expand Up @@ -69,7 +69,7 @@
<command>
<create>
<domain:create
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>one.ee</domain:name>
</domain:create>
</create>
Expand All @@ -96,7 +96,7 @@
<command>
<create>
<domain:create
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>one.ee</domain:name>
<domain:period unit="d">345</domain:period>
<domain:ns>
Expand Down Expand Up @@ -187,7 +187,7 @@
<command>
<create>
<domain:create
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>one.ee</domain:name>
<domain:period unit="d">345</domain:period>
<domain:ns>
Expand Down Expand Up @@ -255,7 +255,7 @@
<command>
<info>
<domain:info
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd" />
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd" />
</info>
<clTRID>ABC-12345</clTRID>
</command>
Expand All @@ -271,7 +271,7 @@
<command>
<info>
<domain:info
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name hosts="sub">one.ee</domain:name>
<domain:authInfo>
<domain:pw>b3rafsla</domain:pw>
Expand Down Expand Up @@ -300,7 +300,7 @@
<command>
<check>
<domain:check
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd" />
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd" />
</check>
<clTRID>ABC-12345</clTRID>
</command>
Expand All @@ -315,7 +315,7 @@
<command>
<check>
<domain:check
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>example.ee</domain:name>
<domain:name>example2.ee</domain:name>
<domain:name>example3.ee</domain:name>
Expand Down Expand Up @@ -345,7 +345,7 @@
<command>
<update>
<domain:update
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>example.ee</domain:name>
<domain:add>
<domain:ns>
Expand Down Expand Up @@ -408,7 +408,7 @@
<command>
<update>
<domain:update
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>one.ee</domain:name>
<domain:add>
<domain:contact type="admin">sh8013</domain:contact>
Expand Down Expand Up @@ -469,7 +469,7 @@
<command>
<update>
<domain:update
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>example.ee</domain:name>
<domain:chg>
<domain:registrant>mak21</domain:registrant>
Expand All @@ -496,7 +496,7 @@
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<command>
<update>
<domain:update xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
<domain:update xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>example.ee</domain:name>
</domain:update>
</update>
Expand Down Expand Up @@ -586,7 +586,7 @@
<command>
<delete>
<domain:delete
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd" />
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd" verified="no" />
</delete>
<clTRID>ABC-12345</clTRID>
</command>
Expand All @@ -596,12 +596,13 @@
generated = Nokogiri::XML(epp_xml.domain.delete).to_s.squish
expect(generated).to eq(expected)


expected = Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd">
<command>
<delete>
<domain:delete
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd" verified="no">
<domain:name>one.ee</domain:name>
</domain:delete>
</delete>
Expand All @@ -614,7 +615,7 @@
<clTRID>ABC-12345</clTRID>
</command>
</epp>
').to_s.squish
').to_s.squish

xml = epp_xml.domain.delete({
name: { value: 'one.ee' }
Expand All @@ -634,7 +635,7 @@
<command>
<renew>
<domain:renew
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd" />
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd" />
</renew>
<clTRID>ABC-12345</clTRID>
</command>
Expand All @@ -649,7 +650,7 @@
<command>
<renew>
<domain:renew
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>one.ee</domain:name>
<domain:curExpDate>2009-11-15</domain:curExpDate>
<domain:period unit="d">365</domain:period>
Expand All @@ -676,7 +677,7 @@
<command>
<transfer op="query">
<domain:transfer
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd" />
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd" />
</transfer>
<clTRID>ABC-12345</clTRID>
</command>
Expand All @@ -691,7 +692,7 @@
<command>
<transfer op="approve">
<domain:transfer
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd">
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd">
<domain:name>one.ee</domain:name>
<domain:authInfo>
<domain:pw roid="askdf">test</domain:pw>
Expand Down
4 changes: 2 additions & 2 deletions spec/keyrelay_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
expected = Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd"
xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1"
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd"
xmlns:ext="urn:ietf:params:xml:ns:keyrelay-1.0">
<command>
<ext:keyrelay>
Expand Down Expand Up @@ -61,7 +61,7 @@
expected = Nokogiri::XML('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<epp xmlns="https://epp.tld.ee/schema/epp-ee-1.0.xsd"
xmlns:secDNS="urn:ietf:params:xml:ns:secDNS-1.1"
xmlns:domain="https://epp.tld.ee/schema/domain-eis-1.0.xsd"
xmlns:domain="https://epp.tld.ee/schema/domain-ee-1.1.xsd"
xmlns:ext="urn:ietf:params:xml:ns:keyrelay-1.0">
<command>
<ext:keyrelay>
Expand Down
4 changes: 2 additions & 2 deletions spec/session_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<lang>en</lang>
</options>
<svcs>
<objURI>https://epp.tld.ee/schema/domain-eis-1.0.xsd</objURI>
<objURI>https://epp.tld.ee/schema/domain-ee-1.1.xsd</objURI>
<objURI>https://epp.tld.ee/schema/contact-ee-1.1.xsd</objURI>
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:keyrelay-1.0</objURI>
Expand Down Expand Up @@ -47,7 +47,7 @@
<lang>en</lang>
</options>
<svcs>
<objURI>https://epp.tld.ee/schema/domain-eis-1.0.xsd</objURI>
<objURI>https://epp.tld.ee/schema/domain-ee-1.1.xsd</objURI>
<objURI>https://epp.tld.ee/schema/contact-ee-1.1.xsd</objURI>
<objURI>urn:ietf:params:xml:ns:host-1.0</objURI>
<objURI>urn:ietf:params:xml:ns:keyrelay-1.0</objURI>
Expand Down