net_dav 0.4.0 → 0.4.1

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/README.rdoc CHANGED
@@ -25,6 +25,11 @@ http://wiki.github.com/tenderlove/nokogiri/what-to-do-if-libxml2-is-being-a-jerk
25
25
  end with a slash, otherwise it is assumed that the last component is a file
26
26
  and "." will refer to the parent.)
27
27
 
28
+ == Documentation
29
+
30
+ RDoc: http://rdoc.info/projects/devrandom/net_dav
31
+ Wiki: http://wiki.github.com/devrandom/net_dav
32
+
28
33
  == Performance
29
34
 
30
35
  This should be threadsafe if you use a different Net::DAV object
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.0
1
+ 0.4.1
data/lib/net/dav.rb CHANGED
@@ -534,6 +534,7 @@ module Net #:nodoc:
534
534
  # Example:
535
535
  # dav.proppatch(uri.path,"<d:creationdate>#{new_date}</d:creationdate>")
536
536
  def proppatch(path, xml_snippet)
537
+ path = @uri.merge(path).path
537
538
  headers = {'Depth' => '1'}
538
539
  body = '<?xml version="1.0"?>' +
539
540
  '<d:propertyupdate xmlns:d="DAV:">' +
data/net_dav.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{net_dav}
8
- s.version = "0.4.0"
8
+ s.version = "0.4.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Miron Cuperman", "Thomas Flemming"]
12
- s.date = %q{2009-12-10}
12
+ s.date = %q{2009-12-16}
13
13
  s.default_executable = %q{dav}
14
14
  s.description = %q{WebDAV client library in the style of Net::HTTP, using Net::HTTP and libcurl, if installed}
15
15
  s.email = %q{c1.github@niftybox.net}
@@ -6,10 +6,10 @@ describe "Net::Dav" do
6
6
  before(:all) do
7
7
  # Start webdav server in subprocess
8
8
  @pid = fork do
9
- webdav_server(:port => 10080,:authentication => false)
9
+ webdav_server(:port => 10080, :authentication => false)
10
10
  end
11
11
  # Wait for webdavserver to start
12
- sleep(10)
12
+ wait_for_server("http://localhost:10080/")
13
13
  end
14
14
 
15
15
  it "should create a Net::Dav object" do
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,29 @@ Spec::Runner.configure do |config|
9
9
 
10
10
  end
11
11
 
12
+ # Wait for webdav server to start up
13
+ def wait_for_server(address)
14
+ server_running = false
15
+ dav = Net::DAV.new(address)
16
+ count = 0
17
+ while(not(server_running))
18
+ begin
19
+ sleep(0.1)
20
+ props = dav.propfind("/").to_s
21
+ if(props.match(/200 OK/))
22
+ server_running = true
23
+ else
24
+ warn "Webdav server should return \"200 OK\" "
25
+ exit(1)
26
+ end
27
+ rescue
28
+ count += 1
29
+ puts "Server not running. Retrying..." if ((count % 10) == 0)
30
+ end
31
+ end
32
+ dav = nil
33
+ end
34
+
12
35
  # Profind helper. Returns properties or error
13
36
  def find_props_or_error(dav, path)
14
37
  begin
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net_dav
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miron Cuperman
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2009-12-10 00:00:00 -08:00
13
+ date: 2009-12-18 00:00:00 +01:00
14
14
  default_executable: dav
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -99,6 +99,6 @@ signing_key:
99
99
  specification_version: 3
100
100
  summary: WebDAV client library in the style of Net::HTTP
101
101
  test_files:
102
- - spec/spec_helper.rb
103
- - spec/integration/webdav_server.rb
104
102
  - spec/integration/net_dav_spec.rb
103
+ - spec/integration/webdav_server.rb
104
+ - spec/spec_helper.rb