Releases: FTB-Gamepedia/MediaWiki-Butt-Ruby
Releases · FTB-Gamepedia/MediaWiki-Butt-Ruby
4.0.1
4.0.0
Breaking changes!
- Add support for searching text (NCC-Gnisha) (#69, #77).
- Replace HTTPClient with Patron (#71).
- Fix limiting on
get_tags
. - Implement token caching (#75).
- Change log hash formatting methods from
get_[type]
tologhash_[type]
to fixNoMethodError
s in log queries (#35).- Fixes overlapping methods, such as
get_general
from siteinfo andget_general
from log. - Is more accurate as a descriptor, because no new data is being "gotten" from these methods, they only format data.
- Affected methods:
get_block
->loghash_block
get_unblock
->loghash_unblock
get_importinterwiki
->loghash_importinterwiki
get_general
->loghash_general
get_merge
->loghash_merge
get_move
->loghash_move
get_user
->loghash_user
get_patrol
->loghash_patrol
get_protect
->loghash_protect
get_protectmoveprot
->loghash_protectmoveprot
get_unprotect
->loghash_unprotect
get_rightsautopromote
->loghash_rightsautopromote
get_rightsrights
->loghash_rightsrights
get_upload
->loghash_upload
- Fixes overlapping methods, such as
- Fix broken log hash keys causing
NoMethodError
s (#35):loghash_block
:flags
,duration
, andexpiry
loghash_move
:new_title
, andsuppressredirect
loghash_patrol
:current_revision
, andprevious_revision
; removeautomatic
loghash_protect
:details
(type
,expiry
,level
) is not present in older protection logs; getting protection logs will no longer error on older entries withoutdetails
loghash_rightsautopromote
:new_rights
,old_rights
loghash_rightsrights
:new_rights
,old_rights
- Fix missing log hash methods causing
NoMethodError
s (#35):get_reblock_log
get_unblock_log
get_overall_log
get_merge_log
- Returned log hash in move logs no longer has
title
key, it is now calledold_title
. - Rights log hashes no longer have
title
key because they were not useful. - Update minitest
- Implement patrol API support. Patrol edits with the
patrol
method, which if errors will raise aPatrolError
(#76).
3.0.0
Breaking changes!
- Update token system for MediaWiki 1.27+ (#45, #46, #65, #67).
login
no longer takes a thirdtoken
parameter.create_account
no longer takes a fifthtoken
parameter.create_account_email
no longer takes a fifthtoken
parameter.MediaWiki::Query::Properties#get_token
has been replaced byMediaWiki::Query::Meta#get_token
. This only takes one parameter, as opposed to the old method's two parameters, which is the type of token to receive. Valid types are verified in theMediaWiki::Query::Meta::TOKEN_TYPES
array.
- Remove unnecessary
autoparse
,header
, andoverride_assertion
parameters frompost
(#68).- The returned value is now always a parsed hash, never an HTTPMessage directly.
- Initialization parameter defaults are more likely what is to be used now (#62, #66).
:query_limit_default
is now defaulted to'max'
.:use_continuation
is now defaulted totrue
.
2.0.1
2.0.0
Breaking changes!
- Logical reversal of the redirect param for move (#58)
- Switch around type and limit params in
get_category_members
(#57) - Remove post-install message
- Strip leading and trailing whitespace from username in get_userlists, affecting the following methods (#55):
get_userrights
get_contrib_count
get_registration_time
get_user_gender
- Change return values of
#upload
to be more useful (#54)true
/false
return value denote success/failureUploadInvalidFileExtError
is raised when the file extension is not validEditError
is raised for any errors that occurred during the upload
- New siteinfo methods
get_server
,get_base_article_path
, andget_article_path
(#20). - Modify the
edit
,create_page
, andmove
methods to take options hashes instead of a bunch of unnamed arguments. (#53, #52) - Documentation is now stored in master branch
1.3.0
Security update!
- Add support for the Assert API (PR #51).
- New
:assertion
option in initialize opts. It takes either:user
or:bot
. - New
override_assertion
parameter inpost
to prevent assertion errors being thrown.- Note: Assertions will only happen if
post
'sautoparse
parameter is true.
- Note: Assertions will only happen if
- New NotLoggedInError and NotBotError for the according assertions.
Butt#user_bot?
no longer has a parameter. It now queries with an assertion rather than checking the user's groups.- New method
Butt#logged_in?
to check if the current instance is logged in.
- New
1.2.0
1.1.1
1.1.0
1.0.0
- Important: MediaWiki::Butt now depends on Ruby 2.3. If you aren't using that yet, use it. It's worth it.
- MediaWiki::Butt.new now takes two parameters,
url
, and an options hash. See the documentation for initialize for more details. - Improvements to the way we handle query limits (#28, #31, and #37):
get_recent_revisions
,get_prefix_search
, andget_full_watchlist
now properly set their limits.- Most query lists that took a limit parameter now use the attribute
:query_limit_default
instead of each having a set default of 500. - New
:query_limit_default
attribute accessor. This means you can change your default limits whenever you want! - Support using 'max' as the limit.
- Major cleanup of documentation. The YARD server at ftb-gamepedia.github.io/MediaWiki-Butt-Ruby is now the recommended place for documentation.
- Improve testing slightly.
- Remove the TIME_FORMAT constant and instead use DateTime's methods properly.
- Fix FileRepoInfo methods returning hashes with nil values instead of arrays of hashes (#34).
- Add support for the MediaWiki Watching/Unwatching APIs (#38)
- Remove the unused
:tokens
instance variable. This should silence some errors when logging in/out. - Improve authentication methods by making them recursive.
login
andcreate_account(_email)
now take an optional third parameter, token. - Fix error in
get_categories_in_page
(APerson241) - Error handling improvements (APerson241 and elifoster) (#32):
- New EditError that is thrown when there is an error when editing. It contains the error code.
edit
returns false when there is no change (error: nochange), rather than throwing an error.- New BlockError that is thrown when there is an error when blocking/unblocking.
- Removed AuthenticationError subclasses, as well as
check_login
andcheck_create
. All authentication errors now return a generic AuthenticationError with the provided error message from MediaWiki.