mechanize 2.7.4 → 2.8.1
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.
- checksums.yaml +5 -5
- data/.github/workflows/ci-test.yml +45 -0
- data/.yardopts +8 -0
- data/{CHANGELOG.rdoc → CHANGELOG.md} +151 -86
- data/EXAMPLES.rdoc +1 -24
- data/Gemfile +1 -1
- data/{LICENSE.rdoc → LICENSE.txt} +4 -0
- data/README.md +77 -0
- data/Rakefile +18 -3
- data/examples/rubygems.rb +2 -2
- data/lib/mechanize.rb +3 -2
- data/lib/mechanize/chunked_termination_error.rb +1 -0
- data/lib/mechanize/content_type_error.rb +1 -0
- data/lib/mechanize/cookie.rb +1 -13
- data/lib/mechanize/cookie_jar.rb +4 -12
- data/lib/mechanize/directory_saver.rb +1 -0
- data/lib/mechanize/download.rb +2 -1
- data/lib/mechanize/element_matcher.rb +5 -1
- data/lib/mechanize/element_not_found_error.rb +1 -0
- data/lib/mechanize/file.rb +2 -1
- data/lib/mechanize/file_connection.rb +5 -3
- data/lib/mechanize/file_request.rb +1 -0
- data/lib/mechanize/file_response.rb +4 -1
- data/lib/mechanize/file_saver.rb +1 -0
- data/lib/mechanize/form.rb +112 -45
- data/lib/mechanize/form/button.rb +1 -0
- data/lib/mechanize/form/check_box.rb +1 -0
- data/lib/mechanize/form/field.rb +47 -0
- data/lib/mechanize/form/file_upload.rb +1 -0
- data/lib/mechanize/form/hidden.rb +1 -0
- data/lib/mechanize/form/image_button.rb +1 -0
- data/lib/mechanize/form/keygen.rb +1 -0
- data/lib/mechanize/form/multi_select_list.rb +8 -14
- data/lib/mechanize/form/option.rb +3 -1
- data/lib/mechanize/form/radio_button.rb +1 -0
- data/lib/mechanize/form/reset.rb +1 -0
- data/lib/mechanize/form/select_list.rb +1 -0
- data/lib/mechanize/form/submit.rb +1 -0
- data/lib/mechanize/form/text.rb +1 -0
- data/lib/mechanize/form/textarea.rb +1 -0
- data/lib/mechanize/headers.rb +1 -0
- data/lib/mechanize/history.rb +2 -1
- data/lib/mechanize/http.rb +1 -0
- data/lib/mechanize/http/agent.rb +81 -38
- data/lib/mechanize/http/auth_challenge.rb +1 -0
- data/lib/mechanize/http/auth_realm.rb +2 -1
- data/lib/mechanize/http/auth_store.rb +1 -0
- data/lib/mechanize/http/content_disposition_parser.rb +18 -3
- data/lib/mechanize/http/www_authenticate_parser.rb +4 -4
- data/lib/mechanize/image.rb +1 -0
- data/lib/mechanize/page.rb +8 -5
- data/lib/mechanize/page/base.rb +1 -0
- data/lib/mechanize/page/frame.rb +4 -1
- data/lib/mechanize/page/image.rb +1 -0
- data/lib/mechanize/page/label.rb +1 -0
- data/lib/mechanize/page/link.rb +8 -1
- data/lib/mechanize/page/meta_refresh.rb +1 -0
- data/lib/mechanize/parser.rb +4 -3
- data/lib/mechanize/pluggable_parsers.rb +1 -0
- data/lib/mechanize/prependable.rb +1 -0
- data/lib/mechanize/redirect_limit_reached_error.rb +1 -0
- data/lib/mechanize/redirect_not_get_or_head_error.rb +1 -0
- data/lib/mechanize/response_code_error.rb +2 -1
- data/lib/mechanize/response_read_error.rb +1 -0
- data/lib/mechanize/robots_disallowed_error.rb +1 -0
- data/lib/mechanize/test_case.rb +34 -29
- data/lib/mechanize/test_case/bad_chunking_servlet.rb +1 -0
- data/lib/mechanize/test_case/basic_auth_servlet.rb +1 -0
- data/lib/mechanize/test_case/content_type_servlet.rb +1 -0
- data/lib/mechanize/test_case/digest_auth_servlet.rb +1 -0
- data/lib/mechanize/test_case/file_upload_servlet.rb +1 -0
- data/lib/mechanize/test_case/form_servlet.rb +1 -0
- data/lib/mechanize/test_case/gzip_servlet.rb +4 -3
- data/lib/mechanize/test_case/header_servlet.rb +1 -0
- data/lib/mechanize/test_case/http_refresh_servlet.rb +2 -2
- data/lib/mechanize/test_case/infinite_redirect_servlet.rb +1 -0
- data/lib/mechanize/test_case/infinite_refresh_servlet.rb +2 -2
- data/lib/mechanize/test_case/many_cookies_as_string_servlet.rb +1 -0
- data/lib/mechanize/test_case/many_cookies_servlet.rb +1 -0
- data/lib/mechanize/test_case/modified_since_servlet.rb +1 -0
- data/lib/mechanize/test_case/ntlm_servlet.rb +1 -0
- data/lib/mechanize/test_case/one_cookie_no_spaces_servlet.rb +1 -0
- data/lib/mechanize/test_case/one_cookie_servlet.rb +1 -0
- data/lib/mechanize/test_case/quoted_value_cookie_servlet.rb +1 -0
- data/lib/mechanize/test_case/redirect_servlet.rb +1 -0
- data/lib/mechanize/test_case/referer_servlet.rb +1 -0
- data/lib/mechanize/test_case/refresh_with_empty_url.rb +1 -0
- data/lib/mechanize/test_case/refresh_without_url.rb +1 -0
- data/lib/mechanize/test_case/response_code_servlet.rb +1 -0
- data/lib/mechanize/test_case/robots_txt_servlet.rb +15 -0
- data/lib/mechanize/test_case/send_cookies_servlet.rb +1 -0
- data/lib/mechanize/test_case/server.rb +1 -0
- data/lib/mechanize/test_case/servlets.rb +4 -0
- data/lib/mechanize/test_case/verb_servlet.rb +5 -6
- data/lib/mechanize/unauthorized_error.rb +2 -1
- data/lib/mechanize/unsupported_scheme_error.rb +1 -0
- data/lib/mechanize/util.rb +5 -3
- data/lib/mechanize/version.rb +2 -1
- data/lib/mechanize/xml_file.rb +1 -0
- data/mechanize.gemspec +39 -31
- data/test/htdocs/dir with spaces/foo.html +1 -0
- data/test/htdocs/find_link.html +1 -4
- data/test/htdocs/tc_links.html +1 -1
- data/test/test_mechanize.rb +57 -15
- data/test/test_mechanize_cookie.rb +75 -60
- data/test/test_mechanize_cookie_jar.rb +112 -59
- data/test/test_mechanize_download.rb +13 -1
- data/test/test_mechanize_file.rb +10 -0
- data/test/test_mechanize_file_connection.rb +21 -3
- data/test/test_mechanize_file_response.rb +26 -2
- data/test/test_mechanize_form.rb +27 -11
- data/test/test_mechanize_form_check_box.rb +10 -0
- data/test/test_mechanize_form_encoding.rb +1 -1
- data/test/test_mechanize_form_keygen.rb +1 -0
- data/test/test_mechanize_form_multi_select_list.rb +5 -1
- data/test/test_mechanize_http_agent.rb +116 -8
- data/test/test_mechanize_http_auth_challenge.rb +14 -0
- data/test/test_mechanize_http_auth_realm.rb +7 -1
- data/test/test_mechanize_http_auth_store.rb +37 -0
- data/test/test_mechanize_http_content_disposition_parser.rb +35 -1
- data/test/test_mechanize_http_www_authenticate_parser.rb +16 -0
- data/test/test_mechanize_link.rb +47 -4
- data/test/test_mechanize_page.rb +29 -1
- data/test/test_mechanize_page_encoding.rb +23 -1
- data/test/test_mechanize_page_image.rb +1 -1
- data/test/test_mechanize_page_link.rb +3 -3
- data/test/test_mechanize_page_meta_refresh.rb +1 -1
- data/test/test_mechanize_parser.rb +12 -2
- data/test/test_mechanize_util.rb +1 -1
- metadata +105 -81
- data/.travis.yml +0 -25
- data/Manifest.txt +0 -204
- data/README.rdoc +0 -77
- data/test/htdocs/robots.txt +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 53105ca453eb763c9cb80bea61508bbc08e500f96aceae911191490e4bb03af5
|
4
|
+
data.tar.gz: f5e0f84257bc299060775ce26d52b80d89153db95d3bfa98d8bfbdc1c3cb5fce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a55d7aedbc2e81ed13d073c6ff63b60fb4ad060c771589c0024abb3b02c55ee5be54fa5c44b60c78dc3d201e31358c1f9a4922befff223c5f68befb462a4a6a
|
7
|
+
data.tar.gz: cf5967ce52c29e352dc820d5fd943434d37fe279a2ae957531f88f96a23ce7b7c206066c236e5308b912c6757ca8e130e354d26f7dd90ed529522aa7cc8be24a
|
@@ -0,0 +1,45 @@
|
|
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
|
+
test:
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
ruby-version: ["2.5", "2.6", "2.7", "3.0", "jruby", "truffleruby-head"]
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
steps:
|
21
|
+
- uses: actions/checkout@v2
|
22
|
+
- name: Set up Ruby
|
23
|
+
uses: ruby/setup-ruby@v1
|
24
|
+
with:
|
25
|
+
ruby-version: ${{ matrix.ruby-version }}
|
26
|
+
bundler-cache: true
|
27
|
+
- name: Run tests
|
28
|
+
run: bundle exec rake
|
29
|
+
|
30
|
+
test-platform:
|
31
|
+
strategy:
|
32
|
+
fail-fast: false
|
33
|
+
matrix:
|
34
|
+
platform: ["windows-latest", "macos-latest"]
|
35
|
+
|
36
|
+
runs-on: ${{ matrix.platform }}
|
37
|
+
steps:
|
38
|
+
- uses: actions/checkout@v2
|
39
|
+
- name: Set up Ruby
|
40
|
+
uses: ruby/setup-ruby@v1
|
41
|
+
with:
|
42
|
+
ruby-version: 3.0
|
43
|
+
bundler-cache: true
|
44
|
+
- name: Run tests
|
45
|
+
run: bundle exec rake
|
data/.yardopts
ADDED
@@ -1,6 +1,82 @@
|
|
1
|
-
|
1
|
+
# Mechanize CHANGELOG
|
2
2
|
|
3
|
-
|
3
|
+
## 2.8.1 / 2021-05-09
|
4
|
+
|
5
|
+
### Fix
|
6
|
+
|
7
|
+
* 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)
|
8
|
+
|
9
|
+
|
10
|
+
## 2.8.0 / 2021-04-01
|
11
|
+
|
12
|
+
### Requirements
|
13
|
+
|
14
|
+
* Mechanize now requires Ruby 2.5 or newer.
|
15
|
+
* Move from `ntlm-http` to `rubyntlm` gem. (#495, #574)
|
16
|
+
|
17
|
+
### New Features
|
18
|
+
|
19
|
+
* Page::Link#uri now handles non-ASCII `href`s. (#569) @terryyin
|
20
|
+
* FileConnection supports Windows drive letters (#483)
|
21
|
+
* Credential headers 'Authorization' and 'Cookie' are deleted on cross-origin redirects. (#538) @kyoshidajp
|
22
|
+
* ContentDispositionParser handles ISO8601 date headers, to be robust with websites that ignore RFC2183. (#554) @reitermarkus
|
23
|
+
|
24
|
+
### Bug fix
|
25
|
+
|
26
|
+
* 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.
|
27
|
+
|
28
|
+
|
29
|
+
## 2.7.7 / 2021-02-01
|
30
|
+
|
31
|
+
* Security fixes for CVE-2021-21289
|
32
|
+
|
33
|
+
Mechanize `>= v2.0`, `< v2.7.7` allows for OS commands to be injected into several classes'
|
34
|
+
methods via implicit use of Ruby's `Kernel.open` method. Exploitation is possible only if
|
35
|
+
untrusted input is used as a local filename and passed to any of these calls:
|
36
|
+
|
37
|
+
- `Mechanize::CookieJar#load`: since v2.0 (see 208e3ed)
|
38
|
+
- `Mechanize::CookieJar#save_as`: since v2.0 (see 5b776a4)
|
39
|
+
- `Mechanize#download`: since v2.2 (see dc91667)
|
40
|
+
- `Mechanize::Download#save` and `#save!` since v2.1 (see 98b2f51, bd62ff0)
|
41
|
+
- `Mechanize::File#save` and `#save_as`: since v2.1 (see 2bf7519)
|
42
|
+
- `Mechanize::FileResponse#read_body`: since v2.0 (see 01039f5)
|
43
|
+
|
44
|
+
See https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g for more
|
45
|
+
information.
|
46
|
+
|
47
|
+
Also see #547, #548. Thank you, @kyoshidajp!
|
48
|
+
|
49
|
+
* New Features
|
50
|
+
* Support for Ruby 3.0 by adding `webrick` as a runtime dependency. (#557) @pvalena
|
51
|
+
|
52
|
+
* Bug fix
|
53
|
+
* Ignore input fields with blank names (#542, #536)
|
54
|
+
|
55
|
+
|
56
|
+
## 2.7.6
|
57
|
+
|
58
|
+
* New Features
|
59
|
+
* Mechanize#set_proxy accepts an HTTP URL/URI. (#513)
|
60
|
+
|
61
|
+
* Bug fix
|
62
|
+
* Fix element(s)_with(search: selector) methods not working for forms, form fields and frames. (#444)
|
63
|
+
* Improve the filename parser for the `Content-Disposition` header. (#496, #517)
|
64
|
+
* Accept `Content-Encoding: identity`. (#515)
|
65
|
+
* Mechanize::Page#title no longer picks a title in an embeded SVG/RDF element. (#503)
|
66
|
+
* Make Mechanize::Form#has_field? boolean. (#501)
|
67
|
+
|
68
|
+
## 2.7.5
|
69
|
+
|
70
|
+
* New Features
|
71
|
+
* All 4xx responses and RedirectLimitReachedError when fetching robots.txt are treated as full allow just like Googlebot does.
|
72
|
+
* Enable support for mime-types > 3.
|
73
|
+
|
74
|
+
* Bug fix
|
75
|
+
* Don't cause infinite loop when `GET /robots.txt` redirects. (#457)
|
76
|
+
* Fix basic authentication for a realm that contains uppercase characters. (#458, #459)
|
77
|
+
* Fix encoding error when uploading a file which name is non-ASCII. (#333)
|
78
|
+
|
79
|
+
## 2.7.4
|
4
80
|
|
5
81
|
* New Features
|
6
82
|
* Accept array-like and hash-like values as query/parameter value.
|
@@ -10,7 +86,7 @@
|
|
10
86
|
Rawlins.
|
11
87
|
* Capture link when scheme is unsupported. #362 by Jon Rowe.
|
12
88
|
* Pre-defined User-Agent stings are updated to those of more recent versions, and new aliases for IE 10/11 and Edge are added.
|
13
|
-
* Support for mime-types 1.x is restored while keeping compatible with mime-types 2.x
|
89
|
+
* Support for mime-types 1.x is restored while keeping compatible with mime-types 2.x.
|
14
90
|
* Mechanize::Page now responds to #xpath, #css, #at_xpath, #at_css, and #%.
|
15
91
|
* element(s)_with methods now accept :xpath and :css options for doing xpath/css
|
16
92
|
selector searching.
|
@@ -22,7 +98,7 @@
|
|
22
98
|
* Fix whitespace bug in WWW-Authenticate. #451, #450, by Rasmus Bergholdt
|
23
99
|
* Don't allow redirect from a non-file URL to a file URL for security reasons. (#455)
|
24
100
|
|
25
|
-
|
101
|
+
## 2.7.3
|
26
102
|
|
27
103
|
* New Features
|
28
104
|
* Allow net-http-persistent instance to be named. #324, John Weir.
|
@@ -33,34 +109,33 @@
|
|
33
109
|
* Ensure Download#save! defaults back to original filename if
|
34
110
|
none is provided (#300)
|
35
111
|
|
36
|
-
|
112
|
+
## 2.7.2
|
37
113
|
|
38
114
|
* Bug fix
|
39
115
|
* API compatibility issues with Mechanize::CookieJar cookies has been
|
40
116
|
addressed. https://github.com/sparklemotion/http-cookie/issues/2 #326
|
41
117
|
|
42
|
-
|
118
|
+
## 2.7.1
|
43
119
|
|
44
120
|
* Bug fix
|
45
121
|
* Ensure images with no "src" attribute still return correct URLs. #317
|
46
122
|
* Fixes Mechanize::Parser#extract_filename where an empty string filename
|
47
123
|
in the response caused unhandled exception. #318
|
48
124
|
|
49
|
-
|
125
|
+
## 2.7.0
|
50
126
|
|
51
127
|
* New Features
|
52
128
|
* Mechanize::Agent#response_read will now raise a
|
53
129
|
Mechanize::ResponseReadError instead of an EOFError and avoid losing
|
54
130
|
requested content. #296.
|
55
|
-
* Depend on http-cookie, add backwards compatible deprecations.
|
56
|
-
#257 Akinori MUSHA.
|
131
|
+
* Depend on http-cookie, add backwards compatible deprecations. #257 Akinori MUSHA.
|
57
132
|
* Added `Download#save!` for overwriting existing files. #300 Sean Kim.
|
58
133
|
|
59
134
|
* Bug fix
|
60
135
|
* Ensure page URLs with whitespace in them are escaped #313 @pacop.
|
61
136
|
* Added a workaround for a bug of URI#+ that led to failure in resolving a relative path containing double slash like "/../http://.../". #304
|
62
137
|
|
63
|
-
|
138
|
+
## 2.6.0
|
64
139
|
|
65
140
|
* New Features
|
66
141
|
* Mechanize#start and Mechanize#shutdown (Thanks, Damian Janowski!)
|
@@ -82,19 +157,16 @@
|
|
82
157
|
* Added iPad and Android user agents. #277 by sambit, #278 by seansay.
|
83
158
|
|
84
159
|
* Bug fix
|
85
|
-
* Mechanize#cert and Mechanize#key now return the values set by
|
86
|
-
|
87
|
-
* Mechanize no longer submits disabled form fields. #276 by Bogdan Gusiev,
|
88
|
-
#279 by Ricardo Valeriano.
|
160
|
+
* Mechanize#cert and Mechanize#key now return the values set by #cert= and #key=. #244, #245 (Thanks, Robert Gogolok!)
|
161
|
+
* Mechanize no longer submits disabled form fields. #276 by Bogdan Gusiev, #279 by Ricardo Valeriano.
|
89
162
|
* Mechanize::File#save now behaves like Mechanize::Download#save in
|
90
|
-
that it will create the parent directory before saving.
|
91
|
-
#272, #280 by Ryan Kowalick
|
163
|
+
that it will create the parent directory before saving. #272, #280 by Ryan Kowalick
|
92
164
|
* Ensure `application/xml` is registered as an XML parser in
|
93
165
|
`PluggableParser`, not just `text/xml`. #266 James Gregory
|
94
166
|
* Mechanize now writes cookiestxt with a prefixed dot for wildcard domain
|
95
167
|
handling. #295 by Mike Morearty.
|
96
168
|
|
97
|
-
|
169
|
+
## 2.5.2
|
98
170
|
|
99
171
|
* New Features
|
100
172
|
* Mechanize::CookieJar#save_as takes a keyword option "session" to say
|
@@ -108,18 +180,17 @@
|
|
108
180
|
In mechanize 3 the old "Mac FireFox" user-agent alias will be removed.
|
109
181
|
Pull request #231 by Gavin Miller.
|
110
182
|
* Mechanize now authenticates using the raw challenge, not a reconstructed
|
111
|
-
one, to avoid dealing with quoting rules of RFC 2617. Fixes failures in
|
112
|
-
#231 due to net-http-digest_auth 1.2.1
|
183
|
+
one, to avoid dealing with quoting rules of RFC 2617. Fixes failures in #231 due to net-http-digest_auth 1.2.1
|
113
184
|
* Fixed Content-Disposition parameter parser to be case insensitive. #233
|
114
185
|
* Fixed redirection counting in following meta refresh. #240
|
115
186
|
|
116
|
-
|
187
|
+
## 2.5.1
|
117
188
|
|
118
189
|
* Bug fix
|
119
190
|
* Mechanize no longer copies POST requests during a redirect which was
|
120
191
|
introduced by #215. Pull request #229 by Godfrey Chan.
|
121
192
|
|
122
|
-
|
193
|
+
## 2.5
|
123
194
|
|
124
195
|
* Minor enhancements
|
125
196
|
* Added Mechanize#ignore_bad_chunking for working around servers that don't
|
@@ -140,12 +211,11 @@
|
|
140
211
|
terminate chunked transfer-encoding properly. Issue #116
|
141
212
|
* Mechanize no longer raises an exception when multiple identical
|
142
213
|
radiobuttons are checked. Issue #214 by Matthias Guenther
|
143
|
-
* Fixed documentation for pre_connect_hooks and post_connect_hooks. Issue
|
144
|
-
#226 by Robert Poor
|
214
|
+
* Fixed documentation for pre_connect_hooks and post_connect_hooks. Issue #226 by Robert Poor
|
145
215
|
* Worked around ruby 1.8 run with -Ku and ISO-8859-1 encoded characters in
|
146
216
|
URIs. Issue #228 by Stanislav O.Pogrebnyak
|
147
217
|
|
148
|
-
|
218
|
+
## 2.4
|
149
219
|
|
150
220
|
* Security fix:
|
151
221
|
|
@@ -168,7 +238,7 @@
|
|
168
238
|
* Improved exception messages for 401 Unauthorized responses. Mechanize now
|
169
239
|
tells you if you were missing credentials, had an incorrect password, etc.
|
170
240
|
|
171
|
-
|
241
|
+
## 2.3 / 2012-02-20
|
172
242
|
|
173
243
|
* Minor enhancements
|
174
244
|
* Add support for the Max-Age attribute in the Set-Cookie header.
|
@@ -188,14 +258,14 @@
|
|
188
258
|
* Cookies with an empty Expires attribute value were stored as session
|
189
259
|
cookies but cookies without the Expires attribute were not. Issue #78
|
190
260
|
|
191
|
-
|
261
|
+
## 2.2.1 / 2012-02-13
|
192
262
|
|
193
263
|
* Bug fixes
|
194
264
|
* Add missing file to the gem, ensure that missing files won't cause
|
195
265
|
failures again. Issue #201 by Alex
|
196
266
|
* Fix minor grammar issue in README. Issue #200 by Shane Becker.
|
197
267
|
|
198
|
-
|
268
|
+
## 2.2 / 2012-02-12
|
199
269
|
|
200
270
|
* API changes
|
201
271
|
* MetaRefresh#href is not normalized to an absolute URL, but set to the
|
@@ -207,8 +277,7 @@
|
|
207
277
|
* SSL parameters and proxy may now be set at any time. Issue #194 by
|
208
278
|
dsisnero.
|
209
279
|
* Improved Mechanize::Page with #image_with and #images_with and
|
210
|
-
Mechanize::Page::Image various img element attribute accessors, #caption,
|
211
|
-
#extname, #mime_type and #fetch. Pull request #173 by kitamomonga
|
280
|
+
Mechanize::Page::Image various img element attribute accessors, #caption, #extname, #mime_type and #fetch. Pull request #173 by kitamomonga
|
212
281
|
* Added MIME type parsing for content-types in Mechanize::PluggableParser
|
213
282
|
for fine-grained parser choices. Parsers will be chosen based on exact
|
214
283
|
match, simplified type or media type in that order. See
|
@@ -230,7 +299,7 @@
|
|
230
299
|
* A link with an empty href is now resolved correctly where previously the
|
231
300
|
query part was dropped.
|
232
301
|
|
233
|
-
|
302
|
+
## 2.1.1 / 2012-02-03
|
234
303
|
|
235
304
|
* Bug fixes
|
236
305
|
* Set missing idle_timeout default. Issue #196
|
@@ -258,7 +327,7 @@
|
|
258
327
|
* Documented how to convert a Mechanize::ResponseReadError into a File or
|
259
328
|
Page, along with a new method #force_parse. Issue #176
|
260
329
|
|
261
|
-
|
330
|
+
## 2.1 / 2011-12-20
|
262
331
|
|
263
332
|
* Deprecations
|
264
333
|
* Mechanize#get no longer accepts an options hash.
|
@@ -271,8 +340,7 @@
|
|
271
340
|
* SSL connections will be verified against the system certificate store by
|
272
341
|
default.
|
273
342
|
* Added Mechanize#retry_change_requests to allow mechanize to retry POST and
|
274
|
-
other non-idempotent requests when you know it is safe to do so. Issue
|
275
|
-
#123
|
343
|
+
other non-idempotent requests when you know it is safe to do so. Issue #123
|
276
344
|
* Mechanize can now stream files directly to disk without loading them into
|
277
345
|
memory first through Mechanize::Download, a pluggable parser for
|
278
346
|
downloading files.
|
@@ -287,8 +355,7 @@
|
|
287
355
|
agent.pluggable_parser.default = Mechanize::Download
|
288
356
|
* Added Mechanize#content_encoding_hooks which allow handling of
|
289
357
|
non-standard content encodings like "agzip". Patch #125 by kitamomonga
|
290
|
-
* Added dom_class to elements and the element matcher like dom_id. Patch
|
291
|
-
#156 by Dan Hansen.
|
358
|
+
* Added dom_class to elements and the element matcher like dom_id. Patch #156 by Dan Hansen.
|
292
359
|
* Added support for the HTML5 keygen form element. See
|
293
360
|
http://dev.w3.org/html5/spec/Overview.html#the-keygen-element Patch #157
|
294
361
|
by Victor Costan.
|
@@ -337,11 +404,10 @@
|
|
337
404
|
* The original Referer value persists on redirection. Issue #150
|
338
405
|
* Do not send a referer on a Refresh header based redirection.
|
339
406
|
* Fixed encoding error in tests when LANG=C. Patch #142 by jinschoi.
|
340
|
-
* The order of items in a form submission now match the DOM order. Patch
|
341
|
-
#129 by kitamomonga
|
407
|
+
* The order of items in a form submission now match the DOM order. Patch #129 by kitamomonga
|
342
408
|
* Fixed proxy example in EXAMPLE. Issue #146 by NielsKSchjoedt
|
343
409
|
|
344
|
-
|
410
|
+
## 2.0.1 / 2011-06-28
|
345
411
|
|
346
412
|
Mechanize now uses minitest to avoid 1.9 vs 1.8 assertion availability in
|
347
413
|
test/unit
|
@@ -352,7 +418,7 @@ test/unit
|
|
352
418
|
* Mechanize#keep_alive_time no longer crashes but does nothing as
|
353
419
|
net-http-persistent does not support HTTP/1.0 keep-alive extensions.
|
354
420
|
|
355
|
-
|
421
|
+
## 2.0 / 2011-06-27
|
356
422
|
|
357
423
|
Mechanize is now under the MIT license
|
358
424
|
|
@@ -406,8 +472,7 @@ Mechanize is now under the MIT license
|
|
406
472
|
* Mechanize now implements session cookies. GH #78
|
407
473
|
* Mechanize now implements deflate decoding. GH #40
|
408
474
|
* Mechanize now allows a certificate and key to be passed directly. GH #71
|
409
|
-
* Mechanize::Form::MultiSelectList now implements #option_with and
|
410
|
-
#options_with. GH #42
|
475
|
+
* Mechanize::Form::MultiSelectList now implements #option_with and #options_with. GH #42
|
411
476
|
* Add Mechanize::Page::Link#rel and #rel?(kind) to read and test the rel
|
412
477
|
attribute.
|
413
478
|
* Add Mechanize::Page#canonical_uri to read a </tt><link
|
@@ -460,7 +525,7 @@ Mechanize is now under the MIT license
|
|
460
525
|
* Mechanize::Page::Link#uri now handles both escaped and unescaped hrefs.
|
461
526
|
GH #107
|
462
527
|
|
463
|
-
|
528
|
+
## 1.0.0
|
464
529
|
|
465
530
|
* New Features:
|
466
531
|
|
@@ -478,7 +543,7 @@ Mechanize is now under the MIT license
|
|
478
543
|
* Fixing default values with serialized cookies. GH #3
|
479
544
|
* Checkboxes and fields are sorted by page appearance before submitting. #11
|
480
545
|
|
481
|
-
|
546
|
+
## 0.9.3
|
482
547
|
|
483
548
|
* Bug Fixes:
|
484
549
|
|
@@ -496,7 +561,7 @@ Mechanize is now under the MIT license
|
|
496
561
|
* Fixed a bug with double semi-colons in Content-Disposition headers
|
497
562
|
* Properly handling cookies that specify a path. RF #25259
|
498
563
|
|
499
|
-
|
564
|
+
## 0.9.2 / 2009/03/05
|
500
565
|
|
501
566
|
* New Features:
|
502
567
|
* Mechanize#submit and Form#submit take arbitrary headers(thanks penguincoder)
|
@@ -509,7 +574,7 @@ Mechanize is now under the MIT license
|
|
509
574
|
* Made Content-Type match case insensitive (Thanks Kelly Reynolds)
|
510
575
|
* Non-string form parameters work
|
511
576
|
|
512
|
-
|
577
|
+
## 0.9.1 2009/02/23
|
513
578
|
|
514
579
|
* New Features:
|
515
580
|
* Encoding may be specified for a page: Page#encoding=
|
@@ -525,7 +590,7 @@ Mechanize is now under the MIT license
|
|
525
590
|
* WAP content types will now be parsed
|
526
591
|
* Rescued poorly formatted cookies. Thanks Kelley Reynolds!
|
527
592
|
|
528
|
-
|
593
|
+
## 0.9.0
|
529
594
|
|
530
595
|
* Deprecations
|
531
596
|
* WWW::Mechanize::List is gone!
|
@@ -535,7 +600,7 @@ Mechanize is now under the MIT license
|
|
535
600
|
* Bug Fixes:
|
536
601
|
* Nil check on page when base tag is used #23021
|
537
602
|
|
538
|
-
|
603
|
+
## 0.8.5
|
539
604
|
|
540
605
|
* Deprecations
|
541
606
|
* WWW::Mechanize::List will be deprecated in 0.9.0, and warnings have
|
@@ -559,28 +624,28 @@ Mechanize is now under the MIT license
|
|
559
624
|
* Mechanize#get requests no longer send a referer unless they are relative
|
560
625
|
requests.
|
561
626
|
|
562
|
-
|
627
|
+
## 0.8.4
|
563
628
|
|
564
629
|
* Bug Fixes:
|
565
630
|
* Setting the port number on the host header.
|
566
631
|
* Fixing Authorization headers for picky servers
|
567
632
|
|
568
|
-
|
633
|
+
## 0.8.3
|
569
634
|
|
570
635
|
* Bug Fixes:
|
571
636
|
* Making sure logger is set during SSL connections.
|
572
637
|
|
573
|
-
|
638
|
+
## 0.8.2
|
574
639
|
|
575
640
|
* Bug Fixes:
|
576
641
|
* Doh! I was accidentally setting headers twice.
|
577
642
|
|
578
|
-
|
643
|
+
## 0.8.1
|
579
644
|
|
580
645
|
* Bug Fixes:
|
581
646
|
* Fixed problem with nil pointer when logger is set
|
582
647
|
|
583
|
-
|
648
|
+
## 0.8.0
|
584
649
|
|
585
650
|
* New Features:
|
586
651
|
* Lifecycle hooks. Mechanize#pre_connect_hooks, Mechanize#post_connect_hooks
|
@@ -594,7 +659,7 @@ Mechanize is now under the MIT license
|
|
594
659
|
* Only setting headers once
|
595
660
|
* Adding IIS authentication support
|
596
661
|
|
597
|
-
|
662
|
+
## 0.7.8
|
598
663
|
|
599
664
|
* Bug Fixes:
|
600
665
|
* Fixed bug when receiving a 304 response (HTTPNotModified) on a page not
|
@@ -602,7 +667,7 @@ Mechanize is now under the MIT license
|
|
602
667
|
* #21428 Default to HTML parser for 'application/xhtml+xml' content-type.
|
603
668
|
* Fixed an issue where redirects were resending posted data
|
604
669
|
|
605
|
-
|
670
|
+
## 0.7.7
|
606
671
|
|
607
672
|
* New Features:
|
608
673
|
* Page#form_with takes a +criteria+ hash.
|
@@ -623,7 +688,7 @@ Mechanize is now under the MIT license
|
|
623
688
|
* #21233 Smarter multipart boundry. Thanks Todd Willey!
|
624
689
|
* #20097 Supporting meta tag cookies.
|
625
690
|
|
626
|
-
|
691
|
+
## 0.7.6
|
627
692
|
|
628
693
|
* New Features:
|
629
694
|
* Added support for reading Mozilla cookie jars. Thanks Chris Riddoch!
|
@@ -646,32 +711,32 @@ Mechanize is now under the MIT license
|
|
646
711
|
* Supporting blank strings for option values.
|
647
712
|
http://rubyforge.org/tracker/index.php?func=detail&aid=19975&group_id=1453&atid=5709
|
648
713
|
|
649
|
-
|
714
|
+
## 0.7.5
|
650
715
|
|
651
716
|
* Fixed a bug when fetching files and not pages. Thanks Mat Schaffer!
|
652
717
|
|
653
|
-
|
718
|
+
## 0.7.4
|
654
719
|
|
655
720
|
* doh!
|
656
721
|
|
657
|
-
|
722
|
+
## 0.7.3
|
658
723
|
|
659
724
|
* Pages are now yielded to a blocks given to WWW::Mechanize#get
|
660
725
|
* WWW::Mechanize#get now takes hash arguments for uri parameters.
|
661
726
|
* WWW::Mechanize#post takes an IO object as a parameter and posts correctly.
|
662
727
|
* Fixing a strange zlib inflate problem on windows
|
663
728
|
|
664
|
-
|
729
|
+
## 0.7.2
|
665
730
|
|
666
731
|
* Handling gzipped responses with no Content-Length header
|
667
732
|
|
668
|
-
|
733
|
+
## 0.7.1
|
669
734
|
|
670
735
|
* Added iPhone to the user agent aliases. [#17572]
|
671
736
|
* Fixed a bug with EOF errors in net/http. [#17570]
|
672
737
|
* Handling 0 length gzipped responses. [#17471]
|
673
738
|
|
674
|
-
|
739
|
+
## 0.7.0
|
675
740
|
|
676
741
|
* Removed Ruby 1.8.2 support
|
677
742
|
* Changed parser to lazily parse links
|
@@ -679,7 +744,7 @@ Mechanize is now under the MIT license
|
|
679
744
|
* Adding verify_callback for SSL requests. Thanks Mike Dalessio!
|
680
745
|
* Fixed a bug with Accept-Language header. Thanks Bill Siggelkow.
|
681
746
|
|
682
|
-
|
747
|
+
## 0.6.11
|
683
748
|
|
684
749
|
* Detecting single quotes in meta redirects.
|
685
750
|
* Adding pretty inspect for ruby versions > 1.8.4 (Thanks Joel Kociolek)
|
@@ -690,7 +755,7 @@ Mechanize is now under the MIT license
|
|
690
755
|
* Added a FAQ
|
691
756
|
http://rubyforge.org/tracker/?func=detail&aid=15772&group_id=1453&atid=5709
|
692
757
|
|
693
|
-
|
758
|
+
## 0.6.10
|
694
759
|
|
695
760
|
* Made digest authentication work with POSTs.
|
696
761
|
* Made sure page was HTML before following meta refreshes.
|
@@ -709,7 +774,7 @@ Mechanize is now under the MIT license
|
|
709
774
|
* Aliasing inspect to pretty_inspect. Thanks Eric Promislow.
|
710
775
|
http://rubyforge.org/pipermail/mechanize-users/2007-July/000157.html
|
711
776
|
|
712
|
-
|
777
|
+
## 0.6.9
|
713
778
|
|
714
779
|
* Updating UTF-8 support for urls
|
715
780
|
* Adding AREA tags to the links list.
|
@@ -721,7 +786,7 @@ Mechanize is now under the MIT license
|
|
721
786
|
* Added Digest Authentication support. Thanks to Ryan Davis and Eric Hodel,
|
722
787
|
you get a gold star!
|
723
788
|
|
724
|
-
|
789
|
+
## 0.6.8
|
725
790
|
|
726
791
|
* Keep alive can be shut off now with WWW::Mechanize#keep_alive
|
727
792
|
* Conditional requests can be shut off with WWW::Mechanize#conditional_requests
|
@@ -732,12 +797,12 @@ Mechanize is now under the MIT license
|
|
732
797
|
* Updating compatability with hpricot
|
733
798
|
* Added more unit tests
|
734
799
|
|
735
|
-
|
800
|
+
## 0.6.7
|
736
801
|
|
737
802
|
* Fixed a bug with keep-alive requests
|
738
803
|
* [#9549] fixed problem with cookie paths
|
739
804
|
|
740
|
-
|
805
|
+
## 0.6.6
|
741
806
|
|
742
807
|
* Removing hpricot overrides
|
743
808
|
* Fixed a bug where alt text can be nil. Thanks Yannick!
|
@@ -747,7 +812,7 @@ Mechanize is now under the MIT license
|
|
747
812
|
* [#9434] Fixed bug where html entities weren't decoded
|
748
813
|
* [#9150] Updated mechanize history to deal with redirects
|
749
814
|
|
750
|
-
|
815
|
+
## 0.6.5
|
751
816
|
|
752
817
|
* Copying headers to a hash to prevent memory leaks
|
753
818
|
* Speeding up page parsing
|
@@ -762,7 +827,7 @@ Mechanize is now under the MIT license
|
|
762
827
|
http://rubyforge.org/tracker/?func=detail&aid=7563&group_id=1453&atid=5709
|
763
828
|
* Added MSIE 7.0 user agent string
|
764
829
|
|
765
|
-
|
830
|
+
## 0.6.4
|
766
831
|
|
767
832
|
* Adding the "redirect_ok" method to Mechanize to stop mechanize from
|
768
833
|
following redirects.
|
@@ -779,7 +844,7 @@ Mechanize is now under the MIT license
|
|
779
844
|
* Fixed bug [#6548]. Input type of 'button' was not being added as a button.
|
780
845
|
* Fixed bug [#7139]. REXML parser calls hpricot parser by accident
|
781
846
|
|
782
|
-
|
847
|
+
## 0.6.3
|
783
848
|
|
784
849
|
* Added keys and values methods to Form
|
785
850
|
* Added has_value? to Form
|
@@ -794,7 +859,7 @@ Mechanize is now under the MIT license
|
|
794
859
|
* Fixed a bug where '#' symbols are encoded
|
795
860
|
http://rubyforge.org/forum/message.php?msg_id=14747
|
796
861
|
|
797
|
-
|
862
|
+
## 0.6.2
|
798
863
|
|
799
864
|
* Added a yield to Page#form so that dealing with forms can be more DSL like.
|
800
865
|
* Added the parsed page to the ResponseCodeError so that the parsed results
|
@@ -802,7 +867,7 @@ Mechanize is now under the MIT license
|
|
802
867
|
http://rubyforge.org/pipermail/mechanize-users/2006-September/000007.html
|
803
868
|
* Updated documentation (Thanks to Paul Smith)
|
804
869
|
|
805
|
-
|
870
|
+
## 0.6.1
|
806
871
|
|
807
872
|
* Added a method to Form called "submit". Now forms can be submitted by
|
808
873
|
calling a method on the form.
|
@@ -820,7 +885,7 @@ Mechanize is now under the MIT license
|
|
820
885
|
* Fixed a bug with loading text in to links.
|
821
886
|
http://rubyforge.org/pipermail/mechanize-users/2006-September/000000.html
|
822
887
|
|
823
|
-
|
888
|
+
## 0.6.0
|
824
889
|
|
825
890
|
* Changed main parser to use hpricot
|
826
891
|
* Made WWW::Mechanize::Page class searchable like hpricot
|
@@ -832,7 +897,7 @@ Mechanize is now under the MIT license
|
|
832
897
|
* Removed REXML helper methods since the main parser is now hpricot
|
833
898
|
* Overhauled cookie parser to use WEBrick::Cookie
|
834
899
|
|
835
|
-
|
900
|
+
## 0.5.4
|
836
901
|
|
837
902
|
* Added WWW::Mechanize#trasact for saving history state between in a
|
838
903
|
transaction. See the EXAMPLES file. Thanks Johan Kiviniemi.
|
@@ -847,7 +912,7 @@ Mechanize is now under the MIT license
|
|
847
912
|
* Fixed a bug with saving files on windows
|
848
913
|
* Fixed a bug with the filename being set in forms
|
849
914
|
|
850
|
-
|
915
|
+
## 0.5.3
|
851
916
|
|
852
917
|
* Mechanize#click will now act on the first element of an array. So if an
|
853
918
|
array of links is passed to WWW::Mechanize#click, the first link is clicked.
|
@@ -865,7 +930,7 @@ Mechanize is now under the MIT license
|
|
865
930
|
* Updated log4r support for a speed increase. Thanks Yinon Bentor
|
866
931
|
* Added inspect methods and pretty printing
|
867
932
|
|
868
|
-
|
933
|
+
## 0.5.2
|
869
934
|
|
870
935
|
* Fixed a bug with input names that are nil
|
871
936
|
* Added a warning when using attr_finder because attr_finder will be deprecated
|
@@ -882,12 +947,12 @@ Mechanize is now under the MIT license
|
|
882
947
|
WWW::Mechanize::Form#set_fields. Which can be used like so:
|
883
948
|
form.set_fields( :foo => 'bar', :name => 'Aaron' )
|
884
949
|
|
885
|
-
|
950
|
+
## 0.5.1
|
886
951
|
|
887
952
|
* Fixed bug with file uploads
|
888
953
|
* Added performance tweaks to the cookie class
|
889
954
|
|
890
|
-
|
955
|
+
## 0.5.0
|
891
956
|
|
892
957
|
* Added pluggable parsers. (Thanks to Eric Kolve for the idea)
|
893
958
|
* Changed namespace so all classes are under WWW::Mechanize.
|
@@ -902,7 +967,7 @@ Mechanize is now under the MIT license
|
|
902
967
|
* Removed support for body filters in favor of pluggable parsers.
|
903
968
|
* Fixed cookie bug adding a '/' when the url is missing one (Thanks Nick Dainty)
|
904
969
|
|
905
|
-
|
970
|
+
## 0.4.7
|
906
971
|
|
907
972
|
* Fixed bug with no action in forms. Thanks to Adam Wiggins
|
908
973
|
* Setting a default user-agent string
|
@@ -911,7 +976,7 @@ Mechanize is now under the MIT license
|
|
911
976
|
(thanks to Gregory Brown)
|
912
977
|
* Added WWW::Mechanize#get_file for fetching non text/html files
|
913
978
|
|
914
|
-
|
979
|
+
## 0.4.6
|
915
980
|
|
916
981
|
* Added support for proxies
|
917
982
|
* Added a uri field to WWW::Link
|
@@ -922,7 +987,7 @@ Mechanize is now under the MIT license
|
|
922
987
|
allows syntax as such: form.fields.name('q').value = 'xyz'
|
923
988
|
Before it was like this: form.fields.name('q').first.value = 'xyz'
|
924
989
|
|
925
|
-
|
990
|
+
## 0.4.5
|
926
991
|
|
927
992
|
* Added support for multiple values of the same name
|
928
993
|
* Updated build_query_string to take an array of arrays (Thanks Michal Janeczek)
|
@@ -932,13 +997,13 @@ Mechanize is now under the MIT license
|
|
932
997
|
* Fixed a bug with empty select lists
|
933
998
|
* Fixing a problem with cookies not handling no spaces after semicolons
|
934
999
|
|
935
|
-
|
1000
|
+
## 0.4.4
|
936
1001
|
|
937
1002
|
* Fixed error in method signature, basic_authetication is now basic_auth
|
938
1003
|
* Fixed bug with encoding names in file uploads (Big thanks to Alex Young)
|
939
1004
|
* Added options to the select list
|
940
1005
|
|
941
|
-
|
1006
|
+
## 0.4.3
|
942
1007
|
|
943
1008
|
* Added syntactic sugar for finding things
|
944
1009
|
* Fixed bug with HttpOnly option in cookies
|
@@ -946,21 +1011,21 @@ Mechanize is now under the MIT license
|
|
946
1011
|
* Defaulted dropdown lists to the first element
|
947
1012
|
* Added unit tests
|
948
1013
|
|
949
|
-
|
1014
|
+
## 0.4.2
|
950
1015
|
|
951
1016
|
* Added support for iframes
|
952
1017
|
* Made mechanize dependant on ruby-web rather than narf
|
953
1018
|
* Added unit tests
|
954
1019
|
* Fixed a bunch of warnings
|
955
1020
|
|
956
|
-
|
1021
|
+
## 0.4.1
|
957
1022
|
|
958
1023
|
* Added support for file uploading
|
959
1024
|
* Added support for frames (Thanks Gabriel[mailto:leerbag@googlemail.com])
|
960
1025
|
* Added more unit tests
|
961
1026
|
* Fixed some bugs
|
962
1027
|
|
963
|
-
|
1028
|
+
## 0.4.0
|
964
1029
|
|
965
1030
|
* Added more unit tests
|
966
1031
|
* Added a cookie jar with better cookie support, included expiration of cookies
|