rack_dav 0.1.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/CHANGELOG.md +27 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +31 -0
- data/README.md +14 -15
- data/Rakefile +36 -0
- data/bin/rack_dav +11 -7
- data/lib/rack_dav.rb +1 -3
- data/lib/rack_dav/controller.rb +300 -218
- data/lib/rack_dav/file_resource.rb +48 -32
- data/lib/rack_dav/handler.rb +19 -12
- data/lib/rack_dav/http_status.rb +10 -10
- data/lib/rack_dav/resource.rb +21 -17
- data/lib/rack_dav/string.rb +28 -0
- data/lib/rack_dav/version.rb +16 -0
- data/rack_dav.gemspec +22 -26
- data/spec/controller_spec.rb +498 -0
- data/spec/file_resource_spec.rb +11 -0
- data/spec/fixtures/folder/01.txt +0 -0
- data/spec/fixtures/folder/02.txt +0 -0
- data/spec/fixtures/requests/lock.xml +12 -0
- data/spec/handler_spec.rb +23 -256
- data/spec/spec_helper.rb +27 -0
- data/spec/support/lockable_file_resource.rb +30 -0
- metadata +107 -50
- data/lib/rack_dav/builder_namespace.rb +0 -22
@@ -1,22 +0,0 @@
|
|
1
|
-
|
2
|
-
module Builder
|
3
|
-
|
4
|
-
class XmlBase
|
5
|
-
def namespace(ns)
|
6
|
-
old_namespace = @namespace
|
7
|
-
@namespace = ns
|
8
|
-
yield
|
9
|
-
@namespace = old_namespace
|
10
|
-
self
|
11
|
-
end
|
12
|
-
|
13
|
-
alias_method :method_missing_without_namespace, :method_missing
|
14
|
-
|
15
|
-
def method_missing(sym, *args, &block)
|
16
|
-
sym = "#{@namespace}:#{sym}" if @namespace
|
17
|
-
method_missing_without_namespace(sym, *args, &block)
|
18
|
-
end
|
19
|
-
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|