# \[ANN\] mechanize 2.2 Released

**URL:** <https://rubytalk.org/t/ann-mechanize-2-2-released/64884>\
**Category:** ruby-talk\
**Created:** [14 February 2012 00:01 UTC](https://rubytalk.org/t/ann-mechanize-2-2-released/64884 "2012-02-14T00:01:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eric\_Hodel1](https://avatars.discourse-cdn.com/v4/letter/e/a9adbd/32.png) [@Eric\_Hodel1](https://rubytalk.org/u/Eric_Hodel1)\
**Post date:** [14 February 2012 00:01 UTC](https://rubytalk.org/t/ann-mechanize-2-2-released/64884/1 "2012-02-14T00:01:03Z")

</div>

\* [http://mechanize.rubyforge.org](http://mechanize.rubyforge.org)  
\* [http://github.com/tenderlove/mechanize/tree/master](http://github.com/tenderlove/mechanize/tree/master)

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  
&nbsp;&nbsp;\* MetaRefresh#href is not normalized to an absolute URL, but set to the  
&nbsp;&nbsp;&nbsp;&nbsp;original value and resolved later. It is even set to nil when the  
&nbsp;&nbsp;&nbsp;&nbsp;Refresh URL is unspecified or empty.

\* Minor enhancements  
&nbsp;&nbsp;\* Expose ssl\_version from net-http-persistent. Patch by astera.  
&nbsp;&nbsp;\* SSL parameters and proxy may now be set at any time. Issue #194 by  
&nbsp;&nbsp;&nbsp;&nbsp;dsisnero.  
&nbsp;&nbsp;\* Improved Mechanize::Page with #image\_with and #images\_with and  
&nbsp;&nbsp;&nbsp;&nbsp;Mechanize::Page::Image various img element attribute accessors, #caption,  
&nbsp;&nbsp;&nbsp;&nbsp;#extname, #mime\_type and #fetch. Pull request #173 by kitamomonga  
&nbsp;&nbsp;\* Added MIME type parsing for content-types in Mechanize::PluggableParser  
&nbsp;&nbsp;&nbsp;&nbsp;for fine-grained parser choices. Parsers will be chosen based on exact  
&nbsp;&nbsp;&nbsp;&nbsp;match, simplified type or media type in that order. See  
&nbsp;&nbsp;&nbsp;&nbsp;Mechanize::PluggableParser#[]=.  
&nbsp;&nbsp;\* Added Mechanize#download which downloads a response body to an IO-like or  
&nbsp;&nbsp;&nbsp;&nbsp;filename.  
&nbsp;&nbsp;\* Added Mechanize::DirectorySaver which saves responses in a single  
&nbsp;&nbsp;&nbsp;&nbsp;directory. Issue #187 by yoshie902a.  
&nbsp;&nbsp;\* Added Mechanize::Page::Link#noreferrer?  
&nbsp;&nbsp;\* The documentation for Mechanize::Page#search and #at now show that both  
&nbsp;&nbsp;&nbsp;&nbsp;XPath and CSS expressions are allowed. Issue #199 by Shane Becker.

\* Bug fixes  
&nbsp;&nbsp;\* Fixed handling of a HEAD request with Accept-Encoding: gzip. Issue #198  
&nbsp;&nbsp;&nbsp;&nbsp;by Oleg Dashevskii  
&nbsp;&nbsp;\* Use #resolve for resolving a Location header value. fixes #197  
&nbsp;&nbsp;\* A Refresh value can have whitespaces around the semicolon and equal sign.  
&nbsp;&nbsp;\* MetaRefresh#click no longer sends out Referer.  
&nbsp;&nbsp;\* A link with an empty href is now resolved correctly where previously the  
&nbsp;&nbsp;&nbsp;&nbsp;query part was dropped.
