
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Simple hash serialization with loose type coercion. Built for ActiveRecord models, but does not rely specifically on anything from Rails.
For starters, throw this in your Gemfile:
gem "no_integrity"
Then, add this to your class:
class MrArbitrary < ActiveRecord::Base
include NoIntegrity
attr_accessor :some_random_hash
no_attribute :misc
no_attribute :hair, type: 'String'
no_attribute :age, type: 'Integer'
no_attribute :height, type: 'String'
no_attribute :eyes, type: 'String'
no_attribute :friendly, type: 'Boolean', default: true
no_attribute :cheese
no_attribute :ham
no_attribute :balogne
end
Finally, you can make calls like this:
arbs = MrArbitrary.new
arbs.friendly? # => false
arbs.friendly = true
arbs.friendly? # => true
You can define as many attributes as you want, and you can specify any of the following coercion types:
String
Integer
Boolean
For 0.5.0
I added the ability to store default values for each of the attributes. This required some changes to the way that attributes were setup and stored for each object.
In your classes you'll need to convert from:
no_attribute hair: 'String'
To:
no_attribute :hair, type: 'String'
Also if you relied on any of the undocumented method calls, you'll need to update them so they can handle the new internal structure.
A while back, I needed serialized attributes but it either didn't work for my use case or it wasn't made yet. So, I wrote this gem.
Do not modify the gemspec or version unless you absolutely need to!
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that no_integrity demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.