diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f9c22a7..f754178f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -109,7 +109,7 @@ Fixes low-severity CVE-2022-31033, "Authorization header leak on port redirect." * Fix element(s)_with(search: selector) methods not working for forms, form fields and frames. (#444) * Improve the filename parser for the `Content-Disposition` header. (#496, #517) * Accept `Content-Encoding: identity`. (#515) - * Mechanize::Page#title no longer picks a title in an embeded SVG/RDF element. (#503) + * Mechanize::Page#title no longer picks a title in an embedded SVG/RDF element. (#503) * Make Mechanize::Form#has_field? boolean. (#501) ## 2.7.5 @@ -415,8 +415,8 @@ Fixes low-severity CVE-2022-31033, "Authorization header leak on port redirect." * When given multiple HTTP authentication options mechanize now picks the strongest method. * Improvements to HTTP authorization: - * mechanize raises Mechanize::UnathorizedError for 401 responses which is - a sublcass of Mechanize::ResponseCodeError. + * mechanize raises Mechanize::UnauthorizedError for 401 responses which is + a subclass of Mechanize::ResponseCodeError. * Added support for NTLM authentication, but this has not been tested. * Mechanize::Cookie.new accepts attributes in a hash. * Mechanize::CookieJar#<<(cookie) (alias: add!) is added. Issue #139 @@ -507,7 +507,7 @@ Mechanize is now under the MIT license * New Features - * Add header reference methods to Mechanize::File so that a reponse + * Add header reference methods to Mechanize::File so that a response object gets compatible with Net::HTTPResponse. * Mechanize#click accepts a regexp or string to click a button/link in the current page. It works as expected when not passed a string or regexp. @@ -732,7 +732,7 @@ Mechanize is now under the MIT license http://d.hatena.ne.jp/kitamomonga/20080410/ruby_mechanize_percent_url_bug * #21132 Not checking for EOF errors on redirect * Fixed a weird gzipping error. - * #21233 Smarter multipart boundry. Thanks Todd Willey! + * #21233 Smarter multipart boundary. Thanks Todd Willey! * #20097 Supporting meta tag cookies. ## 0.7.6 @@ -841,7 +841,7 @@ Mechanize is now under the MIT license * [#9877] Moved last request time. Thanks Max Stepanov * Added WWW::Mechanize::File#save * Defaulting file name to URI or Content-Disposition -* Updating compatability with hpricot +* Updating compatibility with hpricot * Added more unit tests ## 0.6.7 @@ -853,7 +853,7 @@ Mechanize is now under the MIT license * Removing hpricot overrides * Fixed a bug where alt text can be nil. Thanks Yannick! -* Unparseable expiration dates in cookies are now treated as session cookies +* Unparsable expiration dates in cookies are now treated as session cookies * Caching connections * Requests now default to keep alive * [#9434] Fixed bug where html entities weren't decoded @@ -919,7 +919,7 @@ Mechanize is now under the MIT license * Added a method to Form called "submit". Now forms can be submitted by calling a method on the form. * Added a click method to links -* Added an REXML pluggable parser for backwards compatability. To use it, +* Added an REXML pluggable parser for backwards compatibility. To use it, just do this: agent.pluggable_parser.html = WWW::Mechanize::REXMLPage * Fixed a bug with referrers by adding a page attribute to forms and links. @@ -1046,7 +1046,7 @@ Mechanize is now under the MIT license ## 0.4.4 -* Fixed error in method signature, basic_authetication is now basic_auth +* Fixed error in method signature, basic_authentication is now basic_auth * Fixed bug with encoding names in file uploads (Big thanks to Alex Young) * Added options to the select list diff --git a/lib/mechanize.rb b/lib/mechanize.rb index 60e52860..08511d02 100644 --- a/lib/mechanize.rb +++ b/lib/mechanize.rb @@ -200,7 +200,7 @@ def self.start # # If you need segregated SSL connections give each agent a unique # name. Otherwise the connections will be shared. This is - # particularly important if you are using certifcates. + # particularly important if you are using certificates. # # agent_1 = Mechanize.new 'conn1' # agent_2 = Mechanize.new 'conn2' @@ -956,7 +956,7 @@ def read_timeout= read_timeout # allowed: # # :all, true:: All 3xx redirects are followed (default) - # :permanent:: Only 301 Moved Permanantly redirects are followed + # :permanent:: Only 301 Moved Permanently redirects are followed # false:: No redirects are followed def redirect_ok diff --git a/lib/mechanize/form.rb b/lib/mechanize/form.rb index 8ecd0e0f..eb87cc5d 100644 --- a/lib/mechanize/form.rb +++ b/lib/mechanize/form.rb @@ -482,7 +482,7 @@ def delete_field!(field_name) # form.file_upload_with(:file_name => /picture/).value = 'foo' ## - # :mehtod: file_upload_with!(criteria) + # :method: file_upload_with!(criteria) # # Same as +file_upload_with+ but raises an ElementNotFoundError if no button # matches +criteria+ @@ -506,7 +506,7 @@ def delete_field!(field_name) # form.radiobutton_with(:name => /woo/).check ## - # :mehtod: radiobutton_with!(criteria) + # :method: radiobutton_with!(criteria) # # Same as +radiobutton_with+ but raises an ElementNotFoundError if no button # matches +criteria+ @@ -530,7 +530,7 @@ def delete_field!(field_name) # form.checkbox_with(:name => /woo/).check ## - # :mehtod: checkbox_with!(criteria) + # :method: checkbox_with!(criteria) # # Same as +checkbox_with+ but raises an ElementNotFoundError if no button # matches +criteria+ diff --git a/lib/mechanize/form/multi_select_list.rb b/lib/mechanize/form/multi_select_list.rb index d7e718b4..62e789c8 100644 --- a/lib/mechanize/form/multi_select_list.rb +++ b/lib/mechanize/form/multi_select_list.rb @@ -36,7 +36,7 @@ def initialize node # select_list.option_with(:value => '1').value = 'foo' ## - # :mehtod: option_with!(criteria) + # :method: option_with!(criteria) # # Same as +option_with+ but raises an ElementNotFoundError if no button # matches +criteria+ diff --git a/lib/mechanize/http/agent.rb b/lib/mechanize/http/agent.rb index 9e433a3f..4740d460 100644 --- a/lib/mechanize/http/agent.rb +++ b/lib/mechanize/http/agent.rb @@ -66,7 +66,7 @@ class Mechanize::HTTP::Agent # allowed: # # :all, true:: All 3xx redirects are followed (default) - # :permanent:: Only 301 Moved Permanantly redirects are followed + # :permanent:: Only 301 Moved Permanently redirects are followed # false:: No redirects are followed attr_accessor :redirect_ok diff --git a/lib/mechanize/http/content_disposition_parser.rb b/lib/mechanize/http/content_disposition_parser.rb index 3ea90971..f8b8f9a9 100644 --- a/lib/mechanize/http/content_disposition_parser.rb +++ b/lib/mechanize/http/content_disposition_parser.rb @@ -81,7 +81,7 @@ def parse content_disposition, header = false end ## - # Extracts disposition-parm and returns a Hash. + # Extracts disposition-param and returns a Hash. def parse_parameters parameters = {} @@ -200,4 +200,3 @@ def spaces end end - diff --git a/lib/mechanize/page.rb b/lib/mechanize/page.rb index c50d62eb..96ffac06 100644 --- a/lib/mechanize/page.rb +++ b/lib/mechanize/page.rb @@ -95,7 +95,7 @@ def encoding end # Return whether parser result has errors related to encoding or not. - # false indicates just parser has no encoding errors, not encoding is vaild. + # false indicates just parser has no encoding errors, not encoding is valid. def encoding_error?(parser=nil) parser = self.parser unless parser return false if parser.errors.empty? diff --git a/test/test_mechanize_cookie_jar.rb b/test/test_mechanize_cookie_jar.rb index 56259702..2af06dfe 100644 --- a/test/test_mechanize_cookie_jar.rb +++ b/test/test_mechanize_cookie_jar.rb @@ -540,7 +540,7 @@ def test_save_and_read_expired_cookies @jar.add url, Mechanize::Cookie.new(cookie_values) - # HACK no asertion + # HACK no assertion end def test_ssl_cookies diff --git a/test/test_mechanize_form.rb b/test/test_mechanize_form.rb index 610a4bdd..b6247ddc 100644 --- a/test/test_mechanize_form.rb +++ b/test/test_mechanize_form.rb @@ -357,7 +357,7 @@ def test_submit_first_field_wins assert_equal 'ticky=1&ticky=0', submitted.parser.at('#query').text end - def test_submit_takes_arbirary_headers + def test_submit_takes_arbitrary_headers page = @mech.get('http://localhost:2000/form_no_action.html') assert form = page.forms.first form.action = '/http_headers'