Skip to content

Releases: richardboehme/lexorank

v0.4.0

05 Sep 20:04
Compare
Choose a tag to compare

[0.4.0] - 2024-09-05

Changed

  • Allow passing options to all move_to* methods. This allows for options being passed to the ::with_advisory_lock method. For example calling move_to!(2, advisory_lock: { timeout_seconds: 30 }) will call with_advisory_lock(lock_name, timeout_seconds: 30), changing the timeout_seconds option for this single advisory lock. (#17)

Full Changelog: v0.3.0...v0.4.0

v0.3.0

28 Aug 07:59
Compare
Choose a tag to compare

[0.3.0] - 2024-08-28

Changed

  • Raise an error if nil is passed for the :field option. (#16)
  • Calling rank! with an invalid column name, by either specifying the :field or :group_by option, will not issue a warning anymore. This also means the gem does not require an active database connection when loading classes. (#16)

Full Changelog: v0.2.0...v0.3.0

v0.2.0

16 Aug 21:09
Compare
Choose a tag to compare

Major Changes

This version introduces advisory locks. Advisory locking is automatically enabled if your model class responds to #with_advisory_lock (ex. User.with_advisory_lock).

From now on the lexorank gem requires ruby version 3.1 or higher. This decision is based on ruby's end of life dates (3.0 went eol in April 2024).

All internal API methods that lexorank was using until 0.1.3 were moved to another location. If you rely on those (and you should not), have a look at the Lexorank::Ranking class. An instance of this class can be accessed via the lexorank_ranking attribute on your model class.

Added

  • Add advisory locks if the model class responds to with_advisory_lock
  • Add #move_to_end and #move_to_end! to move a record to the end of a collection
  • The CI now runs against multiple database adapters (sqlite, mysql, postgresql)

Changed

  • Blocks passed to all move_to methods will now be executed after the rank was assigned. When using advisory locks, the block will be executed while the lock is still active.
  • When calling #move_to with a position that is larger than the number of records in the collection it will now be moved to the end of the list
  • Require ruby version 3.1 or higher
  • Moved Changelog from README.md to CHANGELOG.md

Full Changelog: v0.1.3...v0.2.0

0.1.3

16 Jul 18:57
Compare
Choose a tag to compare
  • add support to move element into another group (#5, by @bookis)
  • add the no_rank? method (#5, by @bookis)
  • remove in memory operations with the collection when calling move_to

0.1.2

08 Mar 20:49
Compare
Choose a tag to compare
  • fix gem specification
  • update changelog format

0.1.1

08 Mar 20:27
Compare
Choose a tag to compare
  • Update license year
  • Let rubygems be happy to have an updated version

0.1.0

08 Mar 20:18
Compare
Choose a tag to compare

Initial Release