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.
@@ -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:
@@ -110,6 +110,9 @@ class DavCLI
110
110
  end
111
111
 
112
112
  def self.dav(args)
113
+
114
+ $0 = $0.sub(/.*\//,"").sub(/.rb$/,"")
115
+
113
116
  command = args[0]
114
117
 
115
118
  if(command == "-h" or command =~ /help/ or command =~ /\?/) then
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.3
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-10 00:00:00 +02:00
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: zentest
26
+ name: ZenTest
27
27
  type: :runtime
28
28
  version_requirement:
29
29
  version_requirements: !ruby/object:Gem::Requirement