eric-mechanize 0.9.3.20090623142847

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. data/CHANGELOG.rdoc +504 -0
  2. data/EXAMPLES.rdoc +171 -0
  3. data/FAQ.rdoc +11 -0
  4. data/GUIDE.rdoc +122 -0
  5. data/LICENSE.rdoc +340 -0
  6. data/Manifest.txt +169 -0
  7. data/README.rdoc +60 -0
  8. data/Rakefile +43 -0
  9. data/examples/flickr_upload.rb +23 -0
  10. data/examples/mech-dump.rb +7 -0
  11. data/examples/proxy_req.rb +9 -0
  12. data/examples/rubyforge.rb +21 -0
  13. data/examples/spider.rb +11 -0
  14. data/lib/mechanize.rb +7 -0
  15. data/lib/www/mechanize.rb +619 -0
  16. data/lib/www/mechanize/chain.rb +34 -0
  17. data/lib/www/mechanize/chain/auth_headers.rb +80 -0
  18. data/lib/www/mechanize/chain/body_decoding_handler.rb +48 -0
  19. data/lib/www/mechanize/chain/connection_resolver.rb +78 -0
  20. data/lib/www/mechanize/chain/custom_headers.rb +23 -0
  21. data/lib/www/mechanize/chain/handler.rb +9 -0
  22. data/lib/www/mechanize/chain/header_resolver.rb +53 -0
  23. data/lib/www/mechanize/chain/parameter_resolver.rb +24 -0
  24. data/lib/www/mechanize/chain/post_connect_hook.rb +0 -0
  25. data/lib/www/mechanize/chain/pre_connect_hook.rb +22 -0
  26. data/lib/www/mechanize/chain/request_resolver.rb +32 -0
  27. data/lib/www/mechanize/chain/response_body_parser.rb +40 -0
  28. data/lib/www/mechanize/chain/response_header_handler.rb +50 -0
  29. data/lib/www/mechanize/chain/response_reader.rb +41 -0
  30. data/lib/www/mechanize/chain/ssl_resolver.rb +42 -0
  31. data/lib/www/mechanize/chain/uri_resolver.rb +77 -0
  32. data/lib/www/mechanize/content_type_error.rb +16 -0
  33. data/lib/www/mechanize/cookie.rb +72 -0
  34. data/lib/www/mechanize/cookie_jar.rb +191 -0
  35. data/lib/www/mechanize/file.rb +73 -0
  36. data/lib/www/mechanize/file_response.rb +62 -0
  37. data/lib/www/mechanize/file_saver.rb +39 -0
  38. data/lib/www/mechanize/form.rb +360 -0
  39. data/lib/www/mechanize/form/button.rb +8 -0
  40. data/lib/www/mechanize/form/check_box.rb +13 -0
  41. data/lib/www/mechanize/form/field.rb +28 -0
  42. data/lib/www/mechanize/form/file_upload.rb +24 -0
  43. data/lib/www/mechanize/form/image_button.rb +23 -0
  44. data/lib/www/mechanize/form/multi_select_list.rb +69 -0
  45. data/lib/www/mechanize/form/option.rb +51 -0
  46. data/lib/www/mechanize/form/radio_button.rb +38 -0
  47. data/lib/www/mechanize/form/select_list.rb +45 -0
  48. data/lib/www/mechanize/headers.rb +12 -0
  49. data/lib/www/mechanize/history.rb +67 -0
  50. data/lib/www/mechanize/inspect.rb +90 -0
  51. data/lib/www/mechanize/monkey_patch.rb +37 -0
  52. data/lib/www/mechanize/page.rb +181 -0
  53. data/lib/www/mechanize/page/base.rb +10 -0
  54. data/lib/www/mechanize/page/frame.rb +22 -0
  55. data/lib/www/mechanize/page/link.rb +50 -0
  56. data/lib/www/mechanize/page/meta.rb +51 -0
  57. data/lib/www/mechanize/pluggable_parsers.rb +103 -0
  58. data/lib/www/mechanize/redirect_limit_reached_error.rb +18 -0
  59. data/lib/www/mechanize/redirect_not_get_or_head_error.rb +20 -0
  60. data/lib/www/mechanize/response_code_error.rb +25 -0
  61. data/lib/www/mechanize/unsupported_scheme_error.rb +10 -0
  62. data/lib/www/mechanize/util.rb +76 -0
  63. data/mechanize.gemspec +41 -0
  64. data/test/chain/test_argument_validator.rb +14 -0
  65. data/test/chain/test_auth_headers.rb +25 -0
  66. data/test/chain/test_custom_headers.rb +18 -0
  67. data/test/chain/test_header_resolver.rb +28 -0
  68. data/test/chain/test_parameter_resolver.rb +35 -0
  69. data/test/chain/test_request_resolver.rb +29 -0
  70. data/test/chain/test_response_reader.rb +24 -0
  71. data/test/data/htpasswd +1 -0
  72. data/test/data/server.crt +16 -0
  73. data/test/data/server.csr +12 -0
  74. data/test/data/server.key +15 -0
  75. data/test/data/server.pem +15 -0
  76. data/test/helper.rb +129 -0
  77. data/test/htdocs/alt_text.html +10 -0
  78. data/test/htdocs/bad_form_test.html +9 -0
  79. data/test/htdocs/button.jpg +0 -0
  80. data/test/htdocs/empty_form.html +6 -0
  81. data/test/htdocs/file_upload.html +26 -0
  82. data/test/htdocs/find_link.html +41 -0
  83. data/test/htdocs/form_multi_select.html +16 -0
  84. data/test/htdocs/form_multival.html +37 -0
  85. data/test/htdocs/form_no_action.html +18 -0
  86. data/test/htdocs/form_no_input_name.html +16 -0
  87. data/test/htdocs/form_select.html +16 -0
  88. data/test/htdocs/form_select_all.html +16 -0
  89. data/test/htdocs/form_select_none.html +17 -0
  90. data/test/htdocs/form_select_noopts.html +10 -0
  91. data/test/htdocs/form_set_fields.html +14 -0
  92. data/test/htdocs/form_test.html +188 -0
  93. data/test/htdocs/frame_test.html +30 -0
  94. data/test/htdocs/google.html +13 -0
  95. data/test/htdocs/iframe_test.html +16 -0
  96. data/test/htdocs/index.html +6 -0
  97. data/test/htdocs/link with space.html +5 -0
  98. data/test/htdocs/meta_cookie.html +11 -0
  99. data/test/htdocs/no_title_test.html +6 -0
  100. data/test/htdocs/relative/tc_relative_links.html +21 -0
  101. data/test/htdocs/tc_bad_links.html +5 -0
  102. data/test/htdocs/tc_base_link.html +8 -0
  103. data/test/htdocs/tc_blank_form.html +11 -0
  104. data/test/htdocs/tc_checkboxes.html +19 -0
  105. data/test/htdocs/tc_encoded_links.html +5 -0
  106. data/test/htdocs/tc_follow_meta.html +8 -0
  107. data/test/htdocs/tc_form_action.html +48 -0
  108. data/test/htdocs/tc_links.html +18 -0
  109. data/test/htdocs/tc_no_attributes.html +16 -0
  110. data/test/htdocs/tc_pretty_print.html +17 -0
  111. data/test/htdocs/tc_radiobuttons.html +17 -0
  112. data/test/htdocs/tc_referer.html +10 -0
  113. data/test/htdocs/tc_relative_links.html +19 -0
  114. data/test/htdocs/tc_textarea.html +23 -0
  115. data/test/htdocs/unusual______.html +5 -0
  116. data/test/servlets.rb +365 -0
  117. data/test/ssl_server.rb +48 -0
  118. data/test/test_authenticate.rb +71 -0
  119. data/test/test_bad_links.rb +25 -0
  120. data/test/test_blank_form.rb +16 -0
  121. data/test/test_checkboxes.rb +61 -0
  122. data/test/test_content_type.rb +13 -0
  123. data/test/test_cookie_class.rb +338 -0
  124. data/test/test_cookie_jar.rb +362 -0
  125. data/test/test_cookies.rb +123 -0
  126. data/test/test_encoded_links.rb +20 -0
  127. data/test/test_errors.rb +49 -0
  128. data/test/test_follow_meta.rb +108 -0
  129. data/test/test_form_action.rb +52 -0
  130. data/test/test_form_as_hash.rb +61 -0
  131. data/test/test_form_button.rb +38 -0
  132. data/test/test_form_no_inputname.rb +15 -0
  133. data/test/test_forms.rb +564 -0
  134. data/test/test_frames.rb +25 -0
  135. data/test/test_get_headers.rb +52 -0
  136. data/test/test_gzipping.rb +22 -0
  137. data/test/test_hash_api.rb +45 -0
  138. data/test/test_history.rb +142 -0
  139. data/test/test_history_added.rb +16 -0
  140. data/test/test_html_unscape_forms.rb +39 -0
  141. data/test/test_if_modified_since.rb +20 -0
  142. data/test/test_keep_alive.rb +31 -0
  143. data/test/test_links.rb +120 -0
  144. data/test/test_mech.rb +268 -0
  145. data/test/test_mechanize_file.rb +47 -0
  146. data/test/test_meta.rb +65 -0
  147. data/test/test_multi_select.rb +106 -0
  148. data/test/test_no_attributes.rb +13 -0
  149. data/test/test_option.rb +18 -0
  150. data/test/test_page.rb +124 -0
  151. data/test/test_pluggable_parser.rb +145 -0
  152. data/test/test_post_form.rb +34 -0
  153. data/test/test_pretty_print.rb +22 -0
  154. data/test/test_radiobutton.rb +75 -0
  155. data/test/test_redirect_limit_reached.rb +41 -0
  156. data/test/test_redirect_verb_handling.rb +45 -0
  157. data/test/test_referer.rb +39 -0
  158. data/test/test_relative_links.rb +40 -0
  159. data/test/test_request.rb +13 -0
  160. data/test/test_response_code.rb +52 -0
  161. data/test/test_save_file.rb +48 -0
  162. data/test/test_scheme.rb +48 -0
  163. data/test/test_select.rb +106 -0
  164. data/test/test_select_all.rb +15 -0
  165. data/test/test_select_none.rb +15 -0
  166. data/test/test_select_noopts.rb +16 -0
  167. data/test/test_set_fields.rb +44 -0
  168. data/test/test_ssl_server.rb +20 -0
  169. data/test/test_subclass.rb +14 -0
  170. data/test/test_textarea.rb +45 -0
  171. data/test/test_upload.rb +109 -0
  172. data/test/test_verbs.rb +25 -0
  173. metadata +314 -0
data/CHANGELOG.rdoc ADDED
@@ -0,0 +1,504 @@
1
+ = Mechanize CHANGELOG
2
+
3
+ === HEAD
4
+
5
+ * Bug Fixes:
6
+
7
+ * Rescue errors from bogus encodings
8
+
9
+ === 0.9.3
10
+
11
+ * Bug Fixes:
12
+
13
+ * Do not apply encoding if encoding equals 'none' Thanks Akinori MUSHA!
14
+ * Fixed Page#encoding= when changing the value from or to nil. Made
15
+ it return the assigned value while at it. (Akinori MUSHA)
16
+ * Custom request headers may be supplied WWW::Mechanize#request_headers
17
+ RF #24516
18
+ * HTML Parser may be set on a per instance level WWW::Mechanize#html_parser
19
+ RF #24693
20
+ * Fixed string encoding in ruby 1.9. RF #2433
21
+ * Rescuing Zlib::DataErrors (Thanks Kelley Reynolds)
22
+ * Fixing a problem with frozen SSL objects. RF #24950
23
+ * Do not send a referer on meta refresh. RF #24945
24
+ * Fixed a bug with double semi-colons in Content-Disposition headers
25
+ * Properly handling cookies that specify a path. RF #25259
26
+
27
+ === 0.9.2 / 2009/03/05
28
+
29
+ * New Features:
30
+ * Mechanize#submit and Form#submit take arbitrary headers(thanks penguincoder)
31
+
32
+ * Bug Fixes:
33
+ * Fixed a bug with bad cookie parsing
34
+ * Form::RadioButton#click unchecks other buttons (RF #24159)
35
+ * Fixed problems with Iconv (RF #24190, RF #24192, RF #24043)
36
+ * POST parameters should be CGI escaped
37
+ * Made Content-Type match case insensitive (Thanks Kelly Reynolds)
38
+ * Non-string form parameters work
39
+
40
+ === 0.9.1 2009/02/23
41
+
42
+ * New Features:
43
+ * Encoding may be specified for a page: Page#encoding=
44
+
45
+ * Bug Fixes:
46
+ * m17n fixes. ありがとう konn!
47
+ * Fixed a problem with base tags. ありがとう Keisuke
48
+ * HEAD requests do not record in the history
49
+ * Default encoding to ISO-8859-1 instead of ASCII
50
+ * Requests with URI instances should not be polluted RF #23472
51
+ * Nonce count fixed for digest auth requests. Thanks Adrian Slapa!
52
+ * Fixed a referer issue with requests using a uri. RF #23472
53
+ * WAP content types will now be parsed
54
+ * Rescued poorly formatted cookies. Thanks Kelley Reynolds!
55
+
56
+ === 0.9.0
57
+
58
+ * Deprecations
59
+ * WWW::Mechanize::List is gone!
60
+ * Mechanize uses Nokogiri as it's HTML parser but you may switch to
61
+ Hpricot by using WWW::Mechanize.html_parser = Hpricot
62
+
63
+ * Bug Fixes:
64
+ * Nil check on page when base tag is used #23021
65
+
66
+ === 0.8.5
67
+
68
+ * Deprecations
69
+ * WWW::Mechanize::List will be deprecated in 0.9.0, and warnings have
70
+ been added to help you upgrade.
71
+
72
+ * Bug Fixes:
73
+ * Stopped raising EOF exceptions on HEAD requests. ありがとう:HIRAKU Kuroda
74
+ * Fixed exceptions when a logger is set and file:// requests are made.
75
+ * Made Mechanize 1.9 compatible
76
+ * Not setting the port in the host header for SSL sites.
77
+ * Following refresh headers. Thanks Tim Connor!
78
+ * Cookie Jar handles cookie domains containing ports, like
79
+ 'mydomain.com:443' (Thanks Michal Ochman!)
80
+ * Fixing strange uri escaping problems [#22604]
81
+ * Making content-type determintation more robust. (thanks Han Holl!)
82
+ * Dealing with links that are query string only. [#22402]
83
+ * Nokogiri may be dropped in as a replacement.
84
+ WWW::Mechanize.html_parser = Nokogiri::HTML
85
+ * Making sure the correct page is added to the history on meta refresh.
86
+ [#22708]
87
+ * Mechanize#get requests no longer send a referer unless they are relative
88
+ requests.
89
+
90
+ === 0.8.4
91
+
92
+ * Bug Fixes:
93
+ * Setting the port number on the host header.
94
+ * Fixing Authorization headers for picky servers
95
+
96
+ === 0.8.3
97
+
98
+ * Bug Fixes:
99
+ * Making sure logger is set during SSL connections.
100
+
101
+ === 0.8.2
102
+
103
+ * Bug Fixes:
104
+ * Doh! I was accidentally setting headers twice.
105
+
106
+ === 0.8.1
107
+
108
+ * Bug Fixes:
109
+ * Fixed problem with nil pointer when logger is set
110
+
111
+ === 0.8.0
112
+
113
+ * New Features:
114
+ * Lifecycle hooks. Mechanize#pre_connect_hooks, Mechanize#post_connect_hooks
115
+ * file:/// urls are now supported
116
+ * Added Mechanize::Page#link_with, frame_with for searching for links using
117
+ +criteria+.
118
+ * Implementing PUT, DELETE, and HEAD requests
119
+
120
+ * Bug Fixes:
121
+ * Fixed an infinite loop when content-length and body length don't match.
122
+ * Only setting headers once
123
+ * Adding IIS authentication support
124
+
125
+ === 0.7.8
126
+
127
+ * Bug Fixes:
128
+ * Fixed bug when receiving a 304 response (HTTPNotModified) on a page not
129
+ cached in history.
130
+ * #21428 Default to HTML parser for 'application/xhtml+xml' content-type.
131
+ * Fixed an issue where redirects were resending posted data
132
+
133
+ === 0.7.7
134
+
135
+ * New Features:
136
+ * Page#form_with takes a +criteria+ hash.
137
+ * Page#form is changed to Page#form_with
138
+ * Mechanize#get takes custom http headers. Thanks Mike Dalessio!
139
+ * Form#click_button submits a form defaulting to the current button.
140
+ * Form#set_fields now takes a hash. Thanks Tobi!
141
+ * Mechanize#redirection_limit= for setting the max number of redirects.
142
+
143
+ * Bug Fixes:
144
+ * Added more examples. Thanks Robert Jackson.
145
+ * #20480 Making sure the Host header is set.
146
+ * #20672 Making sure cookies with weird semicolons work.
147
+ * Fixed bug with percent signs in urls.
148
+ http://d.hatena.ne.jp/kitamomonga/20080410/ruby_mechanize_percent_url_bug
149
+ * #21132 Not checking for EOF errors on redirect
150
+ * Fixed a weird gzipping error.
151
+ * #21233 Smarter multipart boundry. Thanks Todd Willey!
152
+ * #20097 Supporting meta tag cookies.
153
+
154
+ === 0.7.6
155
+
156
+ * New Features:
157
+ * Added support for reading Mozilla cookie jars. Thanks Chris Riddoch!
158
+ * Moving text, password, hidden, int to default. Thanks Tim Harper!
159
+ * Mechanize#history_added callback for page loads. Thanks Tobi Reif!
160
+ * Mechanize#scheme_handlers callbacks for handling unsupported schemes on
161
+ links.
162
+
163
+ * Bug Fixes:
164
+ * Ignoring scheme case
165
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=470642
166
+ * Not encoding tildes in uris. Thanks Bruno. [#19380]
167
+ * Resetting request bodys when retrying form posts. Thanks Bruno. [#19379]
168
+ * Throwing away keep alive connections on EPIPE and ECONNRESET.
169
+ * Duplicating request headers when retrying a 401. Thanks Hiroshi Ichikawa.
170
+ * Simulating an EOF error when a response length is bad. Thanks Tobias Gruetzmacher.
171
+ http://rubyforge.org/tracker/index.php?func=detail&aid=19178&group_id=1453&atid=5711
172
+ * Defaulting option tags to the inner text.
173
+ http://rubyforge.org/tracker/index.php?func=detail&aid=19976&group_id=1453&atid=5709
174
+ * Supporting blank strings for option values.
175
+ http://rubyforge.org/tracker/index.php?func=detail&aid=19975&group_id=1453&atid=5709
176
+
177
+ === 0.7.5
178
+
179
+ * Fixed a bug when fetching files and not pages. Thanks Mat Schaffer!
180
+
181
+ === 0.7.4
182
+
183
+ * doh!
184
+
185
+ === 0.7.3
186
+
187
+ * Pages are now yielded to a blocks given to WWW::Mechanize#get
188
+ * WWW::Mechanize#get now takes hash arguments for uri parameters.
189
+ * WWW::Mechanize#post takes an IO object as a parameter and posts correctly.
190
+ * Fixing a strange zlib inflate problem on windows
191
+
192
+ === 0.7.2
193
+
194
+ * Handling gzipped responses with no Content-Length header
195
+
196
+ === 0.7.1
197
+
198
+ * Added iPhone to the user agent aliases. [#17572]
199
+ * Fixed a bug with EOF errors in net/http. [#17570]
200
+ * Handling 0 length gzipped responses. [#17471]
201
+
202
+ === 0.7.0
203
+
204
+ * Removed Ruby 1.8.2 support
205
+ * Changed parser to lazily parse links
206
+ * Lazily parsing document
207
+ * Adding verify_callback for SSL requests. Thanks Mike Dalessio!
208
+ * Fixed a bug with Accept-Language header. Thanks Bill Siggelkow.
209
+
210
+ === 0.6.11
211
+
212
+ * Detecting single quotes in meta redirects.
213
+ * Adding pretty inspect for ruby versions > 1.8.4 (Thanks Joel Kociolek)
214
+ http://rubyforge.org/tracker/index.php?func=detail&aid=13150&group_id=1453&atid=5709
215
+ * Fixed bug with file name in multipart posts
216
+ http://rubyforge.org/tracker/?func=detail&aid=15594&group_id=1453&atid=5709
217
+ * Posting forms relative to the originating page. Thanks Mortee.
218
+ * Added a FAQ
219
+ http://rubyforge.org/tracker/?func=detail&aid=15772&group_id=1453&atid=5709
220
+
221
+ === 0.6.10
222
+
223
+ * Made digest authentication work with POSTs.
224
+ * Made sure page was HTML before following meta refreshes.
225
+ http://rubyforge.org/tracker/index.php?func=detail&aid=12260&group_id=1453&atid=5709
226
+ * Made sure that URLS with a host and no path would default to '/' for history
227
+ purposes.
228
+ http://rubyforge.org/tracker/index.php?func=detail&aid=12368&group_id=1453&atid=5709
229
+ * Avoiding memory leaks with transact. Thanks Tobias Gruetzmacher!
230
+ http://rubyforge.org/tracker/index.php?func=detail&aid=12057&group_id=1453&atid=5711
231
+ * Fixing a problem with # signs in the file name. Thanks Tobias Gruetzmacher!
232
+ http://rubyforge.org/tracker/index.php?func=detail&aid=12510&group_id=1453&atid=5711
233
+ * Made sure that blank form values are submitted.
234
+ http://rubyforge.org/tracker/index.php?func=detail&aid=12505&group_id=1453&atid=5709
235
+ * Mechanize now respects the base tag. Thanks Stephan Dale.
236
+ http://rubyforge.org/tracker/index.php?func=detail&aid=12468&group_id=1453&atid=5709
237
+ * Aliasing inspect to pretty_inspect. Thanks Eric Promislow.
238
+ http://rubyforge.org/pipermail/mechanize-users/2007-July/000157.html
239
+
240
+ === 0.6.9
241
+
242
+ * Updating UTF-8 support for urls
243
+ * Adding AREA tags to the links list.
244
+ http://rubyforge.org/pipermail/mechanize-users/2007-May/000140.html
245
+ * WWW::Mechanize#follow_meta_refresh will allow you to automatically follow
246
+ meta refresh tags. [#10032]
247
+ * Adding x-gzip to accepted content-encoding. Thanks Simon Strandgaard
248
+ http://rubyforge.org/tracker/index.php?func=detail&aid=11167&group_id=1453&atid=5711
249
+ * Added Digest Authentication support. Thanks to Ryan Davis and Eric Hodel,
250
+ you get a gold star!
251
+
252
+ === 0.6.8
253
+
254
+ * Keep alive can be shut off now with WWW::Mechanize#keep_alive
255
+ * Conditional requests can be shut off with WWW::Mechanize#conditional_requests
256
+ * Monkey patched Net::HTTP#keep_alive?
257
+ * [#9877] Moved last request time. Thanks Max Stepanov
258
+ * Added WWW::Mechanize::File#save
259
+ * Defaulting file name to URI or Content-Disposition
260
+ * Updating compatability with hpricot
261
+ * Added more unit tests
262
+
263
+ === 0.6.7
264
+
265
+ * Fixed a bug with keep-alive requests
266
+ * [#9549] fixed problem with cookie paths
267
+
268
+ === 0.6.6
269
+
270
+ * Removing hpricot overrides
271
+ * Fixed a bug where alt text can be nil. Thanks Yannick!
272
+ * Unparseable expiration dates in cookies are now treated as session cookies
273
+ * Caching connections
274
+ * Requests now default to keep alive
275
+ * [#9434] Fixed bug where html entities weren't decoded
276
+ * [#9150] Updated mechanize history to deal with redirects
277
+
278
+ === 0.6.5
279
+
280
+ * Copying headers to a hash to prevent memory leaks
281
+ * Speeding up page parsing
282
+ * Aliased fields to elements
283
+ * Adding If-Modified-Since header
284
+ * Added delete_field! to form. Thanks to Sava Chankov
285
+ * Updated uri escaping to support high order characters. Thanks to Henrik Nyh.
286
+ * Better handling relative URIs. Thanks to Henrik Nyh
287
+ * Now handles pipes in URLs
288
+ http://rubyforge.org/tracker/?func=detail&aid=7140&group_id=1453&atid=5709
289
+ * Now escaping html entities in form fields.
290
+ http://rubyforge.org/tracker/?func=detail&aid=7563&group_id=1453&atid=5709
291
+ * Added MSIE 7.0 user agent string
292
+
293
+ === 0.6.4
294
+
295
+ * Adding the "redirect_ok" method to Mechanize to stop mechanize from
296
+ following redirects.
297
+ http://rubyforge.org/tracker/index.php?func=detail&aid=6571&group_id=1453&atid=5712
298
+ * Added protected method Mechanize#set_headers so that subclasses can set
299
+ custom headers.
300
+ http://rubyforge.org/tracker/?func=detail&aid=7208&group_id=1453&atid=5712
301
+ * Aliased Page#referer to Page#page
302
+ * Fixed a bug when clicking relative urls
303
+ http://rubyforge.org/pipermail/mechanize-users/2006-November/000035.html
304
+ * Fixing a bug when bad version or max age is passed to Cookie::parse
305
+ http://rubyforge.org/pipermail/mechanize-users/2006-November/000033.html
306
+ * Fixing a bug with response codes. [#6526]
307
+ * Fixed bug [#6548]. Input type of 'button' was not being added as a button.
308
+ * Fixed bug [#7139]. REXML parser calls hpricot parser by accident
309
+
310
+ === 0.6.3
311
+
312
+ * Added keys and values methods to Form
313
+ * Added has_value? to Form
314
+ * Added a has_field? method to Form
315
+ * The add_field! method on Form now creates a field for you on the form.
316
+ Thanks to Mat Schaffer for the patch.
317
+ http://rubyforge.org/pipermail/mechanize-users/2006-November/000025.html
318
+ * Fixed a bug when form actions have html ecoded entities in them.
319
+ http://rubyforge.org/pipermail/mechanize-users/2006-October/000019.html
320
+ * Fixed a bug when links or frame sources have html encoded entities in the
321
+ href or src.
322
+ * Fixed a bug where '#' symbols are encoded
323
+ http://rubyforge.org/forum/message.php?msg_id=14747
324
+
325
+ === 0.6.2
326
+
327
+ * Added a yield to Page#form so that dealing with forms can be more DSL like.
328
+ * Added the parsed page to the ResponseCodeError so that the parsed results
329
+ can be accessed even in the event of an error.
330
+ http://rubyforge.org/pipermail/mechanize-users/2006-September/000007.html
331
+ * Updated documentation (Thanks to Paul Smith)
332
+
333
+ === 0.6.1
334
+
335
+ * Added a method to Form called "submit". Now forms can be submitted by
336
+ calling a method on the form.
337
+ * Added a click method to links
338
+ * Added an REXML pluggable parser for backwards compatability. To use it,
339
+ just do this:
340
+ agent.pluggable_parser.html = WWW::Mechanize::REXMLPage
341
+ * Fixed a bug with referrers by adding a page attribute to forms and links.
342
+ * Fixed a bug where domain names were case sensitive.
343
+ http://tenderlovemaking.com/2006/09/04/road-to-ruby-mechanize-060/#comment-53
344
+ * Fixed a bug with URI escaped links.
345
+ http://rubyforge.org/pipermail/mechanize-users/2006-September/000002.html
346
+ * Fixed a bug when options in select lists don't have a value. Thanks Dan Higham
347
+ [#5837] Code in lib/mechanize/form_elements.rb is incorrect.
348
+ * Fixed a bug with loading text in to links.
349
+ http://rubyforge.org/pipermail/mechanize-users/2006-September/000000.html
350
+
351
+ === 0.6.0
352
+
353
+ * Changed main parser to use hpricot
354
+ * Made WWW::Mechanize::Page class searchable like hpricot
355
+ * Updated WWW::Mechanize#click to support hpricot links like this:
356
+ @agent.click (page/"a").first
357
+ * Clicking a Frame is now possible:
358
+ @agent.click (page/"frame").first
359
+ * Removed deprecated attr_finder
360
+ * Removed REXML helper methods since the main parser is now hpricot
361
+ * Overhauled cookie parser to use WEBrick::Cookie
362
+
363
+ === 0.5.4
364
+
365
+ * Added WWW::Mechanize#trasact for saving history state between in a
366
+ transaction. See the EXAMPLES file. Thanks Johan Kiviniemi.
367
+ * Added support for gzip compressed pages
368
+ * Forms can now be accessed like a hash. For example, to set the value
369
+ of an input field named 'name' to "Aaron", you can do this:
370
+ form['name'] = "Aaron"
371
+ Or to get the value of a field named 'name', do this:
372
+ puts form['name']
373
+ * File uploads will now read the file specified in FileUpload#file_name
374
+ * FileUpload can use an IO object in FileUpload#file_data
375
+ * Fixed a bug with saving files on windows
376
+ * Fixed a bug with the filename being set in forms
377
+
378
+ === 0.5.3
379
+
380
+ * Mechanize#click will now act on the first element of an array. So if an
381
+ array of links is passed to WWW::Mechanize#click, the first link is clicked.
382
+ That means the syntax for clicking links is shortened and still supports
383
+ selecting a link. The following are equivalent:
384
+ agent.click page.links.first
385
+ agent.click page.links
386
+ * Fixed a bug with spaces in href's and get's
387
+ * Added a tick, untick, and click method to radio buttons so that
388
+ radiobuttons can be "clicked"
389
+ * Added a tick, untick, and click method to check boxes so that
390
+ checkboxes can be "clicked"
391
+ * Options on Select lists can now be "tick"ed, and "untick"ed.
392
+ * Fixed a potential bug conflicting with rails. Thanks Eric Kolve
393
+ * Updated log4r support for a speed increase. Thanks Yinon Bentor
394
+ * Added inspect methods and pretty printing
395
+
396
+ === 0.5.2
397
+
398
+ * Fixed a bug with input names that are nil
399
+ * Added a warning when using attr_finder because attr_finder will be deprecated
400
+ in 0.6.0 in favor of method calls. So this syntax:
401
+ @agent.links(:text => 'foo')
402
+ should be changed to this:
403
+ @agent.links.text('foo')
404
+ * Added support for selecting multiple options in select tags that support
405
+ multiple options. See WWW::Mechanize::MultiSelectList.
406
+ * New select list methods have been added, select_all, select_none.
407
+ * Options for select lists can now be "clicked" which toggles their selection,
408
+ they can be "selected" and "unselected". See WWW::Mechanize::Option
409
+ * Added a method to set multiple fields at the same time,
410
+ WWW::Mechanize::Form#set_fields. Which can be used like so:
411
+ form.set_fields( :foo => 'bar', :name => 'Aaron' )
412
+
413
+ === 0.5.1
414
+
415
+ * Fixed bug with file uploads
416
+ * Added performance tweaks to the cookie class
417
+
418
+ === 0.5.0
419
+
420
+ * Added pluggable parsers. (Thanks to Eric Kolve for the idea)
421
+ * Changed namespace so all classes are under WWW::Mechanize.
422
+ * Updating Forms so that fields can be used as accessors (Thanks Gregory Brown)
423
+ * Added WWW::Mechanize::File as default object used for unknown content types.
424
+ * Added 'save_as' method to Mechanize::File, so any page can be saved.
425
+ * Adding 'save_as' and 'load' to CookieJar so that cookies can be saved
426
+ between sessions.
427
+ * Added WWW::Mechanize::FileSaver pluggable parser to automatically save files.
428
+ * Added WWW::Mechanize::Page#title for page titles
429
+ * Added OpenSSL certificate support (Thanks Mike Dalessio)
430
+ * Removed support for body filters in favor of pluggable parsers.
431
+ * Fixed cookie bug adding a '/' when the url is missing one (Thanks Nick Dainty)
432
+
433
+ === 0.4.7
434
+
435
+ * Fixed bug with no action in forms. Thanks to Adam Wiggins
436
+ * Setting a default user-agent string
437
+ * Added house cleaning to the cookie jar so expired cookies don't stick around.
438
+ * Added new method WWW::Form#field to find the first field with a given name.
439
+ (thanks to Gregory Brown)
440
+ * Added WWW::Mechanize#get_file for fetching non text/html files
441
+
442
+ === 0.4.6
443
+
444
+ * Added support for proxies
445
+ * Added a uri field to WWW::Link
446
+ * Added a error class WWW::Mechanize::ContentTypeError
447
+ * Added image alt text to link text
448
+ * Added an visited? method to WWW::Mechanize
449
+ * Added Array#value= which will set the first value to the argument. That
450
+ allows syntax as such: form.fields.name('q').value = 'xyz'
451
+ Before it was like this: form.fields.name('q').first.value = 'xyz'
452
+
453
+ === 0.4.5
454
+
455
+ * Added support for multiple values of the same name
456
+ * Updated build_query_string to take an array of arrays (Thanks Michal Janeczek)
457
+ * Added WWW::Mechanize#body_filter= so that response bodies can be preprocessed
458
+ * Added WWW::Page#body_filter= so that response bodies can be preprocessed
459
+ * Added support for more date formats in the cookie parser
460
+ * Fixed a bug with empty select lists
461
+ * Fixing a problem with cookies not handling no spaces after semicolons
462
+
463
+ === 0.4.4
464
+
465
+ * Fixed error in method signature, basic_authetication is now basic_auth
466
+ * Fixed bug with encoding names in file uploads (Big thanks to Alex Young)
467
+ * Added options to the select list
468
+
469
+ === 0.4.3
470
+
471
+ * Added syntactic sugar for finding things
472
+ * Fixed bug with HttpOnly option in cookies
473
+ * Fixed a bug with cookie date parsing
474
+ * Defaulted dropdown lists to the first element
475
+ * Added unit tests
476
+
477
+ === 0.4.2
478
+
479
+ * Added support for iframes
480
+ * Made mechanize dependant on ruby-web rather than narf
481
+ * Added unit tests
482
+ * Fixed a bunch of warnings
483
+
484
+ === 0.4.1
485
+
486
+ * Added support for file uploading
487
+ * Added support for frames (Thanks Gabriel[mailto:leerbag@googlemail.com])
488
+ * Added more unit tests
489
+ * Fixed some bugs
490
+
491
+ === 0.4.0
492
+
493
+ * Added more unit tests
494
+ * Added a cookie jar with better cookie support, included expiration of cookies
495
+ and general cookie security.
496
+ * Updated mechanize to use built in net/http if ruby version is new enough.
497
+ * Added support for meta refresh tags
498
+ * Defaulted form actions to 'GET'
499
+ * Fixed various bugs
500
+ * Added more unit tests
501
+ * Added a response code exception
502
+ * Thanks to Brian Ellin (brianellin@gmail.com) for:
503
+ Added support for CA files, and support for 301 response codes
504
+