mechanize 2.3

drbrain | Tue, 21 Feb 2012 01:18:20 GMT

The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, and can follow links and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history.

2.3 / 2012-02-20

  • Minor enhancement

    • Add support for the Max-Age attribute in the Set-Cookie header.

    • Added Mechanize::Download#body for compatibility with Mechanize::File when using Mechanize#get_file with Mechanize::Image or other Download-based pluggable parser. Issue #202 by angas

    • Mechanize#max_file_buffer may be set to nil to disable creation of Tempfiles.

  • Bug fixes

    • Applied Mechanize#max_file_buffer to the Content-Encoding handlers as well to prevent extra Tempfiles for small gzip or deflate response

    • Increased the default Mechanize#max_file_buffer to 100,000 bytes. This gives ~5MB of response bodies in memory with the default history setting of 50 pages (depending on GC behavior).

    • Ignore empty path/domain attributes.

    • Cookies with an empty Expires attribute value were stored as session cookies but cookies without the Expires attribute were not. Issue #78

Posted in  | no comments | no trackbacks

Ten Years of Seattle.rb

drbrain | Thu, 16 Feb 2012 21:39:01 GMT

We're throwing a part for the tenth anniversary of the Seattle Ruby Brigade

The party will be on February 28th from 7PM to 10PM at Substantial's offices. You can get your ticket for the low, low price of just $10 right here

If you would like to learn more about the history of Seattle.rb, check out Aaron's presentation from RubyConf 2008.

Posted in  | no comments | no trackbacks

mechanize 2.2

drbrain | Tue, 14 Feb 2012 00:00:22 GMT

The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, can follow links, and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history.

2.2 / 2012-02-12

  • API changes

    • MetaRefresh#href is not normalized to an absolute URL, but set to the original value and resolved later. It is even set to nil when the Refresh URL is unspecified or empty.

  • Minor enhancements

    • Expose ssl_version from net-http-persistent. Patch by astera.

    • SSL parameters and proxy may now be set at any time. Issue #194 by dsisnero.

    • Improved Mechanize::Page with #image_with and #images_with and Mechanize::Page::Image various img element attribute accessors, #caption, #extname, #mime_type and #fetch. Pull request #173 by kitamomonga

    • Added MIME type parsing for content-types in Mechanize::PluggableParser for fine-grained parser choices. Parsers will be chosen based on exact match, simplified type or media type in that order. See Mechanize::PluggableParser#[]=.

    • Added Mechanize#download which downloads a response body to an IO-like or filename.

    • Added Mechanize::DirectorySaver which saves responses in a single directory. Issue #187 by yoshie902a.

    • Added Mechanize::Page::Link#noreferrer?

    • The documentation for Mechanize::Page#search and #at now show that both XPath and CSS expressions are allowed. Issue #199 by Shane Becker.

  • Bug fixes

    • Fixed handling of a HEAD request with Accept-Encoding: gzip. Issue #198 by Oleg Dashevskii

    • Use #resolve for resolving a Location header value. fixes #197

    • A Refresh value can have whitespaces around the semicolon and equal sign.

    • MetaRefresh#click no longer sends out Referer.

    • A link with an empty href is now resolved correctly where previously the query part was dropped.

Posted in  | no comments | no trackbacks

net-http-persistent 2.5

drbrain | Tue, 07 Feb 2012 23:47:19 GMT

Manages persistent connections using Net::HTTP plus a speed fix for Ruby 1.8. It’s thread-safe too!

Using persistent HTTP connections can dramatically increase the speed of HTTP. Creating a new HTTP connection for every request involves an extra TCP round-trip and causes TCP congestion avoidance negotiation to start over.

Net::HTTP supports persistent connections with some API methods but does not handle reconnection gracefully. Net::HTTP::Persistent supports reconnection and retry according to RFC 2616.

2.5 / 2012-02-07

  • Minor enhancements

    • The proxy may be changed at any time.

    • The allowed SSL version may now be set via #ssl_version. Issue #16 by astera

    • Added Net::HTTP::Persistent#override_headers which allows overriding

    • Net::HTTP default headers like User-Agent. See Net::HTTP::Persistent@Headers for details. Issue #17 by andkerosine

  • Bug fixes

    • The ruby 1.8 speed monkeypatch now handles EAGAIN for windows users. Issue #12 by Alwyn Schoeman

    • Fixed POST example in README. Submitted by injekt.

    • Fixed various bugs in the shutdown of connections especially cross-thread (which you shouldn’t be doing anyways).

Posted in  | no comments | no trackbacks

mechanize 2.1.1

drbrain | Sat, 04 Feb 2012 01:57:15 GMT

mechanize version 2.1.1 has been released!

The Mechanize library is used for automating interaction with websites. Mechanize automatically stores and sends cookies, follows redirects, can follow links, and submit forms. Form fields can be populated and submitted. Mechanize also keeps track of the sites that you have visited as a history.

2.1.1 / 2010-02-03

  • Bug fixes

    • Set missing idle_timeout default. Issue #196

    • Meta refresh URIs are now escaped (excluding %). Issue #177

    • Fix charset name extraction. Issue #180

    • A Referer URI sent on request no longer includes user information or fragment part.

    • Tempfiles for storing response bodies are unlinked upon creation to avoid possible lack of finalization. Issue #183

    • The default maximum history size is now 50 pages to avoid filling up a disk with tempfiles accidentally. Related to Issue #183

    • Errors in bodies with deflate and gzip responses now result in a Mechanize::Error instead of silently being ignored and causing future errors. Issue #185

    • Mechanize now raises an UnauthorizedError instead of crashing when a 403 response does not contain a www-authenticate header. Issue #181

    • Mechanize gives a useful exception when attempting to click buttons across pages. Issue #186

    • Added note to Mechanize#cert_store describing how to add certificates in case your system does not come with a default set. Issue #179

    • Invalid content-disposition headers are now ignored. Issue #191

    • Fix NTLM by recognizing the “Negotiation” challenge instead of endlessly looping. Issue #192

    • Allow specification of the NTLM domain through Mechanize#auth. Issue #193

    • Documented how to convert a Mechanize::ResponseReadError into a File or Page, along with a new method #force_parse. Issue #176

Posted in  | 1 comment | no trackbacks

net-http-persistent 2.4.1

drbrain | Sat, 04 Feb 2012 01:55:59 GMT

Manages persistent connections using Net::HTTP plus a speed fix for Ruby 1.8. It’s thread-safe too!

Using persistent HTTP connections can dramatically increase the speed of HTTP. Creating a new HTTP connection for every request involves an extra TCP round-trip and causes TCP congestion avoidance negotiation to start over.

Net::HTTP supports persistent connections with some API methods but does not handle reconnection gracefully. Net::HTTP::Persistent supports reconnection and retry according to RFC 2616.

2.4.1 / 2012-02-03

  • Bug fixes

    • When FakeWeb or WebMock are loaded SSL sessions will not be reused to prevent breakage of testing frameworks. Issue #13 by Matt Brictson, pull request #14 by Zachary Scott

    • SSL connections are reset when the SSL parameters change. Mechanize issue #194 by dsisnero

    • Last-use times are now cleaned up in #shutdown.

Posted in  | no comments | no trackbacks