
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
skills_cards_validations
Advanced tools
Defines the skills cards data model and methods to validate whether given data matches this model.
This gem allows different projects to have a shared way of determining whether data is a skills card and whether it is valid.
Add this line to your application's Gemfile:
gem 'skills_cards_validations'
And then execute:
$ bundle
Or install it yourself as:
$ gem install skills_cards_validations
Be sure to completely exit and re-open your running rails app or console.
Card and Data validation using the provided Validator class:
v = SkillsCardsValidations::Validator.new
v.id? 1234
# => #<Valid:0x0123>
v.id?(1234).result
# => true
v.id?(1234).original
# => 1
v.id? 123456
# => #<Invalid:0x0124>
v.id?(123456).result
# => false
v.id?(12345).original
# => 123456
You can also create your own class and use the provided mixins.
class MyCardValidator
include SkillsCardsValidations::CardValidations
def initialize(record)
@record = record
end
def id?
super(@record[:my_id])
end
end
v = MyCardValidator.new({
my_id: 1234
})
v.id?
# => #<Valid:0x0123>
v.id?.result
# => true
v.id?.original
# => 1
After checking out the repo, run bin/setup
to install dependencies. Then, run rake test
to run the tests. You can also run bin/console
for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run bundle exec rake install
. To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version, push git commits and tags.
Bug reports and pull requests are welcome on GitHub at https://bitbucket.org/utahyouthvillage/skillscardsvalidations.
TBD
FAQs
Unknown package
We found that skills_cards_validations 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.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.