Merge branch 'experimental-live-schema-support'

This commit is contained in:
Martin Lensment 2015-07-27 16:24:26 +03:00
commit 48af3e77cd
65 changed files with 1346 additions and 1205 deletions

View file

@ -0,0 +1,3 @@
EPP_SCHEMA = Nokogiri::XML::Schema(File.read("lib/schemas/epp-1.0.xsd"))
DOMAIN_SCHEMA = Nokogiri::XML::Schema(File.read("lib/schemas/domain-eis-1.0.xsd"))
CONTACT_SCHEMA = Nokogiri::XML::Schema(File.read("lib/schemas/contact-eis-1.0.xsd"))

View file

@ -2,15 +2,15 @@ require 'epp_constraint'
Rails.application.routes.draw do
namespace(:epp, defaults: { format: :xml }) do
match 'session/:action', controller: 'sessions', via: :all
match 'session/pki/:action', controller: 'sessions', via: :all
match 'session/:action', controller: 'sessions', via: :all, constraints: EppConstraint.new(:session)
match 'session/pki/:action', controller: 'sessions', via: :all, constraints: EppConstraint.new(:session)
post 'command/:action', controller: 'domains', constraints: EppConstraint.new(:domain)
post 'command/:action', controller: 'contacts', constraints: EppConstraint.new(:contact)
post 'command/poll', to: 'polls#poll', constraints: EppConstraint.new(:poll)
post 'command/keyrelay', to: 'keyrelays#keyrelay', constraints: EppConstraint.new(:keyrelay)
post 'command/:command', to: 'errors#not_found' # fallback route
post 'command/:command', to: 'errors#not_found', constraints: EppConstraint.new(:not_found) # fallback route
get 'error/:command', to: 'errors#error'
end