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 fixNoMethodErrors in log queries (#35).- Fixes overlapping methods, such as
get_generalfrom siteinfo andget_generalfrom 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_blockget_unblock->loghash_unblockget_importinterwiki->loghash_importinterwikiget_general->loghash_generalget_merge->loghash_mergeget_move->loghash_moveget_user->loghash_userget_patrol->loghash_patrolget_protect->loghash_protectget_protectmoveprot->loghash_protectmoveprotget_unprotect->loghash_unprotectget_rightsautopromote->loghash_rightsautopromoteget_rightsrights->loghash_rightsrightsget_upload->loghash_upload
- Fixes overlapping methods, such as
- Fix broken log hash keys causing
NoMethodErrors (#35):loghash_block:flags,duration, andexpiryloghash_move:new_title, andsuppressredirectloghash_patrol:current_revision, andprevious_revision; removeautomaticloghash_protect:details(type,expiry,level) is not present in older protection logs; getting protection logs will no longer error on older entries withoutdetailsloghash_rightsautopromote:new_rights,old_rightsloghash_rightsrights:new_rights,old_rights
- Fix missing log hash methods causing
NoMethodErrors (#35):get_reblock_logget_unblock_logget_overall_logget_merge_log
- Returned log hash in move logs no longer has
titlekey, it is now calledold_title. - Rights log hashes no longer have
titlekey because they were not useful. - Update minitest
- Implement patrol API support. Patrol edits with the
patrolmethod, which if errors will raise aPatrolError(#76).
3.0.0
Breaking changes!
- Update token system for MediaWiki 1.27+ (#45, #46, #65, #67).
loginno longer takes a thirdtokenparameter.create_accountno longer takes a fifthtokenparameter.create_account_emailno longer takes a fifthtokenparameter.MediaWiki::Query::Properties#get_tokenhas 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_TYPESarray.
- Remove unnecessary
autoparse,header, andoverride_assertionparameters 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_defaultis now defaulted to'max'.:use_continuationis 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_userrightsget_contrib_countget_registration_timeget_user_gender
- Change return values of
#uploadto be more useful (#54)true/falsereturn value denote success/failureUploadInvalidFileExtErroris raised when the file extension is not validEditErroris 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, andmovemethods 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
:assertionoption in initialize opts. It takes either:useror:bot. - New
override_assertionparameter inpostto prevent assertion errors being thrown.- Note: Assertions will only happen if
post'sautoparseparameter 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_watchlistnow properly set their limits.- Most query lists that took a limit parameter now use the attribute
:query_limit_defaultinstead of each having a set default of 500. - New
:query_limit_defaultattribute 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
:tokensinstance variable. This should silence some errors when logging in/out. - Improve authentication methods by making them recursive.
loginandcreate_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.
editreturns 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_loginandcheck_create. All authentication errors now return a generic AuthenticationError with the provided error message from MediaWiki.