Releases: bonkers-ie/bitfields
Releases · bonkers-ie/bitfields
Release list
v1.0.2
Fixed
- Plain
gem "bonkers-bitfields"now loads the library under Bundler's auto-require (e.g. Rails'
Bundler.require). Because the gem name (bonkers-bitfields) no longer matches the library file
(bitfields.rb), Bundler previously failed to require it silently, leavingBitfieldsundefined.
Alib/bonkers-bitfields.rbshim thatrequiresbitfieldsresolves this, sorequire: "bitfields"
in theGemfileis no longer needed.
Full Changelog: v1.0.1...v1.0.2
v1.0.1
Added
- Tested against ActiveRecord 8.1 (Ruby 3.2+); supported range is now AR 6.1 – 8.1.
Fixed
- Corrected the
Rael Gugelmin Cunhacontributor link, which pointed at another contributor's
GitHub profile.
Changed
Gemfile.lockis no longer committed (standard for a library), so CI resolves dependencies
fresh against eachgemfiles/*.gemfile.
Full Changelog: v1.0.0...v1.0.1
v1.0.0 — bonkers-bitfields (maintained fork of grosser/bitfields)
First release of bonkers-bitfields, a maintained fork of
grosser/bitfields. Modernized for current
Ruby and Rails, with safer bit declarations.
Upgrading from bitfields
Only your Gemfile changes — the library path and module are unchanged:
gem "bonkers-bitfields" # was: gem "bitfields"require "bitfields" # unchanged
include Bitfields # unchanged — all generated methods keep workingHighlights
Breaking
- Renamed the published gem to
bonkers-bitfields(require path /Bitfieldsmodule unchanged). - Positional declarations now warn by default.
bitfield :flags, :a, :bmaps each name to
2**index, so reordering silently shifts stored bits. Control withBitfields.positional_bits
(:warndefault /:forbid/:allow); prefer explicitbitfield :flags, 1 => :a, 2 => :b. - Duplicate bit names across columns now raise
DuplicateBitNameErrorat declaration time. - Dropped support for Ruby < 3.1 and ActiveRecord < 6.1. Now tested on Ruby 3.1–4.0 × AR 6.1–8.0.
Added
Bitfields.positional_bitsconfiguration, withnil/:_skipbit-position placeholders.with_bitfields/without_bitfieldsclass query methods (Arel-based, survive eager-load
aliasing) — resolves the long-standing README TODO and grosser#45.- GitHub Actions CI on every branch and PR; tag-triggered RubyGems publishing via Trusted Publishing.
Fixed
- Cross-column duplicate bit names no longer silently misbehave (grosser#21).
- README SQL examples and a duplicated assertion in the
have_a_bitfieldmatcher.
Full changelog: CHANGELOG.md