Releases: michaelherold/ksuid-ruby
Releases · michaelherold/ksuid-ruby
v0.5.0
0.5.0 - 2022-08-18
Added
- If you'd rather deal in KSUID strings instead of
KSUID::Type
s, you can now generate them simply withKSUID.string
. It takes the same arguments,payload
andtime
asKSUID.new
, but returns a string instead of aKSUID::Type
. KSUID.prefixed
and theKSUID::Prefixed
class now can generate prefixed KSUIDs to make them visually identifiable for their source. You cannot prefix a binary-encoded KSUID, only base 62-encoded ones.ActiveRecord::KSUID
now accepts aprefix:
argument for handling prefixed KSUIDs. In addition, theksuid
column type also accepts aprefix:
argument to calculate the intended size of the column with the prefix.
Deprecated
KSUID::ActiveRecord
is nowActiveRecord::KSUID
. The original constant will continue to work until v1.0.0, but will emit a warning upon boot of your application. To silence the deprecation, change all uses ofKSUID::ActiveRecord
to the new constant,ActiveRecord::KSUID
. See the upgrading notice for more information.
Miscellaneous
- The compatibility check for the Base62 implementation in the gem is about 10x faster now. The original optimization did not optimize as much due to an error with the benchmark. This change has a tested benchmark that shows a great improvement. Note that this is a micro-optimization and we see no real performance gain in the parsing of KSUID strings.