I have released Mechanize 2.0.pre.1 to rubygems.org. gem install --pre mechanize My goal for mechanize is to move the HTTP layer into its own gem and hopefully into ruby itself. The main changes to support this are the removal of Mechanize::Chain and the removal of the options hash that #fetch_page supported. Passing an options hash to the mechanize methods #get, #head, #post, #put etc. will be deprecated in 2.0 (this has not been done yet). Changes so far: Mechanize is now under the MIT license * API changes * WWW::Mechanize has been removed. * Pre connect hooks are now called with the agent and the request. See Mechanize#pre_connect_hooks. * Post connect hooks are now called with the agent and the response. See Mechanize#post_connect_hooks. * Mechanize::Chain is gone, as an internal API this should cause no problems. * Mechanize#fetch_page no longer accepts an options Hash. * Mechanize#put now accepts headers instead of an options Hash as the last argument * Mechanize#delete now accepts headers instead of an options Hash as the last argument * Mechanize#request_with_entity now accepts headers instead of an options Hash as the last argument * Mechanize no longer raises RuntimeError directly, Mechanize::Error or ArgumentError are raised instead. * The User-Agent header has changed. It no longer includes the WWW- prefix and now includes the ruby version. The URL has been updated as well. * Mechanize now requires ruby 1.8.7 or newer. * New Features * Add header reference methods to Mechanize::File so that a reponse object gets compatible with Net::HTTPResponse. * Mechanize#click accepts a regexp or string to click a button/link in the current page. It works as expected when not passed a string or regexp. * Provide a way to only follow permanent redirects (301) automatically: <tt>agent.redirect_ok = :permanent</tt> GH #73 * Documented various Mechanize accessors. GH #66 * Mechanize now uses net-http-digest_auth. GH #31 * Mechanize now implements session cookies. GH #78 * Mechanize now implements deflate decoding. GH #40 * Mechanize now allows a certificate and key to be passed directly. GH #71 * Mechanize::Form::MultiSelectList now implements #option_with and #options_with. GH #42 * Add Mechanize::Page::Link#rel and #rel?(kind) to read and test the rel attribute. * Add Mechanize::Page#canonical_uri to read a </tt><link rel="canonical"></tt> tag. * Add support for Robots Exclusion Protocol (i.e. robots.txt) and nofollow/noindex in meta tags and the rel attribute. Automatic exclusion can be turned on by setting: agent.robots = true * Manual robots.txt test can be performed with Mechanize#robots_allowed? and #robots_disallowed?. * Bug Fixes: * Fixed a bug where Referer is not sent when accessing a relative URI starting with "http". * Fix handling of Meta Refresh with relative paths. GH #39 * Mechanize::CookieJar now supports RFC 2109 correctly. GH #85 * Fixed typo in EXAMPLES.rdoc. GH #74 * The base element is now handled correctly for images. GH #72 * Image buttons with no name attribute are now included in the form''s button list. GH#56 * Improved handling of non ASCII-7bit compatible characters in links (only an issue on ruby 1.8). GH #36, GH #75 * Loading cookies.txt is faster. GH #38 * Mechanize no longer sends cookies for a.b.example to axb.example. GH #41 * Mechanize no longer sends the button name as a form field for image buttons. GH #45 * Blank cookie values are now skipped. GH #80 * Mechanize now adds a ''.'' to cookie domains if no ''.'' was sent. This is not allowed by RFC 2109 but does appear in RFC 2965. GH #86 * file URIs are now read in binary mode. GH #83 * Content-Encoding: x-gzip is now treated like gzip per RFC 2616. * Mechanize now unescapes URIs for meta refresh. GH #68 * Mechanize now has more robust HTML charset detection. GH #43
Quoting Eric Hodel <drbrain at segment7.net>:> I have released Mechanize 2.0.pre.1 to rubygems.org. > > gem install --pre mechanize<snip>> Changes so far: > > Mechanize is now under the MIT license > > * API changes > * WWW::Mechanize has been removed. > * Pre connect hooks are now called with the agent and the request. See > Mechanize#pre_connect_hooks. > * Post connect hooks are now called with the agent and the response. See > Mechanize#post_connect_hooks. > * Mechanize::Chain is gone, as an internal API this should cause > no problems. > * Mechanize#fetch_page no longer accepts an options Hash. > * Mechanize#put now accepts headers instead of an options Hash as the last > argument > * Mechanize#delete now accepts headers instead of an options Hash as the > last argument > * Mechanize#request_with_entity now accepts headers instead of an options > Hash as the last argument > * Mechanize no longer raises RuntimeError directly, Mechanize::Error or > ArgumentError are raised instead. > * The User-Agent header has changed. It no longer includes the WWW- prefix > and now includes the ruby version. The URL has been updated as well. > * Mechanize now requires ruby 1.8.7 or newer. > > * New Features > > * Add header reference methods to Mechanize::File so that a reponse > object gets compatible with Net::HTTPResponse. > * Mechanize#click accepts a regexp or string to click a button/link in the > current page. It works as expected when not passed a string or regexp. > * Provide a way to only follow permanent redirects (301) > automatically: <tt>agent.redirect_ok = :permanent</tt> GH #73 > * Documented various Mechanize accessors. GH #66 > * Mechanize now uses net-http-digest_auth. GH #31 > * Mechanize now implements session cookies. GH #78 > * Mechanize now implements deflate decoding. GH #40 > * Mechanize now allows a certificate and key to be passed directly. GH #71 > * Mechanize::Form::MultiSelectList now implements #option_with and > #options_with. GH #42 > * Add Mechanize::Page::Link#rel and #rel?(kind) to read and test the rel > attribute. > * Add Mechanize::Page#canonical_uri to read a </tt><link > rel="canonical"></tt> tag. > * Add support for Robots Exclusion Protocol (i.e. robots.txt) and > nofollow/noindex in meta tags and the rel attribute. Automatic > exclusion can be turned on by setting: > agent.robots = true > * Manual robots.txt test can be performed with > Mechanize#robots_allowed? and #robots_disallowed?. > > * Bug Fixes: > > * Fixed a bug where Referer is not sent when accessing a relative > URI starting with "http". > * Fix handling of Meta Refresh with relative paths. GH #39 > * Mechanize::CookieJar now supports RFC 2109 correctly. GH #85 > * Fixed typo in EXAMPLES.rdoc. GH #74 > * The base element is now handled correctly for images. GH #72 > * Image buttons with no name attribute are now included in the > form''s button > list. GH#56 > * Improved handling of non ASCII-7bit compatible characters in links (only > an issue on ruby 1.8). GH #36, GH #75 > * Loading cookies.txt is faster. GH #38 > * Mechanize no longer sends cookies for a.b.example to axb.example. GH #41 > * Mechanize no longer sends the button name as a form field for image > buttons. GH #45 > * Blank cookie values are now skipped. GH #80 > * Mechanize now adds a ''.'' to cookie domains if no ''.'' was sent. This is > not allowed by RFC 2109 but does appear in RFC 2965. GH #86 > * file URIs are now read in binary mode. GH #83 > * Content-Encoding: x-gzip is now treated like gzip per RFC 2616. > * Mechanize now unescapes URIs for meta refresh. GH #68 > * Mechanize now has more robust HTML charset detection. GH #43 >Thanks for all the work! What drove the change to the MIT license? Mike B. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On Apr 11, 2011, at 7:07 PM, barsalou wrote:> Quoting Eric Hodel <drbrain at segment7.net>: > >> I have released Mechanize 2.0.pre.1 to rubygems.org. >> >> gem install --pre mechanize > > Thanks for all the work! > > What drove the change to the MIT license?I would like to pull the HTTP parts of mechanize away from the browser parts and contribute that back to ruby. Since ruby has a dual BSD/ruby license now I needed a compatible license before I could begin the work.
Wow 2.0! :) I would also like to thank you for your amazing work with this outstanding library! On 04/10/2011 03:31 AM, Eric Hodel wrote:> I have released Mechanize 2.0.pre.1 to rubygems.org. > > gem install --pre mechanize > > My goal for mechanize is to move the HTTP layer into its own gem and hopefully into ruby itself. The main changes to support this are the removal of Mechanize::Chain and the removal of the options hash that #fetch_page supported. > > Passing an options hash to the mechanize methods #get, #head, #post, #put etc. will be deprecated in 2.0 (this has not been done yet). > > Changes so far: > > Mechanize is now under the MIT license > > * API changes > * WWW::Mechanize has been removed. > * Pre connect hooks are now called with the agent and the request. See > Mechanize#pre_connect_hooks. > * Post connect hooks are now called with the agent and the response. See > Mechanize#post_connect_hooks. > * Mechanize::Chain is gone, as an internal API this should cause no problems. > * Mechanize#fetch_page no longer accepts an options Hash. > * Mechanize#put now accepts headers instead of an options Hash as the last > argument > * Mechanize#delete now accepts headers instead of an options Hash as the > last argument > * Mechanize#request_with_entity now accepts headers instead of an options > Hash as the last argument > * Mechanize no longer raises RuntimeError directly, Mechanize::Error or > ArgumentError are raised instead. > * The User-Agent header has changed. It no longer includes the WWW- prefix > and now includes the ruby version. The URL has been updated as well. > * Mechanize now requires ruby 1.8.7 or newer. > > * New Features > > * Add header reference methods to Mechanize::File so that a reponse > object gets compatible with Net::HTTPResponse. > * Mechanize#click accepts a regexp or string to click a button/link in the > current page. It works as expected when not passed a string or regexp. > * Provide a way to only follow permanent redirects (301) > automatically: <tt>agent.redirect_ok = :permanent</tt> GH #73 > * Documented various Mechanize accessors. GH #66 > * Mechanize now uses net-http-digest_auth. GH #31 > * Mechanize now implements session cookies. GH #78 > * Mechanize now implements deflate decoding. GH #40 > * Mechanize now allows a certificate and key to be passed directly. GH #71 > * Mechanize::Form::MultiSelectList now implements #option_with and > #options_with. GH #42 > * Add Mechanize::Page::Link#rel and #rel?(kind) to read and test the rel > attribute. > * Add Mechanize::Page#canonical_uri to read a </tt><link > rel="canonical"></tt> tag. > * Add support for Robots Exclusion Protocol (i.e. robots.txt) and > nofollow/noindex in meta tags and the rel attribute. Automatic > exclusion can be turned on by setting: > agent.robots = true > * Manual robots.txt test can be performed with > Mechanize#robots_allowed? and #robots_disallowed?. > > * Bug Fixes: > > * Fixed a bug where Referer is not sent when accessing a relative > URI starting with "http". > * Fix handling of Meta Refresh with relative paths. GH #39 > * Mechanize::CookieJar now supports RFC 2109 correctly. GH #85 > * Fixed typo in EXAMPLES.rdoc. GH #74 > * The base element is now handled correctly for images. GH #72 > * Image buttons with no name attribute are now included in the form''s button > list. GH#56 > * Improved handling of non ASCII-7bit compatible characters in links (only > an issue on ruby 1.8). GH #36, GH #75 > * Loading cookies.txt is faster. GH #38 > * Mechanize no longer sends cookies for a.b.example to axb.example. GH #41 > * Mechanize no longer sends the button name as a form field for image > buttons. GH #45 > * Blank cookie values are now skipped. GH #80 > * Mechanize now adds a ''.'' to cookie domains if no ''.'' was sent. This is > not allowed by RFC 2109 but does appear in RFC 2965. GH #86 > * file URIs are now read in binary mode. GH #83 > * Content-Encoding: x-gzip is now treated like gzip per RFC 2616. > * Mechanize now unescapes URIs for meta refresh. GH #68 > * Mechanize now has more robust HTML charset detection. GH #43 > > _______________________________________________ > Mechanize-users mailing list > Mechanize-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mechanize-users
On Apr 12, 2011, at 3:22 PM, Matthias -apoc- Hecker wrote:> Wow 2.0! :) I would also like to thank you for your amazing work with > this outstanding library!I didn''t do that much, just moved some stuff around enough to break the api which means the major version must be bumped. Oh, I applied some patches and fixed some bugs, too.
On 04/13/2011 05:22 AM, Eric Hodel wrote:> On Apr 12, 2011, at 3:22 PM, Matthias -apoc- Hecker wrote: >> Wow 2.0! :) I would also like to thank you for your amazing work with >> this outstanding library! > > I didn''t do that much, just moved some stuff around enough to break the api which means the major version must be bumped. > > Oh, I applied some patches and fixed some bugs, too.well still appreciated ;)