[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Curb 0.0.1 - New ruby libcurl bindings

Ross Bamford

11/17/2006 7:18:00 PM

Curb 0.0.1 is now available from http://curb.rub.... Curb provides
nice, easy to use bindings to the libcurl URL transfer library.

This is the first release, and Curb is still a work-in-progress.
Currently, it supports the curl_easy interface, and can handle the most
common usages for libcurl.

The project is now seeking user feedback, testers on various platforms,
and requests for the features you need the most.

--
Ross Bamford - rosco@roscopeco.remove.co.uk
7 Answers

James Gray

11/17/2006 7:31:00 PM

0

On Nov 17, 2006, at 1:25 PM, Ross Bamford wrote:

> Curb 0.0.1 is now available from http://curb.rub.... Curb
> provides nice, easy to use bindings to the libcurl URL transfer
> library.
>
> This is the first release, and Curb is still a work-in-progress.
> Currently, it supports the curl_easy interface, and can handle the
> most common usages for libcurl.

Bravo! Thank you for this!

James Edward Gray II

S. Robert James

11/19/2006 7:05:00 AM

0

Here here!

If you search the newsgroup, you'll see that this is one of the most
commonly requested libs for Ruby. A hearty thanks to starting this!
Now, only to see those version numbers grow!

zimba.tm@gmail.com

11/19/2006 10:32:00 AM

0

Thanks ross !

Does the lib support streams of datas ?

--
Cheers,
zimbatm

http://zimba...

Ross Bamford

11/19/2006 7:16:00 PM

0

On Sun, 19 Nov 2006 10:32:01 -0000, Jonas Pfenniger <zimba.tm@gmail.com>
wrote:

> Thanks ross !
>
> Does the lib support streams of datas ?
>

It depends on what you mean. Theres still some work to do integrating with
Curl's stream handling, so for the most part the answer is "not directly"
- it's not yet at the point where you can pass in IO handles. So if you're
after streamed PUTs and so forth you're out of luck right now (especially
since PUT isn't actually supported yet, either ;)).

OTOH If you're just doing big downloads and don't want to keep it all in
memory until you're done, theres more support for that - you can supply
your own header and body handlers as needed, e.g:

File.open('some.file', 'w+') do |f|
Curl.perform('http://your/url') do |curl|
curl.on_body { |data| f << data }
end
end

Also, when doing HTTP file uploads with POST, if you supply a filename for
the post-field then the upload file won't ever get wholly read into
memory, either (libcurl takes care of the stream itself).

Cheers,
--
Ross Bamford - rosco@roscopeco.remove.co.uk

Ross Bamford

11/19/2006 7:22:00 PM

0

On Sun, 19 Nov 2006 07:05:06 -0000, S. Robert James
<srobertjames@gmail.com> wrote:

> Here here!
>
> If you search the newsgroup, you'll see that this is one of the most
> commonly requested libs for Ruby. A hearty thanks to starting this!
> Now, only to see those version numbers grow!
>

Yeah, I've seen so many requests that I felt guilty sitting on it any
longer :)

I'm planning to divide my (somewhat limited) open-source time fairly
evenly between curb and libxml-ruby for a while, so it should move
reasonably quickly, but curb will get stable a lot quicker if people get
involved and help me test and improve it... ;)

Cheers,
--
Ross Bamford - rosco@roscopeco.remove.co.uk

zimba.tm@gmail.com

11/19/2006 11:18:00 PM

0

On 19/11/06, Ross Bamford <rosco@roscopeco.remove.co.uk> wrote:
> On Sun, 19 Nov 2006 10:32:01 -0000, Jonas Pfenniger <zimba.tm@gmail.com>
> wrote:
>
> > Thanks ross !
> >
> > Does the lib support streams of datas ?
> >
>
> It depends on what you mean. Theres still some work to do integrating with
> Curl's stream handling, so for the most part the answer is "not directly"
> - it's not yet at the point where you can pass in IO handles. So if you're
> after streamed PUTs and so forth you're out of luck right now (especially
> since PUT isn't actually supported yet, either ;)).
>
> OTOH If you're just doing big downloads and don't want to keep it all in
> memory until you're done, theres more support for that - you can supply
> your own header and body handlers as needed, e.g:
>
> File.open('some.file', 'w+') do |f|
> Curl.perform('http://your/url') do |curl|
> curl.on_body { |data| f << data }
> end
> end
>
> Also, when doing HTTP file uploads with POST, if you supply a filename for
> the post-field then the upload file won't ever get wholly read into
> memory, either (libcurl takes care of the stream itself).

Thanks Ross, this is exaclty what I was looking for. I'll try the lib later out.

--
Cheers,
zimbatm

http://zimba...

S. Robert James

11/21/2006 1:21:00 AM

0


Ross Bamford wrote:
> Yeah, I've seen so many requests that I felt guilty sitting on it any
> longer :)
>
> I'm planning to divide my (somewhat limited) open-source time fairly
> evenly between curb and libxml-ruby for a while, so it should move
> reasonably quickly, but curb will get stable a lot quicker if people get
> involved and help me test and improve it... ;)

We do our dev on Windoze as well as Linux - when's Windows targetted
for? (I'd love to be able to help.)