Releases: richardboehme/lexorank
Releases · richardboehme/lexorank
v0.4.0
[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 callingmove_to!(2, advisory_lock: { timeout_seconds: 30 })
will callwith_advisory_lock(lock_name, timeout_seconds: 30)
, changing thetimeout_seconds
option for this single advisory lock. (#17)
Full Changelog: v0.3.0...v0.4.0
v0.3.0
[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
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
0.1.2
- fix gem specification
- update changelog format
0.1.1
- Update license year
- Let rubygems be happy to have an updated version
0.1.0
Initial Release