davclient 0.0.7 → 0.0.8
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/Rakefile +1 -1
- data/davclient.gemspec +2 -2
- data/lib/davclient.rb +9 -3
- data/lib/davclient/hpricot_extensions.rb +1 -0
- metadata +2 -2
data/Rakefile
CHANGED
data/davclient.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{davclient}
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.8"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Thomas Flemming"]
|
9
|
-
s.date = %q{2009-10-
|
9
|
+
s.date = %q{2009-10-21}
|
10
10
|
s.default_executable = %q{dav}
|
11
11
|
s.description = %q{Command line WebDAV client and Ruby library.}
|
12
12
|
s.email = %q{thomasfl@usit.uio.no}
|
data/lib/davclient.rb
CHANGED
@@ -42,7 +42,9 @@ module WebDAV
|
|
42
42
|
return $CWURL if($CWURL)
|
43
43
|
cwurl = nil
|
44
44
|
filename = DavClient.cwurl_filename
|
45
|
-
|
45
|
+
if(File.exists?(filename))
|
46
|
+
File.open(filename, 'r') {|f| cwurl = f.read() }
|
47
|
+
end
|
46
48
|
return cwurl
|
47
49
|
end
|
48
50
|
|
@@ -111,6 +113,7 @@ module WebDAV
|
|
111
113
|
def self.CWURL=(url)
|
112
114
|
$CWURL = url
|
113
115
|
File.open(DavClient.cwurl_filename, 'w') {|f| f.write(url) }
|
116
|
+
# puts "DEBUG: writing " + DavClient.cwurl_filename
|
114
117
|
end
|
115
118
|
|
116
119
|
|
@@ -189,7 +192,7 @@ module WebDAV
|
|
189
192
|
#
|
190
193
|
# Examples:
|
191
194
|
#
|
192
|
-
# result = find( url )
|
195
|
+
# result = find( url [:type => "collection"|"resource"] [:recursive => true])
|
193
196
|
#
|
194
197
|
# result = find( url, :type => "collection" ,:recursive => true)
|
195
198
|
#
|
@@ -277,7 +280,10 @@ module WebDAV
|
|
277
280
|
yield item
|
278
281
|
end
|
279
282
|
end
|
280
|
-
|
283
|
+
|
284
|
+
# TODO BUG: Item is not yielded if :type => "resource" is given...
|
285
|
+
# puts "DEBUG: " + type + " " + item.isCollection?.to_s
|
286
|
+
if( (type == "file" or type == "resource") and item.isCollection? == false )then
|
281
287
|
items_filtered.push(item)
|
282
288
|
if(block) then
|
283
289
|
yield item
|
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.8
|
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-10-
|
12
|
+
date: 2009-10-21 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|