davclient 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/davclient.rb +26 -0
- data/lib/davclient/davcli.rb +3 -0
- metadata +3 -3
data/lib/davclient.rb
CHANGED
@@ -88,6 +88,32 @@ module WebDAV
|
|
88
88
|
File.open(cwurl_filename, 'w') {|f| f.write(url) }
|
89
89
|
end
|
90
90
|
|
91
|
+
# Lock resource
|
92
|
+
#
|
93
|
+
def self.lock(*args)
|
94
|
+
url = args[0]
|
95
|
+
|
96
|
+
end
|
97
|
+
|
98
|
+
# Original code from davlib.py
|
99
|
+
#
|
100
|
+
# def lock(self, url, owner='', timeout=None, depth=None,
|
101
|
+
# scope='exclusive', type='write', extra_hdrs={ }):
|
102
|
+
# headers = extra_hdrs.copy()
|
103
|
+
# headers['Content-Type'] = XML_CONTENT_TYPE
|
104
|
+
# if depth is not None:
|
105
|
+
# headers['Depth'] = str(depth)
|
106
|
+
# if timeout is not None:
|
107
|
+
# headers['Timeout'] = timeout
|
108
|
+
# body = XML_DOC_HEADER + \
|
109
|
+
# '<DAV:lockinfo xmlns:DAV="DAV:">' + \
|
110
|
+
# '<DAV:lockscope><DAV:%s/></DAV:lockscope>' % scope + \
|
111
|
+
# '<DAV:locktype><DAV:%s/></DAV:locktype>' % type + \
|
112
|
+
# owner + \
|
113
|
+
# '</DAV:lockinfo>'
|
114
|
+
# return self._request('LOCK', url, body, extra_hdrs=headers)
|
115
|
+
|
116
|
+
|
91
117
|
# Get content of resource as string
|
92
118
|
#
|
93
119
|
# Example:
|
data/lib/davclient/davcli.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: davclient
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Flemming
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-09-
|
12
|
+
date: 2009-09-11 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -23,7 +23,7 @@ dependencies:
|
|
23
23
|
version: "0.6"
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
|
-
name:
|
26
|
+
name: ZenTest
|
27
27
|
type: :runtime
|
28
28
|
version_requirement:
|
29
29
|
version_requirements: !ruby/object:Gem::Requirement
|