Skip to content

Commit

Permalink
Merge pull request #631 from p-linnane/fix-various-typos
Browse files Browse the repository at this point in the history
various: fix miscellaneous typos
  • Loading branch information
flavorjones committed Jan 13, 2024
2 parents d52c39a + b3e9a0d commit 03540ab
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 21 deletions.
18 changes: 9 additions & 9 deletions CHANGELOG.md
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions lib/mechanize.rb
Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/mechanize/form.rb
Expand Up @@ -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+
Expand All @@ -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+
Expand All @@ -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+
Expand Down
2 changes: 1 addition & 1 deletion lib/mechanize/form/multi_select_list.rb
Expand Up @@ -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+
Expand Down
2 changes: 1 addition & 1 deletion lib/mechanize/http/agent.rb
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions lib/mechanize/http/content_disposition_parser.rb
Expand Up @@ -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 = {}
Expand Down Expand Up @@ -200,4 +200,3 @@ def spaces
end

end

2 changes: 1 addition & 1 deletion lib/mechanize/page.rb
Expand Up @@ -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?
Expand Down
2 changes: 1 addition & 1 deletion test/test_mechanize_cookie_jar.rb
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/test_mechanize_form.rb
Expand Up @@ -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'
Expand Down

0 comments on commit 03540ab

Please sign in to comment.