remove deprecated URI.escape/unescape
This commit is contained in:
parent
430f485998
commit
385bcb95b3
@ -21,6 +21,7 @@
|
|||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
require 'dav4rack'
|
require 'dav4rack'
|
||||||
|
require 'addressable/uri'
|
||||||
|
|
||||||
module RedmineDmsf
|
module RedmineDmsf
|
||||||
module Webdav
|
module Webdav
|
||||||
@ -88,7 +89,7 @@ module RedmineDmsf
|
|||||||
Confict unless collection?
|
Confict unless collection?
|
||||||
entities = children.map{ |child|
|
entities = children.map{ |child|
|
||||||
DIR_FILE % [
|
DIR_FILE % [
|
||||||
"#{@options[:root_uri_path]}#{URI.encode(child.path)}",
|
"#{@options[:root_uri_path]}#{Addressable::URI.encode(child.path)}",
|
||||||
child.long_name || child.name,
|
child.long_name || child.name,
|
||||||
child.collection? ? '' : number_to_human_size(child.content_length),
|
child.collection? ? '' : number_to_human_size(child.content_length),
|
||||||
child.special_type || child.content_type,
|
child.special_type || child.content_type,
|
||||||
@ -96,7 +97,7 @@ module RedmineDmsf
|
|||||||
]
|
]
|
||||||
} * "\n"
|
} * "\n"
|
||||||
entities = DIR_FILE % [
|
entities = DIR_FILE % [
|
||||||
URI.encode(parent.public_path),
|
Addressable::URI.encode(parent.public_path),
|
||||||
l(:parent_directory),
|
l(:parent_directory),
|
||||||
'',
|
'',
|
||||||
'',
|
'',
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class DmsfWebdavGetTest < RedmineDmsf::Test::IntegrationTest
|
|||||||
assert !response.body.match(@project1.identifier).nil?,
|
assert !response.body.match(@project1.identifier).nil?,
|
||||||
"Expected to find project #{@project1.identifier} in return data"
|
"Expected to find project #{@project1.identifier} in return data"
|
||||||
Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] = true
|
Setting.plugin_redmine_dmsf['dmsf_webdav_use_project_names'] = true
|
||||||
project1_uri = URI.encode(RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1))
|
project1_uri = Addressable::URI.encode(RedmineDmsf::Webdav::ProjectResource.create_project_name(@project1))
|
||||||
get '/dmsf/webdav', params: nil, headers: @admin
|
get '/dmsf/webdav', params: nil, headers: @admin
|
||||||
assert_response :success
|
assert_response :success
|
||||||
assert_no_match @project1.identifier, response.body
|
assert_no_match @project1.identifier, response.body
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user