Coder Social home page Coder Social logo

net_dav's Introduction

Net::Dav library, in the style of Net::HTTP

Install

Installing the gem:

gem install net_dav

and if you want acceleration for large files (from 4MB/s to 20MB/s in my setup):

gem install curb

If you’re having install issues with nokogiri on Mac OS X read wiki.github.com/tenderlove/nokogiri/what-to-do-if-libxml2-is-being-a-jerk

Usage

Net::DAV.start("https://localhost.localdomain/xyz/") { |dav|
  find('.', :recursive => true) do | item |
     item.content = item.content.gsub(/silly/i, "funny")
  end
end

(Note that if you want to use “.” to refer to the origin URL, it should end with a slash, otherwise it is assumed that the last component is a file and “.” will refer to the parent.)

Documentation

RDoc: rdoc.info/projects/devrandom/net_dav Wiki: wiki.github.com/devrandom/net_dav

Performance

This should be threadsafe if you use a different Net::DAV object for each thread. Check out script/multi-test for a multi-threaded application.

Installing the curb gem will gain speedup with large files, but currently is much slower doing many small get operations. If your usecase is the latter and you have curb installed, you can disable its use by passing the

:curl => false

option to Net::DAV::start or Net::DAV::new .

Other

Thanks go to Thomas ( github.com/thomasfl/ ) and others for their help.

Thomas is writing the easy to use github.com/thomasfl/open-uri-and-write based on net_dav.

net_dav's People

Contributors

alicraigmile avatar as016194 avatar chumpy avatar vivienbarousse avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.