dav4rack 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dav4rack/controller.rb +1 -1
- data/lib/dav4rack/version.rb +1 -1
- data/spec/handler_spec.rb +2 -2
- metadata +4 -4
data/lib/dav4rack/controller.rb
CHANGED
@@ -70,7 +70,7 @@ module DAV4Rack
|
|
70
70
|
raise Conflict unless resource.parent_exists? && resource.parent.collection?
|
71
71
|
resource.lock_check
|
72
72
|
status = resource.put(request, response)
|
73
|
-
response['
|
73
|
+
response['Location'] = "#{scheme}://#{host}:#{port}#{resource.public_path}" if status == Created
|
74
74
|
status
|
75
75
|
end
|
76
76
|
|
data/lib/dav4rack/version.rb
CHANGED
data/spec/handler_spec.rb
CHANGED
@@ -121,7 +121,7 @@ describe DAV4Rack::Handler do
|
|
121
121
|
|
122
122
|
it 'should return an absolute url after a put request' do
|
123
123
|
put('/test', :input => 'body').should be_created
|
124
|
-
response['
|
124
|
+
response['location'].should =~ /http:\/\/localhost(:\d+)?\/test/
|
125
125
|
end
|
126
126
|
|
127
127
|
it 'should create and find a url with escaped characters' do
|
@@ -309,7 +309,7 @@ describe DAV4Rack::Handler do
|
|
309
309
|
it "should return correct urls" do
|
310
310
|
# FIXME: a put to '/test' works, too -- should it?
|
311
311
|
put('/webdav/test', :input => 'body').should be_created
|
312
|
-
response.headers['
|
312
|
+
response.headers['location'].should =~ /http:\/\/localhost(:\d+)?\/webdav\/test/
|
313
313
|
end
|
314
314
|
end
|
315
315
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dav4rack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 6
|
10
|
+
version: 0.2.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Roberts
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-08-
|
18
|
+
date: 2011-08-23 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|