Skip to content

Releases: FTB-Gamepedia/MediaWiki-Butt-Ruby

4.0.1

24 May 23:27
982b5de
Compare
Choose a tag to compare
  • Yank 4.0.0, fix gem build.

4.0.0

24 May 23:27
9a42381
Compare
Choose a tag to compare

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] to loghash_[type] to fix NoMethodErrors in log queries (#35).
    • Fixes overlapping methods, such as get_general from siteinfo and get_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
  • Fix broken log hash keys causing NoMethodErrors (#35):
    • loghash_block: flags, duration, and expiry
    • loghash_move: new_title, and suppressredirect
    • loghash_patrol: current_revision, and previous_revision; remove automatic
    • loghash_protect: details (type, expiry, level) is not present in older protection logs; getting protection logs will no longer error on older entries without details
    • loghash_rightsautopromote: new_rights, old_rights
    • loghash_rightsrights: new_rights, old_rights
  • Fix missing log hash methods causing NoMethodErrors (#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 called old_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 a PatrolError (#76).

3.0.0

24 May 23:26
692ca27
Compare
Choose a tag to compare

Breaking changes!

  • Update token system for MediaWiki 1.27+ (#45, #46, #65, #67).
    • login no longer takes a third token parameter.
    • create_account no longer takes a fifth token parameter.
    • create_account_email no longer takes a fifth token parameter.
    • MediaWiki::Query::Properties#get_token has been replaced by MediaWiki::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 the MediaWiki::Query::Meta::TOKEN_TYPES array.
  • Remove unnecessary autoparse, header, and override_assertion parameters from post (#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 to true.

2.0.1

24 May 23:26
352f348
Compare
Choose a tag to compare
  • Fix NoMethodError in get_templates_in_page when called for pages with no templates (#61)
  • Fix NoMethodError in get_all_links_in_page when called for pages with no links
  • Fix NoMethodError in get_other_langs_of_page when called for pages with only 1 language (#33)

2.0.0

24 May 23:26
fc6e045
Compare
Choose a tag to compare

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/failure
    • UploadInvalidFileExtError is raised when the file extension is not valid
    • EditError is raised for any errors that occurred during the upload
  • New siteinfo methods get_server, get_base_article_path, and get_article_path (#20).
  • Modify the edit, create_page, and move methods to take options hashes instead of a bunch of unnamed arguments. (#53, #52)
  • Documentation is now stored in master branch

1.3.0

24 May 23:26
356255d
Compare
Choose a tag to compare

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 in post to prevent assertion errors being thrown.
      • Note: Assertions will only happen if post's autoparse parameter is true.
    • 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.

1.2.0

24 May 23:25
20dfe6a
Compare
Choose a tag to compare
  • Add support for the Purge API (#48)

1.1.1

24 May 23:25
495db99
Compare
Choose a tag to compare
  • Fix query methods throwing NoMethodErrors.

1.1.0

24 May 23:25
70b159f
Compare
Choose a tag to compare
  • Support for the continuation API (Issue #9 and PR #47)

1.0.0

24 May 23:25
c513232
Compare
Choose a tag to compare
  • 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, and get_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 and create_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 and check_create. All authentication errors now return a generic AuthenticationError with the provided error message from MediaWiki.