mechanize 2.7.6 → 2.8.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of mechanize might be problematic. Click here for more details.

Files changed (119) hide show
  1. checksums.yaml +5 -5
  2. data/.github/dependabot.yml +11 -0
  3. data/.github/workflows/ci-test.yml +53 -0
  4. data/.yardopts +8 -0
  5. data/{CHANGELOG.rdoc → CHANGELOG.md} +136 -87
  6. data/EXAMPLES.rdoc +1 -24
  7. data/Gemfile +1 -4
  8. data/{LICENSE.rdoc → LICENSE.txt} +4 -0
  9. data/README.md +77 -0
  10. data/Rakefile +18 -3
  11. data/examples/rubygems.rb +2 -2
  12. data/lib/mechanize.rb +3 -2
  13. data/lib/mechanize/chunked_termination_error.rb +1 -0
  14. data/lib/mechanize/content_type_error.rb +1 -0
  15. data/lib/mechanize/cookie.rb +1 -13
  16. data/lib/mechanize/cookie_jar.rb +4 -12
  17. data/lib/mechanize/directory_saver.rb +1 -0
  18. data/lib/mechanize/download.rb +2 -1
  19. data/lib/mechanize/element_matcher.rb +1 -0
  20. data/lib/mechanize/element_not_found_error.rb +1 -0
  21. data/lib/mechanize/file.rb +2 -1
  22. data/lib/mechanize/file_connection.rb +5 -3
  23. data/lib/mechanize/file_request.rb +1 -0
  24. data/lib/mechanize/file_response.rb +4 -1
  25. data/lib/mechanize/file_saver.rb +1 -0
  26. data/lib/mechanize/form.rb +2 -10
  27. data/lib/mechanize/form/button.rb +1 -0
  28. data/lib/mechanize/form/check_box.rb +1 -0
  29. data/lib/mechanize/form/field.rb +1 -0
  30. data/lib/mechanize/form/file_upload.rb +1 -0
  31. data/lib/mechanize/form/hidden.rb +1 -0
  32. data/lib/mechanize/form/image_button.rb +1 -0
  33. data/lib/mechanize/form/keygen.rb +1 -0
  34. data/lib/mechanize/form/multi_select_list.rb +1 -0
  35. data/lib/mechanize/form/option.rb +1 -0
  36. data/lib/mechanize/form/radio_button.rb +1 -0
  37. data/lib/mechanize/form/reset.rb +1 -0
  38. data/lib/mechanize/form/select_list.rb +1 -0
  39. data/lib/mechanize/form/submit.rb +1 -0
  40. data/lib/mechanize/form/text.rb +1 -0
  41. data/lib/mechanize/form/textarea.rb +1 -0
  42. data/lib/mechanize/headers.rb +1 -0
  43. data/lib/mechanize/history.rb +1 -0
  44. data/lib/mechanize/http.rb +1 -0
  45. data/lib/mechanize/http/agent.rb +16 -8
  46. data/lib/mechanize/http/auth_challenge.rb +1 -0
  47. data/lib/mechanize/http/auth_realm.rb +1 -0
  48. data/lib/mechanize/http/auth_store.rb +1 -0
  49. data/lib/mechanize/http/content_disposition_parser.rb +14 -2
  50. data/lib/mechanize/http/www_authenticate_parser.rb +3 -3
  51. data/lib/mechanize/image.rb +1 -0
  52. data/lib/mechanize/page.rb +4 -3
  53. data/lib/mechanize/page/base.rb +1 -0
  54. data/lib/mechanize/page/frame.rb +1 -0
  55. data/lib/mechanize/page/image.rb +1 -0
  56. data/lib/mechanize/page/label.rb +1 -0
  57. data/lib/mechanize/page/link.rb +8 -1
  58. data/lib/mechanize/page/meta_refresh.rb +1 -0
  59. data/lib/mechanize/parser.rb +1 -0
  60. data/lib/mechanize/pluggable_parsers.rb +1 -0
  61. data/lib/mechanize/prependable.rb +1 -0
  62. data/lib/mechanize/redirect_limit_reached_error.rb +1 -0
  63. data/lib/mechanize/redirect_not_get_or_head_error.rb +1 -0
  64. data/lib/mechanize/response_code_error.rb +2 -1
  65. data/lib/mechanize/response_read_error.rb +1 -0
  66. data/lib/mechanize/robots_disallowed_error.rb +1 -0
  67. data/lib/mechanize/test_case.rb +34 -29
  68. data/lib/mechanize/test_case/bad_chunking_servlet.rb +1 -0
  69. data/lib/mechanize/test_case/basic_auth_servlet.rb +1 -0
  70. data/lib/mechanize/test_case/content_type_servlet.rb +1 -0
  71. data/lib/mechanize/test_case/digest_auth_servlet.rb +1 -0
  72. data/lib/mechanize/test_case/file_upload_servlet.rb +1 -0
  73. data/lib/mechanize/test_case/form_servlet.rb +1 -0
  74. data/lib/mechanize/test_case/gzip_servlet.rb +4 -3
  75. data/lib/mechanize/test_case/header_servlet.rb +1 -0
  76. data/lib/mechanize/test_case/http_refresh_servlet.rb +1 -0
  77. data/lib/mechanize/test_case/infinite_redirect_servlet.rb +1 -0
  78. data/lib/mechanize/test_case/infinite_refresh_servlet.rb +1 -0
  79. data/lib/mechanize/test_case/many_cookies_as_string_servlet.rb +1 -0
  80. data/lib/mechanize/test_case/many_cookies_servlet.rb +1 -0
  81. data/lib/mechanize/test_case/modified_since_servlet.rb +1 -0
  82. data/lib/mechanize/test_case/ntlm_servlet.rb +1 -0
  83. data/lib/mechanize/test_case/one_cookie_no_spaces_servlet.rb +1 -0
  84. data/lib/mechanize/test_case/one_cookie_servlet.rb +1 -0
  85. data/lib/mechanize/test_case/quoted_value_cookie_servlet.rb +1 -0
  86. data/lib/mechanize/test_case/redirect_servlet.rb +1 -0
  87. data/lib/mechanize/test_case/referer_servlet.rb +1 -0
  88. data/lib/mechanize/test_case/refresh_with_empty_url.rb +1 -0
  89. data/lib/mechanize/test_case/refresh_without_url.rb +1 -0
  90. data/lib/mechanize/test_case/response_code_servlet.rb +1 -0
  91. data/lib/mechanize/test_case/robots_txt_servlet.rb +1 -0
  92. data/lib/mechanize/test_case/send_cookies_servlet.rb +1 -0
  93. data/lib/mechanize/test_case/server.rb +1 -0
  94. data/lib/mechanize/test_case/servlets.rb +1 -0
  95. data/lib/mechanize/test_case/verb_servlet.rb +5 -6
  96. data/lib/mechanize/unauthorized_error.rb +1 -0
  97. data/lib/mechanize/unsupported_scheme_error.rb +1 -0
  98. data/lib/mechanize/util.rb +2 -1
  99. data/lib/mechanize/version.rb +2 -1
  100. data/lib/mechanize/xml_file.rb +1 -0
  101. data/mechanize.gemspec +45 -35
  102. data/test/htdocs/dir with spaces/foo.html +1 -0
  103. data/test/htdocs/tc_links.html +1 -1
  104. data/test/test_mechanize.rb +19 -7
  105. data/test/test_mechanize_cookie.rb +19 -19
  106. data/test/test_mechanize_cookie_jar.rb +85 -53
  107. data/test/test_mechanize_download.rb +13 -1
  108. data/test/test_mechanize_file.rb +10 -0
  109. data/test/test_mechanize_file_connection.rb +21 -3
  110. data/test/test_mechanize_file_response.rb +25 -1
  111. data/test/test_mechanize_form.rb +12 -0
  112. data/test/test_mechanize_form_keygen.rb +1 -0
  113. data/test/test_mechanize_http_agent.rb +53 -8
  114. data/test/test_mechanize_http_content_disposition_parser.rb +27 -0
  115. data/test/test_mechanize_link.rb +24 -0
  116. data/test/test_mechanize_page_encoding.rb +28 -1
  117. metadata +117 -71
  118. data/.travis.yml +0 -36
  119. data/README.rdoc +0 -77
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 7e684f2f1ceb7fca81909282b30a28c04272caef
4
- data.tar.gz: c08ef7e0f2aefd788f9808175afb4f97bce60b3f
2
+ SHA256:
3
+ metadata.gz: 98e75d76ae1e421fbdb7f7ff435759e0799612f41d55918cf82bd77e689399bb
4
+ data.tar.gz: 439d3bf9e35c76a8f8e80daff1e76ad89c8fe3a1b9fd436f6274d1f7f4d1c2f4
5
5
  SHA512:
6
- metadata.gz: fed2bde694313e6ddae6d44bbbf0ac90aa6b651ab7027628125b2095b33a73dc3fdaf8481335197ab0cf9cbea7c9dfa9396f4e3c4199cdc3563f76b20728f18c
7
- data.tar.gz: a547f0f8d1c6f8d0b7c8ff580e487b64b79fbec3cca64a514407243529248e6892f66d9af746bc6c429458750e7b5782510cb3e8180f8464f08c8c0c0c0351b9
6
+ metadata.gz: da510c4185aea0860d0b48b37c78d69db0b399374d1b79a4d54c8eb6748f8b9d9b4a946e050b673467ee5b808ecb298d13fb8e4dc0f41d4c62afdea8a8da4acc
7
+ data.tar.gz: 571af8b0552b726c32dbf4c9818fba409011c633cf0eed3e355ab6f63b605d7a8d1313ab638ee474933115e9415d046ac95595cb1ac37dfa4a49aeb69698149a
@@ -0,0 +1,11 @@
1
+ # To get started with Dependabot version updates, you'll need to specify which
2
+ # package ecosystems to update and where the package manifests are located.
3
+ # Please see the documentation for all configuration options:
4
+ # https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5
+
6
+ version: 2
7
+ updates:
8
+ - package-ecosystem: "bundler"
9
+ directory: "/"
10
+ schedule:
11
+ interval: "weekly"
@@ -0,0 +1,53 @@
1
+ name: "ci"
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ types: [opened, synchronize]
9
+ branches:
10
+ - main
11
+
12
+ jobs:
13
+ rubocop:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: "3.0"
20
+ bundler-cache: true
21
+ - run: bundle exec rake rubocop
22
+
23
+ test:
24
+ needs: ["rubocop"]
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ ruby-version: ["2.5", "2.6", "2.7", "3.0", "jruby", "truffleruby-head"]
29
+
30
+ runs-on: ubuntu-latest
31
+ steps:
32
+ - uses: actions/checkout@v2
33
+ - uses: ruby/setup-ruby@v1
34
+ with:
35
+ ruby-version: ${{matrix.ruby-version}}
36
+ bundler-cache: true
37
+ - run: bundle exec rake test
38
+
39
+ test-platform:
40
+ needs: ["rubocop"]
41
+ strategy:
42
+ fail-fast: false
43
+ matrix:
44
+ platform: ["windows-latest", "macos-latest"]
45
+
46
+ runs-on: ${{matrix.platform}}
47
+ steps:
48
+ - uses: actions/checkout@v2
49
+ - uses: ruby/setup-ruby@v1
50
+ with:
51
+ ruby-version: "3.0"
52
+ bundler-cache: true
53
+ - run: bundle exec rake test
data/.yardopts ADDED
@@ -0,0 +1,8 @@
1
+ --main=README.md
2
+ lib/**/*.rb
3
+ -
4
+ README.md
5
+ LICENSE.txt
6
+ CHANGELOG.md
7
+ GUIDE.rdoc
8
+ EXAMPLES.rdoc
@@ -1,6 +1,66 @@
1
- = Mechanize CHANGELOG
1
+ # Mechanize CHANGELOG
2
2
 
3
- === 2.7.6
3
+ ## 2.8.2 / 2021-08-06
4
+
5
+ ### Dependencies
6
+
7
+ * Update dependency on Addressable from `~>2.7` to `~>2.8`. (#584) @yidingww
8
+
9
+
10
+ ## 2.8.1 / 2021-05-09
11
+
12
+ ### Fix
13
+
14
+ * Gracefully handle parsing errors that contain an invalid byte sequence. Previously, if libxml2 registered a parsing error that itself contained invalid encoding, an exception might be raised. (#553)
15
+
16
+
17
+ ## 2.8.0 / 2021-04-01
18
+
19
+ ### Requirements
20
+
21
+ * Mechanize now requires Ruby 2.5 or newer.
22
+ * Move from `ntlm-http` to `rubyntlm` gem. (#495, #574)
23
+
24
+ ### New Features
25
+
26
+ * Page::Link#uri now handles non-ASCII `href`s. (#569) @terryyin
27
+ * FileConnection supports Windows drive letters (#483)
28
+ * Credential headers 'Authorization' and 'Cookie' are deleted on cross-origin redirects. (#538) @kyoshidajp
29
+ * ContentDispositionParser handles ISO8601 date headers, to be robust with websites that ignore RFC2183. (#554) @reitermarkus
30
+
31
+ ### Bug fix
32
+
33
+ * POST headers 'Content-Length', 'Content-MD5', and 'Content-Type' are deleted in a case-insensitive manner on redirects. Previously these headers were treated as case-sensitive.
34
+
35
+
36
+ ## 2.7.7 / 2021-02-01
37
+
38
+ * Security fixes for CVE-2021-21289
39
+
40
+ Mechanize `>= v2.0`, `< v2.7.7` allows for OS commands to be injected into several classes'
41
+ methods via implicit use of Ruby's `Kernel.open` method. Exploitation is possible only if
42
+ untrusted input is used as a local filename and passed to any of these calls:
43
+
44
+ - `Mechanize::CookieJar#load`: since v2.0 (see 208e3ed)
45
+ - `Mechanize::CookieJar#save_as`: since v2.0 (see 5b776a4)
46
+ - `Mechanize#download`: since v2.2 (see dc91667)
47
+ - `Mechanize::Download#save` and `#save!` since v2.1 (see 98b2f51, bd62ff0)
48
+ - `Mechanize::File#save` and `#save_as`: since v2.1 (see 2bf7519)
49
+ - `Mechanize::FileResponse#read_body`: since v2.0 (see 01039f5)
50
+
51
+ See https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g for more
52
+ information.
53
+
54
+ Also see #547, #548. Thank you, @kyoshidajp!
55
+
56
+ * New Features
57
+ * Support for Ruby 3.0 by adding `webrick` as a runtime dependency. (#557) @pvalena
58
+
59
+ * Bug fix
60
+ * Ignore input fields with blank names (#542, #536)
61
+
62
+
63
+ ## 2.7.6
4
64
 
5
65
  * New Features
6
66
  * Mechanize#set_proxy accepts an HTTP URL/URI. (#513)
@@ -12,7 +72,7 @@
12
72
  * Mechanize::Page#title no longer picks a title in an embeded SVG/RDF element. (#503)
13
73
  * Make Mechanize::Form#has_field? boolean. (#501)
14
74
 
15
- === 2.7.5
75
+ ## 2.7.5
16
76
 
17
77
  * New Features
18
78
  * All 4xx responses and RedirectLimitReachedError when fetching robots.txt are treated as full allow just like Googlebot does.
@@ -23,7 +83,7 @@
23
83
  * Fix basic authentication for a realm that contains uppercase characters. (#458, #459)
24
84
  * Fix encoding error when uploading a file which name is non-ASCII. (#333)
25
85
 
26
- === 2.7.4
86
+ ## 2.7.4
27
87
 
28
88
  * New Features
29
89
  * Accept array-like and hash-like values as query/parameter value.
@@ -45,7 +105,7 @@
45
105
  * Fix whitespace bug in WWW-Authenticate. #451, #450, by Rasmus Bergholdt
46
106
  * Don't allow redirect from a non-file URL to a file URL for security reasons. (#455)
47
107
 
48
- === 2.7.3
108
+ ## 2.7.3
49
109
 
50
110
  * New Features
51
111
  * Allow net-http-persistent instance to be named. #324, John Weir.
@@ -56,34 +116,33 @@
56
116
  * Ensure Download#save! defaults back to original filename if
57
117
  none is provided (#300)
58
118
 
59
- === 2.7.2
119
+ ## 2.7.2
60
120
 
61
121
  * Bug fix
62
122
  * API compatibility issues with Mechanize::CookieJar cookies has been
63
123
  addressed. https://github.com/sparklemotion/http-cookie/issues/2 #326
64
124
 
65
- === 2.7.1
125
+ ## 2.7.1
66
126
 
67
127
  * Bug fix
68
128
  * Ensure images with no "src" attribute still return correct URLs. #317
69
129
  * Fixes Mechanize::Parser#extract_filename where an empty string filename
70
130
  in the response caused unhandled exception. #318
71
131
 
72
- === 2.7.0
132
+ ## 2.7.0
73
133
 
74
134
  * New Features
75
135
  * Mechanize::Agent#response_read will now raise a
76
136
  Mechanize::ResponseReadError instead of an EOFError and avoid losing
77
137
  requested content. #296.
78
- * Depend on http-cookie, add backwards compatible deprecations.
79
- #257 Akinori MUSHA.
138
+ * Depend on http-cookie, add backwards compatible deprecations. #257 Akinori MUSHA.
80
139
  * Added `Download#save!` for overwriting existing files. #300 Sean Kim.
81
140
 
82
141
  * Bug fix
83
142
  * Ensure page URLs with whitespace in them are escaped #313 @pacop.
84
143
  * Added a workaround for a bug of URI#+ that led to failure in resolving a relative path containing double slash like "/../http://.../". #304
85
144
 
86
- === 2.6.0
145
+ ## 2.6.0
87
146
 
88
147
  * New Features
89
148
  * Mechanize#start and Mechanize#shutdown (Thanks, Damian Janowski!)
@@ -105,19 +164,16 @@
105
164
  * Added iPad and Android user agents. #277 by sambit, #278 by seansay.
106
165
 
107
166
  * Bug fix
108
- * Mechanize#cert and Mechanize#key now return the values set by
109
- #cert= and #key=. #244, #245 (Thanks, Robert Gogolok!)
110
- * Mechanize no longer submits disabled form fields. #276 by Bogdan Gusiev,
111
- #279 by Ricardo Valeriano.
167
+ * Mechanize#cert and Mechanize#key now return the values set by #cert= and #key=. #244, #245 (Thanks, Robert Gogolok!)
168
+ * Mechanize no longer submits disabled form fields. #276 by Bogdan Gusiev, #279 by Ricardo Valeriano.
112
169
  * Mechanize::File#save now behaves like Mechanize::Download#save in
113
- that it will create the parent directory before saving.
114
- #272, #280 by Ryan Kowalick
170
+ that it will create the parent directory before saving. #272, #280 by Ryan Kowalick
115
171
  * Ensure `application/xml` is registered as an XML parser in
116
172
  `PluggableParser`, not just `text/xml`. #266 James Gregory
117
173
  * Mechanize now writes cookiestxt with a prefixed dot for wildcard domain
118
174
  handling. #295 by Mike Morearty.
119
175
 
120
- === 2.5.2
176
+ ## 2.5.2
121
177
 
122
178
  * New Features
123
179
  * Mechanize::CookieJar#save_as takes a keyword option "session" to say
@@ -131,18 +187,17 @@
131
187
  In mechanize 3 the old "Mac FireFox" user-agent alias will be removed.
132
188
  Pull request #231 by Gavin Miller.
133
189
  * Mechanize now authenticates using the raw challenge, not a reconstructed
134
- one, to avoid dealing with quoting rules of RFC 2617. Fixes failures in
135
- #231 due to net-http-digest_auth 1.2.1
190
+ one, to avoid dealing with quoting rules of RFC 2617. Fixes failures in #231 due to net-http-digest_auth 1.2.1
136
191
  * Fixed Content-Disposition parameter parser to be case insensitive. #233
137
192
  * Fixed redirection counting in following meta refresh. #240
138
193
 
139
- === 2.5.1
194
+ ## 2.5.1
140
195
 
141
196
  * Bug fix
142
197
  * Mechanize no longer copies POST requests during a redirect which was
143
198
  introduced by #215. Pull request #229 by Godfrey Chan.
144
199
 
145
- === 2.5
200
+ ## 2.5
146
201
 
147
202
  * Minor enhancements
148
203
  * Added Mechanize#ignore_bad_chunking for working around servers that don't
@@ -163,12 +218,11 @@
163
218
  terminate chunked transfer-encoding properly. Issue #116
164
219
  * Mechanize no longer raises an exception when multiple identical
165
220
  radiobuttons are checked. Issue #214 by Matthias Guenther
166
- * Fixed documentation for pre_connect_hooks and post_connect_hooks. Issue
167
- #226 by Robert Poor
221
+ * Fixed documentation for pre_connect_hooks and post_connect_hooks. Issue #226 by Robert Poor
168
222
  * Worked around ruby 1.8 run with -Ku and ISO-8859-1 encoded characters in
169
223
  URIs. Issue #228 by Stanislav O.Pogrebnyak
170
224
 
171
- === 2.4
225
+ ## 2.4
172
226
 
173
227
  * Security fix:
174
228
 
@@ -191,7 +245,7 @@
191
245
  * Improved exception messages for 401 Unauthorized responses. Mechanize now
192
246
  tells you if you were missing credentials, had an incorrect password, etc.
193
247
 
194
- === 2.3 / 2012-02-20
248
+ ## 2.3 / 2012-02-20
195
249
 
196
250
  * Minor enhancements
197
251
  * Add support for the Max-Age attribute in the Set-Cookie header.
@@ -211,14 +265,14 @@
211
265
  * Cookies with an empty Expires attribute value were stored as session
212
266
  cookies but cookies without the Expires attribute were not. Issue #78
213
267
 
214
- === 2.2.1 / 2012-02-13
268
+ ## 2.2.1 / 2012-02-13
215
269
 
216
270
  * Bug fixes
217
271
  * Add missing file to the gem, ensure that missing files won't cause
218
272
  failures again. Issue #201 by Alex
219
273
  * Fix minor grammar issue in README. Issue #200 by Shane Becker.
220
274
 
221
- === 2.2 / 2012-02-12
275
+ ## 2.2 / 2012-02-12
222
276
 
223
277
  * API changes
224
278
  * MetaRefresh#href is not normalized to an absolute URL, but set to the
@@ -230,8 +284,7 @@
230
284
  * SSL parameters and proxy may now be set at any time. Issue #194 by
231
285
  dsisnero.
232
286
  * Improved Mechanize::Page with #image_with and #images_with and
233
- Mechanize::Page::Image various img element attribute accessors, #caption,
234
- #extname, #mime_type and #fetch. Pull request #173 by kitamomonga
287
+ Mechanize::Page::Image various img element attribute accessors, #caption, #extname, #mime_type and #fetch. Pull request #173 by kitamomonga
235
288
  * Added MIME type parsing for content-types in Mechanize::PluggableParser
236
289
  for fine-grained parser choices. Parsers will be chosen based on exact
237
290
  match, simplified type or media type in that order. See
@@ -253,7 +306,7 @@
253
306
  * A link with an empty href is now resolved correctly where previously the
254
307
  query part was dropped.
255
308
 
256
- === 2.1.1 / 2012-02-03
309
+ ## 2.1.1 / 2012-02-03
257
310
 
258
311
  * Bug fixes
259
312
  * Set missing idle_timeout default. Issue #196
@@ -281,7 +334,7 @@
281
334
  * Documented how to convert a Mechanize::ResponseReadError into a File or
282
335
  Page, along with a new method #force_parse. Issue #176
283
336
 
284
- === 2.1 / 2011-12-20
337
+ ## 2.1 / 2011-12-20
285
338
 
286
339
  * Deprecations
287
340
  * Mechanize#get no longer accepts an options hash.
@@ -294,8 +347,7 @@
294
347
  * SSL connections will be verified against the system certificate store by
295
348
  default.
296
349
  * Added Mechanize#retry_change_requests to allow mechanize to retry POST and
297
- other non-idempotent requests when you know it is safe to do so. Issue
298
- #123
350
+ other non-idempotent requests when you know it is safe to do so. Issue #123
299
351
  * Mechanize can now stream files directly to disk without loading them into
300
352
  memory first through Mechanize::Download, a pluggable parser for
301
353
  downloading files.
@@ -310,8 +362,7 @@
310
362
  agent.pluggable_parser.default = Mechanize::Download
311
363
  * Added Mechanize#content_encoding_hooks which allow handling of
312
364
  non-standard content encodings like "agzip". Patch #125 by kitamomonga
313
- * Added dom_class to elements and the element matcher like dom_id. Patch
314
- #156 by Dan Hansen.
365
+ * Added dom_class to elements and the element matcher like dom_id. Patch #156 by Dan Hansen.
315
366
  * Added support for the HTML5 keygen form element. See
316
367
  http://dev.w3.org/html5/spec/Overview.html#the-keygen-element Patch #157
317
368
  by Victor Costan.
@@ -360,11 +411,10 @@
360
411
  * The original Referer value persists on redirection. Issue #150
361
412
  * Do not send a referer on a Refresh header based redirection.
362
413
  * Fixed encoding error in tests when LANG=C. Patch #142 by jinschoi.
363
- * The order of items in a form submission now match the DOM order. Patch
364
- #129 by kitamomonga
414
+ * The order of items in a form submission now match the DOM order. Patch #129 by kitamomonga
365
415
  * Fixed proxy example in EXAMPLE. Issue #146 by NielsKSchjoedt
366
416
 
367
- === 2.0.1 / 2011-06-28
417
+ ## 2.0.1 / 2011-06-28
368
418
 
369
419
  Mechanize now uses minitest to avoid 1.9 vs 1.8 assertion availability in
370
420
  test/unit
@@ -375,7 +425,7 @@ test/unit
375
425
  * Mechanize#keep_alive_time no longer crashes but does nothing as
376
426
  net-http-persistent does not support HTTP/1.0 keep-alive extensions.
377
427
 
378
- === 2.0 / 2011-06-27
428
+ ## 2.0 / 2011-06-27
379
429
 
380
430
  Mechanize is now under the MIT license
381
431
 
@@ -429,8 +479,7 @@ Mechanize is now under the MIT license
429
479
  * Mechanize now implements session cookies. GH #78
430
480
  * Mechanize now implements deflate decoding. GH #40
431
481
  * Mechanize now allows a certificate and key to be passed directly. GH #71
432
- * Mechanize::Form::MultiSelectList now implements #option_with and
433
- #options_with. GH #42
482
+ * Mechanize::Form::MultiSelectList now implements #option_with and #options_with. GH #42
434
483
  * Add Mechanize::Page::Link#rel and #rel?(kind) to read and test the rel
435
484
  attribute.
436
485
  * Add Mechanize::Page#canonical_uri to read a </tt><link
@@ -483,7 +532,7 @@ Mechanize is now under the MIT license
483
532
  * Mechanize::Page::Link#uri now handles both escaped and unescaped hrefs.
484
533
  GH #107
485
534
 
486
- === 1.0.0
535
+ ## 1.0.0
487
536
 
488
537
  * New Features:
489
538
 
@@ -501,7 +550,7 @@ Mechanize is now under the MIT license
501
550
  * Fixing default values with serialized cookies. GH #3
502
551
  * Checkboxes and fields are sorted by page appearance before submitting. #11
503
552
 
504
- === 0.9.3
553
+ ## 0.9.3
505
554
 
506
555
  * Bug Fixes:
507
556
 
@@ -519,7 +568,7 @@ Mechanize is now under the MIT license
519
568
  * Fixed a bug with double semi-colons in Content-Disposition headers
520
569
  * Properly handling cookies that specify a path. RF #25259
521
570
 
522
- === 0.9.2 / 2009/03/05
571
+ ## 0.9.2 / 2009/03/05
523
572
 
524
573
  * New Features:
525
574
  * Mechanize#submit and Form#submit take arbitrary headers(thanks penguincoder)
@@ -532,7 +581,7 @@ Mechanize is now under the MIT license
532
581
  * Made Content-Type match case insensitive (Thanks Kelly Reynolds)
533
582
  * Non-string form parameters work
534
583
 
535
- === 0.9.1 2009/02/23
584
+ ## 0.9.1 2009/02/23
536
585
 
537
586
  * New Features:
538
587
  * Encoding may be specified for a page: Page#encoding=
@@ -548,7 +597,7 @@ Mechanize is now under the MIT license
548
597
  * WAP content types will now be parsed
549
598
  * Rescued poorly formatted cookies. Thanks Kelley Reynolds!
550
599
 
551
- === 0.9.0
600
+ ## 0.9.0
552
601
 
553
602
  * Deprecations
554
603
  * WWW::Mechanize::List is gone!
@@ -558,7 +607,7 @@ Mechanize is now under the MIT license
558
607
  * Bug Fixes:
559
608
  * Nil check on page when base tag is used #23021
560
609
 
561
- === 0.8.5
610
+ ## 0.8.5
562
611
 
563
612
  * Deprecations
564
613
  * WWW::Mechanize::List will be deprecated in 0.9.0, and warnings have
@@ -582,28 +631,28 @@ Mechanize is now under the MIT license
582
631
  * Mechanize#get requests no longer send a referer unless they are relative
583
632
  requests.
584
633
 
585
- === 0.8.4
634
+ ## 0.8.4
586
635
 
587
636
  * Bug Fixes:
588
637
  * Setting the port number on the host header.
589
638
  * Fixing Authorization headers for picky servers
590
639
 
591
- === 0.8.3
640
+ ## 0.8.3
592
641
 
593
642
  * Bug Fixes:
594
643
  * Making sure logger is set during SSL connections.
595
644
 
596
- === 0.8.2
645
+ ## 0.8.2
597
646
 
598
647
  * Bug Fixes:
599
648
  * Doh! I was accidentally setting headers twice.
600
649
 
601
- === 0.8.1
650
+ ## 0.8.1
602
651
 
603
652
  * Bug Fixes:
604
653
  * Fixed problem with nil pointer when logger is set
605
654
 
606
- === 0.8.0
655
+ ## 0.8.0
607
656
 
608
657
  * New Features:
609
658
  * Lifecycle hooks. Mechanize#pre_connect_hooks, Mechanize#post_connect_hooks
@@ -617,7 +666,7 @@ Mechanize is now under the MIT license
617
666
  * Only setting headers once
618
667
  * Adding IIS authentication support
619
668
 
620
- === 0.7.8
669
+ ## 0.7.8
621
670
 
622
671
  * Bug Fixes:
623
672
  * Fixed bug when receiving a 304 response (HTTPNotModified) on a page not
@@ -625,7 +674,7 @@ Mechanize is now under the MIT license
625
674
  * #21428 Default to HTML parser for 'application/xhtml+xml' content-type.
626
675
  * Fixed an issue where redirects were resending posted data
627
676
 
628
- === 0.7.7
677
+ ## 0.7.7
629
678
 
630
679
  * New Features:
631
680
  * Page#form_with takes a +criteria+ hash.
@@ -646,7 +695,7 @@ Mechanize is now under the MIT license
646
695
  * #21233 Smarter multipart boundry. Thanks Todd Willey!
647
696
  * #20097 Supporting meta tag cookies.
648
697
 
649
- === 0.7.6
698
+ ## 0.7.6
650
699
 
651
700
  * New Features:
652
701
  * Added support for reading Mozilla cookie jars. Thanks Chris Riddoch!
@@ -669,32 +718,32 @@ Mechanize is now under the MIT license
669
718
  * Supporting blank strings for option values.
670
719
  http://rubyforge.org/tracker/index.php?func=detail&aid=19975&group_id=1453&atid=5709
671
720
 
672
- === 0.7.5
721
+ ## 0.7.5
673
722
 
674
723
  * Fixed a bug when fetching files and not pages. Thanks Mat Schaffer!
675
724
 
676
- === 0.7.4
725
+ ## 0.7.4
677
726
 
678
727
  * doh!
679
728
 
680
- === 0.7.3
729
+ ## 0.7.3
681
730
 
682
731
  * Pages are now yielded to a blocks given to WWW::Mechanize#get
683
732
  * WWW::Mechanize#get now takes hash arguments for uri parameters.
684
733
  * WWW::Mechanize#post takes an IO object as a parameter and posts correctly.
685
734
  * Fixing a strange zlib inflate problem on windows
686
735
 
687
- === 0.7.2
736
+ ## 0.7.2
688
737
 
689
738
  * Handling gzipped responses with no Content-Length header
690
739
 
691
- === 0.7.1
740
+ ## 0.7.1
692
741
 
693
742
  * Added iPhone to the user agent aliases. [#17572]
694
743
  * Fixed a bug with EOF errors in net/http. [#17570]
695
744
  * Handling 0 length gzipped responses. [#17471]
696
745
 
697
- === 0.7.0
746
+ ## 0.7.0
698
747
 
699
748
  * Removed Ruby 1.8.2 support
700
749
  * Changed parser to lazily parse links
@@ -702,7 +751,7 @@ Mechanize is now under the MIT license
702
751
  * Adding verify_callback for SSL requests. Thanks Mike Dalessio!
703
752
  * Fixed a bug with Accept-Language header. Thanks Bill Siggelkow.
704
753
 
705
- === 0.6.11
754
+ ## 0.6.11
706
755
 
707
756
  * Detecting single quotes in meta redirects.
708
757
  * Adding pretty inspect for ruby versions > 1.8.4 (Thanks Joel Kociolek)
@@ -713,7 +762,7 @@ Mechanize is now under the MIT license
713
762
  * Added a FAQ
714
763
  http://rubyforge.org/tracker/?func=detail&aid=15772&group_id=1453&atid=5709
715
764
 
716
- === 0.6.10
765
+ ## 0.6.10
717
766
 
718
767
  * Made digest authentication work with POSTs.
719
768
  * Made sure page was HTML before following meta refreshes.
@@ -732,7 +781,7 @@ Mechanize is now under the MIT license
732
781
  * Aliasing inspect to pretty_inspect. Thanks Eric Promislow.
733
782
  http://rubyforge.org/pipermail/mechanize-users/2007-July/000157.html
734
783
 
735
- === 0.6.9
784
+ ## 0.6.9
736
785
 
737
786
  * Updating UTF-8 support for urls
738
787
  * Adding AREA tags to the links list.
@@ -744,7 +793,7 @@ Mechanize is now under the MIT license
744
793
  * Added Digest Authentication support. Thanks to Ryan Davis and Eric Hodel,
745
794
  you get a gold star!
746
795
 
747
- === 0.6.8
796
+ ## 0.6.8
748
797
 
749
798
  * Keep alive can be shut off now with WWW::Mechanize#keep_alive
750
799
  * Conditional requests can be shut off with WWW::Mechanize#conditional_requests
@@ -755,12 +804,12 @@ Mechanize is now under the MIT license
755
804
  * Updating compatability with hpricot
756
805
  * Added more unit tests
757
806
 
758
- === 0.6.7
807
+ ## 0.6.7
759
808
 
760
809
  * Fixed a bug with keep-alive requests
761
810
  * [#9549] fixed problem with cookie paths
762
811
 
763
- === 0.6.6
812
+ ## 0.6.6
764
813
 
765
814
  * Removing hpricot overrides
766
815
  * Fixed a bug where alt text can be nil. Thanks Yannick!
@@ -770,7 +819,7 @@ Mechanize is now under the MIT license
770
819
  * [#9434] Fixed bug where html entities weren't decoded
771
820
  * [#9150] Updated mechanize history to deal with redirects
772
821
 
773
- === 0.6.5
822
+ ## 0.6.5
774
823
 
775
824
  * Copying headers to a hash to prevent memory leaks
776
825
  * Speeding up page parsing
@@ -785,7 +834,7 @@ Mechanize is now under the MIT license
785
834
  http://rubyforge.org/tracker/?func=detail&aid=7563&group_id=1453&atid=5709
786
835
  * Added MSIE 7.0 user agent string
787
836
 
788
- === 0.6.4
837
+ ## 0.6.4
789
838
 
790
839
  * Adding the "redirect_ok" method to Mechanize to stop mechanize from
791
840
  following redirects.
@@ -802,7 +851,7 @@ Mechanize is now under the MIT license
802
851
  * Fixed bug [#6548]. Input type of 'button' was not being added as a button.
803
852
  * Fixed bug [#7139]. REXML parser calls hpricot parser by accident
804
853
 
805
- === 0.6.3
854
+ ## 0.6.3
806
855
 
807
856
  * Added keys and values methods to Form
808
857
  * Added has_value? to Form
@@ -817,7 +866,7 @@ Mechanize is now under the MIT license
817
866
  * Fixed a bug where '#' symbols are encoded
818
867
  http://rubyforge.org/forum/message.php?msg_id=14747
819
868
 
820
- === 0.6.2
869
+ ## 0.6.2
821
870
 
822
871
  * Added a yield to Page#form so that dealing with forms can be more DSL like.
823
872
  * Added the parsed page to the ResponseCodeError so that the parsed results
@@ -825,7 +874,7 @@ Mechanize is now under the MIT license
825
874
  http://rubyforge.org/pipermail/mechanize-users/2006-September/000007.html
826
875
  * Updated documentation (Thanks to Paul Smith)
827
876
 
828
- === 0.6.1
877
+ ## 0.6.1
829
878
 
830
879
  * Added a method to Form called "submit". Now forms can be submitted by
831
880
  calling a method on the form.
@@ -843,7 +892,7 @@ Mechanize is now under the MIT license
843
892
  * Fixed a bug with loading text in to links.
844
893
  http://rubyforge.org/pipermail/mechanize-users/2006-September/000000.html
845
894
 
846
- === 0.6.0
895
+ ## 0.6.0
847
896
 
848
897
  * Changed main parser to use hpricot
849
898
  * Made WWW::Mechanize::Page class searchable like hpricot
@@ -855,7 +904,7 @@ Mechanize is now under the MIT license
855
904
  * Removed REXML helper methods since the main parser is now hpricot
856
905
  * Overhauled cookie parser to use WEBrick::Cookie
857
906
 
858
- === 0.5.4
907
+ ## 0.5.4
859
908
 
860
909
  * Added WWW::Mechanize#trasact for saving history state between in a
861
910
  transaction. See the EXAMPLES file. Thanks Johan Kiviniemi.
@@ -870,7 +919,7 @@ Mechanize is now under the MIT license
870
919
  * Fixed a bug with saving files on windows
871
920
  * Fixed a bug with the filename being set in forms
872
921
 
873
- === 0.5.3
922
+ ## 0.5.3
874
923
 
875
924
  * Mechanize#click will now act on the first element of an array. So if an
876
925
  array of links is passed to WWW::Mechanize#click, the first link is clicked.
@@ -888,7 +937,7 @@ Mechanize is now under the MIT license
888
937
  * Updated log4r support for a speed increase. Thanks Yinon Bentor
889
938
  * Added inspect methods and pretty printing
890
939
 
891
- === 0.5.2
940
+ ## 0.5.2
892
941
 
893
942
  * Fixed a bug with input names that are nil
894
943
  * Added a warning when using attr_finder because attr_finder will be deprecated
@@ -905,12 +954,12 @@ Mechanize is now under the MIT license
905
954
  WWW::Mechanize::Form#set_fields. Which can be used like so:
906
955
  form.set_fields( :foo => 'bar', :name => 'Aaron' )
907
956
 
908
- === 0.5.1
957
+ ## 0.5.1
909
958
 
910
959
  * Fixed bug with file uploads
911
960
  * Added performance tweaks to the cookie class
912
961
 
913
- === 0.5.0
962
+ ## 0.5.0
914
963
 
915
964
  * Added pluggable parsers. (Thanks to Eric Kolve for the idea)
916
965
  * Changed namespace so all classes are under WWW::Mechanize.
@@ -925,7 +974,7 @@ Mechanize is now under the MIT license
925
974
  * Removed support for body filters in favor of pluggable parsers.
926
975
  * Fixed cookie bug adding a '/' when the url is missing one (Thanks Nick Dainty)
927
976
 
928
- === 0.4.7
977
+ ## 0.4.7
929
978
 
930
979
  * Fixed bug with no action in forms. Thanks to Adam Wiggins
931
980
  * Setting a default user-agent string
@@ -934,7 +983,7 @@ Mechanize is now under the MIT license
934
983
  (thanks to Gregory Brown)
935
984
  * Added WWW::Mechanize#get_file for fetching non text/html files
936
985
 
937
- === 0.4.6
986
+ ## 0.4.6
938
987
 
939
988
  * Added support for proxies
940
989
  * Added a uri field to WWW::Link
@@ -945,7 +994,7 @@ Mechanize is now under the MIT license
945
994
  allows syntax as such: form.fields.name('q').value = 'xyz'
946
995
  Before it was like this: form.fields.name('q').first.value = 'xyz'
947
996
 
948
- === 0.4.5
997
+ ## 0.4.5
949
998
 
950
999
  * Added support for multiple values of the same name
951
1000
  * Updated build_query_string to take an array of arrays (Thanks Michal Janeczek)
@@ -955,13 +1004,13 @@ Mechanize is now under the MIT license
955
1004
  * Fixed a bug with empty select lists
956
1005
  * Fixing a problem with cookies not handling no spaces after semicolons
957
1006
 
958
- === 0.4.4
1007
+ ## 0.4.4
959
1008
 
960
1009
  * Fixed error in method signature, basic_authetication is now basic_auth
961
1010
  * Fixed bug with encoding names in file uploads (Big thanks to Alex Young)
962
1011
  * Added options to the select list
963
1012
 
964
- === 0.4.3
1013
+ ## 0.4.3
965
1014
 
966
1015
  * Added syntactic sugar for finding things
967
1016
  * Fixed bug with HttpOnly option in cookies
@@ -969,21 +1018,21 @@ Mechanize is now under the MIT license
969
1018
  * Defaulted dropdown lists to the first element
970
1019
  * Added unit tests
971
1020
 
972
- === 0.4.2
1021
+ ## 0.4.2
973
1022
 
974
1023
  * Added support for iframes
975
1024
  * Made mechanize dependant on ruby-web rather than narf
976
1025
  * Added unit tests
977
1026
  * Fixed a bunch of warnings
978
1027
 
979
- === 0.4.1
1028
+ ## 0.4.1
980
1029
 
981
1030
  * Added support for file uploading
982
1031
  * Added support for frames (Thanks Gabriel[mailto:leerbag@googlemail.com])
983
1032
  * Added more unit tests
984
1033
  * Fixed some bugs
985
1034
 
986
- === 0.4.0
1035
+ ## 0.4.0
987
1036
 
988
1037
  * Added more unit tests
989
1038
  * Added a cookie jar with better cookie support, included expiration of cookies