Add support for Extended MKCOL (RFC5689)
This commit is contained in:
committed by
Brandon Robins
parent
46ff7a934f
commit
3b65768e40
26
spec/support/examples/ext_mkcol.rb
Normal file
26
spec/support/examples/ext_mkcol.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
# frozen_string_literal: false
|
||||
|
||||
module Support
|
||||
module Examples
|
||||
module ExtMkcol
|
||||
# RFC5689: 3.4. Successful Extended MKCOL Request
|
||||
def self.rfc5689_3_4
|
||||
<<~XML
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<D:mkcol xmlns:D="DAV:"
|
||||
xmlns:E="http://example.com/ns/">
|
||||
<D:set>
|
||||
<D:prop>
|
||||
<D:resourcetype>
|
||||
<D:collection/>
|
||||
<E:special-resource/>
|
||||
</D:resourcetype>
|
||||
<D:displayname>Special Resource</D:displayname>
|
||||
</D:prop>
|
||||
</D:set>
|
||||
</D:mkcol>
|
||||
XML
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -1,7 +1,7 @@
|
||||
module ActionDispatch
|
||||
module Integration
|
||||
module RequestHelpers
|
||||
%w[copy move mkcol propfind proppatch lock unlock].each do |method|
|
||||
%w[copy move mkcol options propfind proppatch lock unlock].each do |method|
|
||||
define_method method do |path, **args|
|
||||
process method.to_sym, path, **args
|
||||
end
|
||||
Reference in New Issue
Block a user