mechanize 2.7.3 → 2.8.0
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/.gitignore +15 -0
- data/.yardopts +8 -0
- data/{CHANGELOG.rdoc → CHANGELOG.md} +149 -62
- data/EXAMPLES.rdoc +2 -25
- data/Gemfile +3 -0
- data/{LICENSE.rdoc → LICENSE.txt} +4 -0
- data/README.md +79 -0
- data/Rakefile +36 -37
- data/examples/{rubyforge.rb → rubygems.rb} +7 -6
- data/lib/mechanize.rb +75 -33
- 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 +15 -2
- data/lib/mechanize/download.rb +2 -1
- data/lib/mechanize/element_matcher.rb +29 -14
- 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 +5 -4
- data/lib/mechanize/file_saver.rb +1 -0
- data/lib/mechanize/form.rb +119 -46
- 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 +115 -64
- 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 +3 -0
- data/lib/mechanize/http/content_disposition_parser.rb +18 -3
- data/lib/mechanize/http/www_authenticate_parser.rb +5 -5
- data/lib/mechanize/image.rb +1 -0
- data/lib/mechanize/page.rb +166 -55
- data/lib/mechanize/page/base.rb +1 -0
- data/lib/mechanize/page/frame.rb +4 -1
- data/lib/mechanize/page/image.rb +3 -0
- data/lib/mechanize/page/label.rb +1 -0
- data/lib/mechanize/page/link.rb +13 -1
- data/lib/mechanize/page/meta_refresh.rb +1 -0
- data/lib/mechanize/parser.rb +4 -3
- data/lib/mechanize/pluggable_parsers.rb +14 -1
- 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 +39 -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 +5 -2
- data/lib/mechanize/util.rb +90 -43
- data/lib/mechanize/version.rb +4 -0
- data/lib/mechanize/xml_file.rb +1 -0
- data/mechanize.gemspec +69 -0
- 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 +111 -55
- 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 +46 -11
- data/test/test_mechanize_form_check_box.rb +10 -0
- data/test/test_mechanize_form_encoding.rb +3 -8
- 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 +175 -18
- 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 +24 -0
- data/test/test_mechanize_link.rb +60 -4
- data/test/test_mechanize_page.rb +82 -7
- data/test/test_mechanize_page_encoding.rb +2 -3
- data/test/test_mechanize_page_image.rb +1 -1
- data/test/test_mechanize_page_link.rb +20 -5
- data/test/test_mechanize_page_meta_refresh.rb +1 -1
- data/test/test_mechanize_parser.rb +12 -2
- data/test/test_mechanize_util.rb +46 -11
- metadata +198 -99
- data/.gemtest +0 -0
- data/.travis.yml +0 -26
- data/Manifest.txt +0 -205
- data/README.rdoc +0 -83
- data/lib/mechanize/monkey_patch.rb +0 -17
- 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: d7df2fdd2030e028d6107b3b54f94f788deba04b9615cb719ef2113291270d1c
|
4
|
+
data.tar.gz: ab12e971c446e5977662076f39711298b5311ef12fe54612855433e5e926fa46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f065469eb756a860e5c02b6e2d31cd5f25e0da2db9c4e9dddd018a96fb8fe4bb209ffd70c0e51c777ede12245faff86568a9e9044dd006d61d3514cd35660c
|
7
|
+
data.tar.gz: 6db1eaffd62dc89449721ad9d06dbc5d0f8d15f24b49cf9be84a3f88dc1bd91a41e1774aef12bdc9933e3b8e0d5b0050cf4dbaa675db6131f7723b3713921630
|
@@ -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"]
|
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/.gitignore
ADDED
data/.yardopts
ADDED
@@ -1,6 +1,93 @@
|
|
1
|
-
|
1
|
+
# Mechanize CHANGELOG
|
2
2
|
|
3
|
-
|
3
|
+
## 2.8.0 / 2021-04-01
|
4
|
+
|
5
|
+
* Requirements
|
6
|
+
* Mechanize now requires Ruby 2.5 or newer.
|
7
|
+
* Move from `ntlm-http` to `rubyntlm` gem. (#495, #574)
|
8
|
+
|
9
|
+
* New Features
|
10
|
+
* Page::Link#uri now handles non-ASCII `href`s. (#569) @terryyin
|
11
|
+
* FileConnection supports Windows drive letters (#483)
|
12
|
+
* Credential headers 'Authorization' and 'Cookie' are deleted on cross-origin redirects. (#538) @kyoshidajp
|
13
|
+
* ContentDispositionParser handles ISO8601 date headers, to be robust with websites that ignore RFC2183. (#554) @reitermarkus
|
14
|
+
|
15
|
+
* Bug fix
|
16
|
+
* 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.
|
17
|
+
|
18
|
+
## 2.7.7 / 2021-02-01
|
19
|
+
|
20
|
+
* Security fixes for CVE-2021-21289
|
21
|
+
|
22
|
+
Mechanize `>= v2.0`, `< v2.7.7` allows for OS commands to be injected into several classes'
|
23
|
+
methods via implicit use of Ruby's `Kernel.open` method. Exploitation is possible only if
|
24
|
+
untrusted input is used as a local filename and passed to any of these calls:
|
25
|
+
|
26
|
+
- `Mechanize::CookieJar#load`: since v2.0 (see 208e3ed)
|
27
|
+
- `Mechanize::CookieJar#save_as`: since v2.0 (see 5b776a4)
|
28
|
+
- `Mechanize#download`: since v2.2 (see dc91667)
|
29
|
+
- `Mechanize::Download#save` and `#save!` since v2.1 (see 98b2f51, bd62ff0)
|
30
|
+
- `Mechanize::File#save` and `#save_as`: since v2.1 (see 2bf7519)
|
31
|
+
- `Mechanize::FileResponse#read_body`: since v2.0 (see 01039f5)
|
32
|
+
|
33
|
+
See https://github.com/sparklemotion/mechanize/security/advisories/GHSA-qrqm-fpv6-6r8g for more
|
34
|
+
information.
|
35
|
+
|
36
|
+
Also see #547, #548. Thank you, @kyoshidajp!
|
37
|
+
|
38
|
+
* New Features
|
39
|
+
* Support for Ruby 3.0 by adding `webrick` as a runtime dependency. (#557) @pvalena
|
40
|
+
|
41
|
+
* Bug fix
|
42
|
+
* Ignore input fields with blank names (#542, #536)
|
43
|
+
|
44
|
+
|
45
|
+
## 2.7.6
|
46
|
+
|
47
|
+
* New Features
|
48
|
+
* Mechanize#set_proxy accepts an HTTP URL/URI. (#513)
|
49
|
+
|
50
|
+
* Bug fix
|
51
|
+
* Fix element(s)_with(search: selector) methods not working for forms, form fields and frames. (#444)
|
52
|
+
* Improve the filename parser for the `Content-Disposition` header. (#496, #517)
|
53
|
+
* Accept `Content-Encoding: identity`. (#515)
|
54
|
+
* Mechanize::Page#title no longer picks a title in an embeded SVG/RDF element. (#503)
|
55
|
+
* Make Mechanize::Form#has_field? boolean. (#501)
|
56
|
+
|
57
|
+
## 2.7.5
|
58
|
+
|
59
|
+
* New Features
|
60
|
+
* All 4xx responses and RedirectLimitReachedError when fetching robots.txt are treated as full allow just like Googlebot does.
|
61
|
+
* Enable support for mime-types > 3.
|
62
|
+
|
63
|
+
* Bug fix
|
64
|
+
* Don't cause infinite loop when `GET /robots.txt` redirects. (#457)
|
65
|
+
* Fix basic authentication for a realm that contains uppercase characters. (#458, #459)
|
66
|
+
* Fix encoding error when uploading a file which name is non-ASCII. (#333)
|
67
|
+
|
68
|
+
## 2.7.4
|
69
|
+
|
70
|
+
* New Features
|
71
|
+
* Accept array-like and hash-like values as query/parameter value.
|
72
|
+
A new utility method Mechanize::Util.each_parameter is added, and Mechanize::Util.build_query_string is enhanced
|
73
|
+
for this feature.
|
74
|
+
* Allow passing a `Form::FileUpload` instance to `#post`. #350 by Sam
|
75
|
+
Rawlins.
|
76
|
+
* Capture link when scheme is unsupported. #362 by Jon Rowe.
|
77
|
+
* Pre-defined User-Agent stings are updated to those of more recent versions, and new aliases for IE 10/11 and Edge are added.
|
78
|
+
* Support for mime-types 1.x is restored while keeping compatible with mime-types 2.x.
|
79
|
+
* Mechanize::Page now responds to #xpath, #css, #at_xpath, #at_css, and #%.
|
80
|
+
* element(s)_with methods now accept :xpath and :css options for doing xpath/css
|
81
|
+
selector searching.
|
82
|
+
* Pass URI information to Nokogiri where applicable. #405 @lulalala
|
83
|
+
|
84
|
+
* Bug fix
|
85
|
+
* Don't raise an exception if a connection has set a {read,open}_timeout and
|
86
|
+
a `file://` request is made. (#397)
|
87
|
+
* Fix whitespace bug in WWW-Authenticate. #451, #450, by Rasmus Bergholdt
|
88
|
+
* Don't allow redirect from a non-file URL to a file URL for security reasons. (#455)
|
89
|
+
|
90
|
+
## 2.7.3
|
4
91
|
|
5
92
|
* New Features
|
6
93
|
* Allow net-http-persistent instance to be named. #324, John Weir.
|
@@ -11,20 +98,20 @@
|
|
11
98
|
* Ensure Download#save! defaults back to original filename if
|
12
99
|
none is provided (#300)
|
13
100
|
|
14
|
-
|
101
|
+
## 2.7.2
|
15
102
|
|
16
103
|
* Bug fix
|
17
104
|
* API compatibility issues with Mechanize::CookieJar cookies has been
|
18
105
|
addressed. https://github.com/sparklemotion/http-cookie/issues/2 #326
|
19
106
|
|
20
|
-
|
107
|
+
## 2.7.1
|
21
108
|
|
22
109
|
* Bug fix
|
23
110
|
* Ensure images with no "src" attribute still return correct URLs. #317
|
24
111
|
* Fixes Mechanize::Parser#extract_filename where an empty string filename
|
25
112
|
in the response caused unhandled exception. #318
|
26
113
|
|
27
|
-
|
114
|
+
## 2.7.0
|
28
115
|
|
29
116
|
* New Features
|
30
117
|
* Mechanize::Agent#response_read will now raise a
|
@@ -38,7 +125,7 @@
|
|
38
125
|
* Ensure page URLs with whitespace in them are escaped #313 @pacop.
|
39
126
|
* Added a workaround for a bug of URI#+ that led to failure in resolving a relative path containing double slash like "/../http://.../". #304
|
40
127
|
|
41
|
-
|
128
|
+
## 2.6.0
|
42
129
|
|
43
130
|
* New Features
|
44
131
|
* Mechanize#start and Mechanize#shutdown (Thanks, Damian Janowski!)
|
@@ -72,7 +159,7 @@
|
|
72
159
|
* Mechanize now writes cookiestxt with a prefixed dot for wildcard domain
|
73
160
|
handling. #295 by Mike Morearty.
|
74
161
|
|
75
|
-
|
162
|
+
## 2.5.2
|
76
163
|
|
77
164
|
* New Features
|
78
165
|
* Mechanize::CookieJar#save_as takes a keyword option "session" to say
|
@@ -91,13 +178,13 @@
|
|
91
178
|
* Fixed Content-Disposition parameter parser to be case insensitive. #233
|
92
179
|
* Fixed redirection counting in following meta refresh. #240
|
93
180
|
|
94
|
-
|
181
|
+
## 2.5.1
|
95
182
|
|
96
183
|
* Bug fix
|
97
184
|
* Mechanize no longer copies POST requests during a redirect which was
|
98
185
|
introduced by #215. Pull request #229 by Godfrey Chan.
|
99
186
|
|
100
|
-
|
187
|
+
## 2.5
|
101
188
|
|
102
189
|
* Minor enhancements
|
103
190
|
* Added Mechanize#ignore_bad_chunking for working around servers that don't
|
@@ -123,7 +210,7 @@
|
|
123
210
|
* Worked around ruby 1.8 run with -Ku and ISO-8859-1 encoded characters in
|
124
211
|
URIs. Issue #228 by Stanislav O.Pogrebnyak
|
125
212
|
|
126
|
-
|
213
|
+
## 2.4
|
127
214
|
|
128
215
|
* Security fix:
|
129
216
|
|
@@ -146,7 +233,7 @@
|
|
146
233
|
* Improved exception messages for 401 Unauthorized responses. Mechanize now
|
147
234
|
tells you if you were missing credentials, had an incorrect password, etc.
|
148
235
|
|
149
|
-
|
236
|
+
## 2.3 / 2012-02-20
|
150
237
|
|
151
238
|
* Minor enhancements
|
152
239
|
* Add support for the Max-Age attribute in the Set-Cookie header.
|
@@ -166,14 +253,14 @@
|
|
166
253
|
* Cookies with an empty Expires attribute value were stored as session
|
167
254
|
cookies but cookies without the Expires attribute were not. Issue #78
|
168
255
|
|
169
|
-
|
256
|
+
## 2.2.1 / 2012-02-13
|
170
257
|
|
171
258
|
* Bug fixes
|
172
259
|
* Add missing file to the gem, ensure that missing files won't cause
|
173
260
|
failures again. Issue #201 by Alex
|
174
261
|
* Fix minor grammar issue in README. Issue #200 by Shane Becker.
|
175
262
|
|
176
|
-
|
263
|
+
## 2.2 / 2012-02-12
|
177
264
|
|
178
265
|
* API changes
|
179
266
|
* MetaRefresh#href is not normalized to an absolute URL, but set to the
|
@@ -208,7 +295,7 @@
|
|
208
295
|
* A link with an empty href is now resolved correctly where previously the
|
209
296
|
query part was dropped.
|
210
297
|
|
211
|
-
|
298
|
+
## 2.1.1 / 2012-02-03
|
212
299
|
|
213
300
|
* Bug fixes
|
214
301
|
* Set missing idle_timeout default. Issue #196
|
@@ -236,7 +323,7 @@
|
|
236
323
|
* Documented how to convert a Mechanize::ResponseReadError into a File or
|
237
324
|
Page, along with a new method #force_parse. Issue #176
|
238
325
|
|
239
|
-
|
326
|
+
## 2.1 / 2011-12-20
|
240
327
|
|
241
328
|
* Deprecations
|
242
329
|
* Mechanize#get no longer accepts an options hash.
|
@@ -319,7 +406,7 @@
|
|
319
406
|
#129 by kitamomonga
|
320
407
|
* Fixed proxy example in EXAMPLE. Issue #146 by NielsKSchjoedt
|
321
408
|
|
322
|
-
|
409
|
+
## 2.0.1 / 2011-06-28
|
323
410
|
|
324
411
|
Mechanize now uses minitest to avoid 1.9 vs 1.8 assertion availability in
|
325
412
|
test/unit
|
@@ -330,7 +417,7 @@ test/unit
|
|
330
417
|
* Mechanize#keep_alive_time no longer crashes but does nothing as
|
331
418
|
net-http-persistent does not support HTTP/1.0 keep-alive extensions.
|
332
419
|
|
333
|
-
|
420
|
+
## 2.0 / 2011-06-27
|
334
421
|
|
335
422
|
Mechanize is now under the MIT license
|
336
423
|
|
@@ -438,7 +525,7 @@ Mechanize is now under the MIT license
|
|
438
525
|
* Mechanize::Page::Link#uri now handles both escaped and unescaped hrefs.
|
439
526
|
GH #107
|
440
527
|
|
441
|
-
|
528
|
+
## 1.0.0
|
442
529
|
|
443
530
|
* New Features:
|
444
531
|
|
@@ -456,7 +543,7 @@ Mechanize is now under the MIT license
|
|
456
543
|
* Fixing default values with serialized cookies. GH #3
|
457
544
|
* Checkboxes and fields are sorted by page appearance before submitting. #11
|
458
545
|
|
459
|
-
|
546
|
+
## 0.9.3
|
460
547
|
|
461
548
|
* Bug Fixes:
|
462
549
|
|
@@ -474,7 +561,7 @@ Mechanize is now under the MIT license
|
|
474
561
|
* Fixed a bug with double semi-colons in Content-Disposition headers
|
475
562
|
* Properly handling cookies that specify a path. RF #25259
|
476
563
|
|
477
|
-
|
564
|
+
## 0.9.2 / 2009/03/05
|
478
565
|
|
479
566
|
* New Features:
|
480
567
|
* Mechanize#submit and Form#submit take arbitrary headers(thanks penguincoder)
|
@@ -487,7 +574,7 @@ Mechanize is now under the MIT license
|
|
487
574
|
* Made Content-Type match case insensitive (Thanks Kelly Reynolds)
|
488
575
|
* Non-string form parameters work
|
489
576
|
|
490
|
-
|
577
|
+
## 0.9.1 2009/02/23
|
491
578
|
|
492
579
|
* New Features:
|
493
580
|
* Encoding may be specified for a page: Page#encoding=
|
@@ -503,7 +590,7 @@ Mechanize is now under the MIT license
|
|
503
590
|
* WAP content types will now be parsed
|
504
591
|
* Rescued poorly formatted cookies. Thanks Kelley Reynolds!
|
505
592
|
|
506
|
-
|
593
|
+
## 0.9.0
|
507
594
|
|
508
595
|
* Deprecations
|
509
596
|
* WWW::Mechanize::List is gone!
|
@@ -513,7 +600,7 @@ Mechanize is now under the MIT license
|
|
513
600
|
* Bug Fixes:
|
514
601
|
* Nil check on page when base tag is used #23021
|
515
602
|
|
516
|
-
|
603
|
+
## 0.8.5
|
517
604
|
|
518
605
|
* Deprecations
|
519
606
|
* WWW::Mechanize::List will be deprecated in 0.9.0, and warnings have
|
@@ -537,28 +624,28 @@ Mechanize is now under the MIT license
|
|
537
624
|
* Mechanize#get requests no longer send a referer unless they are relative
|
538
625
|
requests.
|
539
626
|
|
540
|
-
|
627
|
+
## 0.8.4
|
541
628
|
|
542
629
|
* Bug Fixes:
|
543
630
|
* Setting the port number on the host header.
|
544
631
|
* Fixing Authorization headers for picky servers
|
545
632
|
|
546
|
-
|
633
|
+
## 0.8.3
|
547
634
|
|
548
635
|
* Bug Fixes:
|
549
636
|
* Making sure logger is set during SSL connections.
|
550
637
|
|
551
|
-
|
638
|
+
## 0.8.2
|
552
639
|
|
553
640
|
* Bug Fixes:
|
554
641
|
* Doh! I was accidentally setting headers twice.
|
555
642
|
|
556
|
-
|
643
|
+
## 0.8.1
|
557
644
|
|
558
645
|
* Bug Fixes:
|
559
646
|
* Fixed problem with nil pointer when logger is set
|
560
647
|
|
561
|
-
|
648
|
+
## 0.8.0
|
562
649
|
|
563
650
|
* New Features:
|
564
651
|
* Lifecycle hooks. Mechanize#pre_connect_hooks, Mechanize#post_connect_hooks
|
@@ -572,7 +659,7 @@ Mechanize is now under the MIT license
|
|
572
659
|
* Only setting headers once
|
573
660
|
* Adding IIS authentication support
|
574
661
|
|
575
|
-
|
662
|
+
## 0.7.8
|
576
663
|
|
577
664
|
* Bug Fixes:
|
578
665
|
* Fixed bug when receiving a 304 response (HTTPNotModified) on a page not
|
@@ -580,7 +667,7 @@ Mechanize is now under the MIT license
|
|
580
667
|
* #21428 Default to HTML parser for 'application/xhtml+xml' content-type.
|
581
668
|
* Fixed an issue where redirects were resending posted data
|
582
669
|
|
583
|
-
|
670
|
+
## 0.7.7
|
584
671
|
|
585
672
|
* New Features:
|
586
673
|
* Page#form_with takes a +criteria+ hash.
|
@@ -601,7 +688,7 @@ Mechanize is now under the MIT license
|
|
601
688
|
* #21233 Smarter multipart boundry. Thanks Todd Willey!
|
602
689
|
* #20097 Supporting meta tag cookies.
|
603
690
|
|
604
|
-
|
691
|
+
## 0.7.6
|
605
692
|
|
606
693
|
* New Features:
|
607
694
|
* Added support for reading Mozilla cookie jars. Thanks Chris Riddoch!
|
@@ -624,32 +711,32 @@ Mechanize is now under the MIT license
|
|
624
711
|
* Supporting blank strings for option values.
|
625
712
|
http://rubyforge.org/tracker/index.php?func=detail&aid=19975&group_id=1453&atid=5709
|
626
713
|
|
627
|
-
|
714
|
+
## 0.7.5
|
628
715
|
|
629
716
|
* Fixed a bug when fetching files and not pages. Thanks Mat Schaffer!
|
630
717
|
|
631
|
-
|
718
|
+
## 0.7.4
|
632
719
|
|
633
720
|
* doh!
|
634
721
|
|
635
|
-
|
722
|
+
## 0.7.3
|
636
723
|
|
637
724
|
* Pages are now yielded to a blocks given to WWW::Mechanize#get
|
638
725
|
* WWW::Mechanize#get now takes hash arguments for uri parameters.
|
639
726
|
* WWW::Mechanize#post takes an IO object as a parameter and posts correctly.
|
640
727
|
* Fixing a strange zlib inflate problem on windows
|
641
728
|
|
642
|
-
|
729
|
+
## 0.7.2
|
643
730
|
|
644
731
|
* Handling gzipped responses with no Content-Length header
|
645
732
|
|
646
|
-
|
733
|
+
## 0.7.1
|
647
734
|
|
648
735
|
* Added iPhone to the user agent aliases. [#17572]
|
649
736
|
* Fixed a bug with EOF errors in net/http. [#17570]
|
650
737
|
* Handling 0 length gzipped responses. [#17471]
|
651
738
|
|
652
|
-
|
739
|
+
## 0.7.0
|
653
740
|
|
654
741
|
* Removed Ruby 1.8.2 support
|
655
742
|
* Changed parser to lazily parse links
|
@@ -657,7 +744,7 @@ Mechanize is now under the MIT license
|
|
657
744
|
* Adding verify_callback for SSL requests. Thanks Mike Dalessio!
|
658
745
|
* Fixed a bug with Accept-Language header. Thanks Bill Siggelkow.
|
659
746
|
|
660
|
-
|
747
|
+
## 0.6.11
|
661
748
|
|
662
749
|
* Detecting single quotes in meta redirects.
|
663
750
|
* Adding pretty inspect for ruby versions > 1.8.4 (Thanks Joel Kociolek)
|
@@ -668,7 +755,7 @@ Mechanize is now under the MIT license
|
|
668
755
|
* Added a FAQ
|
669
756
|
http://rubyforge.org/tracker/?func=detail&aid=15772&group_id=1453&atid=5709
|
670
757
|
|
671
|
-
|
758
|
+
## 0.6.10
|
672
759
|
|
673
760
|
* Made digest authentication work with POSTs.
|
674
761
|
* Made sure page was HTML before following meta refreshes.
|
@@ -687,7 +774,7 @@ Mechanize is now under the MIT license
|
|
687
774
|
* Aliasing inspect to pretty_inspect. Thanks Eric Promislow.
|
688
775
|
http://rubyforge.org/pipermail/mechanize-users/2007-July/000157.html
|
689
776
|
|
690
|
-
|
777
|
+
## 0.6.9
|
691
778
|
|
692
779
|
* Updating UTF-8 support for urls
|
693
780
|
* Adding AREA tags to the links list.
|
@@ -699,7 +786,7 @@ Mechanize is now under the MIT license
|
|
699
786
|
* Added Digest Authentication support. Thanks to Ryan Davis and Eric Hodel,
|
700
787
|
you get a gold star!
|
701
788
|
|
702
|
-
|
789
|
+
## 0.6.8
|
703
790
|
|
704
791
|
* Keep alive can be shut off now with WWW::Mechanize#keep_alive
|
705
792
|
* Conditional requests can be shut off with WWW::Mechanize#conditional_requests
|
@@ -710,12 +797,12 @@ Mechanize is now under the MIT license
|
|
710
797
|
* Updating compatability with hpricot
|
711
798
|
* Added more unit tests
|
712
799
|
|
713
|
-
|
800
|
+
## 0.6.7
|
714
801
|
|
715
802
|
* Fixed a bug with keep-alive requests
|
716
803
|
* [#9549] fixed problem with cookie paths
|
717
804
|
|
718
|
-
|
805
|
+
## 0.6.6
|
719
806
|
|
720
807
|
* Removing hpricot overrides
|
721
808
|
* Fixed a bug where alt text can be nil. Thanks Yannick!
|
@@ -725,7 +812,7 @@ Mechanize is now under the MIT license
|
|
725
812
|
* [#9434] Fixed bug where html entities weren't decoded
|
726
813
|
* [#9150] Updated mechanize history to deal with redirects
|
727
814
|
|
728
|
-
|
815
|
+
## 0.6.5
|
729
816
|
|
730
817
|
* Copying headers to a hash to prevent memory leaks
|
731
818
|
* Speeding up page parsing
|
@@ -740,7 +827,7 @@ Mechanize is now under the MIT license
|
|
740
827
|
http://rubyforge.org/tracker/?func=detail&aid=7563&group_id=1453&atid=5709
|
741
828
|
* Added MSIE 7.0 user agent string
|
742
829
|
|
743
|
-
|
830
|
+
## 0.6.4
|
744
831
|
|
745
832
|
* Adding the "redirect_ok" method to Mechanize to stop mechanize from
|
746
833
|
following redirects.
|
@@ -757,7 +844,7 @@ Mechanize is now under the MIT license
|
|
757
844
|
* Fixed bug [#6548]. Input type of 'button' was not being added as a button.
|
758
845
|
* Fixed bug [#7139]. REXML parser calls hpricot parser by accident
|
759
846
|
|
760
|
-
|
847
|
+
## 0.6.3
|
761
848
|
|
762
849
|
* Added keys and values methods to Form
|
763
850
|
* Added has_value? to Form
|
@@ -772,7 +859,7 @@ Mechanize is now under the MIT license
|
|
772
859
|
* Fixed a bug where '#' symbols are encoded
|
773
860
|
http://rubyforge.org/forum/message.php?msg_id=14747
|
774
861
|
|
775
|
-
|
862
|
+
## 0.6.2
|
776
863
|
|
777
864
|
* Added a yield to Page#form so that dealing with forms can be more DSL like.
|
778
865
|
* Added the parsed page to the ResponseCodeError so that the parsed results
|
@@ -780,7 +867,7 @@ Mechanize is now under the MIT license
|
|
780
867
|
http://rubyforge.org/pipermail/mechanize-users/2006-September/000007.html
|
781
868
|
* Updated documentation (Thanks to Paul Smith)
|
782
869
|
|
783
|
-
|
870
|
+
## 0.6.1
|
784
871
|
|
785
872
|
* Added a method to Form called "submit". Now forms can be submitted by
|
786
873
|
calling a method on the form.
|
@@ -798,7 +885,7 @@ Mechanize is now under the MIT license
|
|
798
885
|
* Fixed a bug with loading text in to links.
|
799
886
|
http://rubyforge.org/pipermail/mechanize-users/2006-September/000000.html
|
800
887
|
|
801
|
-
|
888
|
+
## 0.6.0
|
802
889
|
|
803
890
|
* Changed main parser to use hpricot
|
804
891
|
* Made WWW::Mechanize::Page class searchable like hpricot
|
@@ -810,7 +897,7 @@ Mechanize is now under the MIT license
|
|
810
897
|
* Removed REXML helper methods since the main parser is now hpricot
|
811
898
|
* Overhauled cookie parser to use WEBrick::Cookie
|
812
899
|
|
813
|
-
|
900
|
+
## 0.5.4
|
814
901
|
|
815
902
|
* Added WWW::Mechanize#trasact for saving history state between in a
|
816
903
|
transaction. See the EXAMPLES file. Thanks Johan Kiviniemi.
|
@@ -825,7 +912,7 @@ Mechanize is now under the MIT license
|
|
825
912
|
* Fixed a bug with saving files on windows
|
826
913
|
* Fixed a bug with the filename being set in forms
|
827
914
|
|
828
|
-
|
915
|
+
## 0.5.3
|
829
916
|
|
830
917
|
* Mechanize#click will now act on the first element of an array. So if an
|
831
918
|
array of links is passed to WWW::Mechanize#click, the first link is clicked.
|
@@ -843,7 +930,7 @@ Mechanize is now under the MIT license
|
|
843
930
|
* Updated log4r support for a speed increase. Thanks Yinon Bentor
|
844
931
|
* Added inspect methods and pretty printing
|
845
932
|
|
846
|
-
|
933
|
+
## 0.5.2
|
847
934
|
|
848
935
|
* Fixed a bug with input names that are nil
|
849
936
|
* Added a warning when using attr_finder because attr_finder will be deprecated
|
@@ -860,12 +947,12 @@ Mechanize is now under the MIT license
|
|
860
947
|
WWW::Mechanize::Form#set_fields. Which can be used like so:
|
861
948
|
form.set_fields( :foo => 'bar', :name => 'Aaron' )
|
862
949
|
|
863
|
-
|
950
|
+
## 0.5.1
|
864
951
|
|
865
952
|
* Fixed bug with file uploads
|
866
953
|
* Added performance tweaks to the cookie class
|
867
954
|
|
868
|
-
|
955
|
+
## 0.5.0
|
869
956
|
|
870
957
|
* Added pluggable parsers. (Thanks to Eric Kolve for the idea)
|
871
958
|
* Changed namespace so all classes are under WWW::Mechanize.
|
@@ -880,7 +967,7 @@ Mechanize is now under the MIT license
|
|
880
967
|
* Removed support for body filters in favor of pluggable parsers.
|
881
968
|
* Fixed cookie bug adding a '/' when the url is missing one (Thanks Nick Dainty)
|
882
969
|
|
883
|
-
|
970
|
+
## 0.4.7
|
884
971
|
|
885
972
|
* Fixed bug with no action in forms. Thanks to Adam Wiggins
|
886
973
|
* Setting a default user-agent string
|
@@ -889,7 +976,7 @@ Mechanize is now under the MIT license
|
|
889
976
|
(thanks to Gregory Brown)
|
890
977
|
* Added WWW::Mechanize#get_file for fetching non text/html files
|
891
978
|
|
892
|
-
|
979
|
+
## 0.4.6
|
893
980
|
|
894
981
|
* Added support for proxies
|
895
982
|
* Added a uri field to WWW::Link
|
@@ -900,7 +987,7 @@ Mechanize is now under the MIT license
|
|
900
987
|
allows syntax as such: form.fields.name('q').value = 'xyz'
|
901
988
|
Before it was like this: form.fields.name('q').first.value = 'xyz'
|
902
989
|
|
903
|
-
|
990
|
+
## 0.4.5
|
904
991
|
|
905
992
|
* Added support for multiple values of the same name
|
906
993
|
* Updated build_query_string to take an array of arrays (Thanks Michal Janeczek)
|
@@ -910,13 +997,13 @@ Mechanize is now under the MIT license
|
|
910
997
|
* Fixed a bug with empty select lists
|
911
998
|
* Fixing a problem with cookies not handling no spaces after semicolons
|
912
999
|
|
913
|
-
|
1000
|
+
## 0.4.4
|
914
1001
|
|
915
1002
|
* Fixed error in method signature, basic_authetication is now basic_auth
|
916
1003
|
* Fixed bug with encoding names in file uploads (Big thanks to Alex Young)
|
917
1004
|
* Added options to the select list
|
918
1005
|
|
919
|
-
|
1006
|
+
## 0.4.3
|
920
1007
|
|
921
1008
|
* Added syntactic sugar for finding things
|
922
1009
|
* Fixed bug with HttpOnly option in cookies
|
@@ -924,21 +1011,21 @@ Mechanize is now under the MIT license
|
|
924
1011
|
* Defaulted dropdown lists to the first element
|
925
1012
|
* Added unit tests
|
926
1013
|
|
927
|
-
|
1014
|
+
## 0.4.2
|
928
1015
|
|
929
1016
|
* Added support for iframes
|
930
1017
|
* Made mechanize dependant on ruby-web rather than narf
|
931
1018
|
* Added unit tests
|
932
1019
|
* Fixed a bunch of warnings
|
933
1020
|
|
934
|
-
|
1021
|
+
## 0.4.1
|
935
1022
|
|
936
1023
|
* Added support for file uploading
|
937
1024
|
* Added support for frames (Thanks Gabriel[mailto:leerbag@googlemail.com])
|
938
1025
|
* Added more unit tests
|
939
1026
|
* Fixed some bugs
|
940
1027
|
|
941
|
-
|
1028
|
+
## 0.4.0
|
942
1029
|
|
943
1030
|
* Added more unit tests
|
944
1031
|
* Added a cookie jar with better cookie support, included expiration of cookies
|