Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
tagutils gems - tag utilities (tag, taggings, tag list, etc.)
Use TagDb.create
to build the tags
and taggings
tables
and CategoryDb.create
to build the categories
and categorizations
tables.
Example:
# ...
TagDb.create
# ...
CategoryDb.create
# ...
Add the associations yourself with the standard has_many
class macro:
class Movie < ActiveRecord::Base
# ...
has_many :taggings, class_name: 'TagDb::Model::Tagging', :as => :taggable
has_many :tags, class_name: 'TagDb::Model::Tag', :through => :taggings
# ...
has_many :categorizations, class_name: 'CategoryDb::Model::Categorizations', :as => :categorizable
has_many :categories, class_name: 'CategoryDb::Model::Category', :through => :categorizations
# ...
end
or use the built-in class macro shortcuts:
class Movie < ActiveRecord::Base
# ...
has_many_tags
# ...
has_many_categories
# ...
end
The has_many_tags
also adds the following methods:
Movie.with_tag( 'doc' )
# e.g. scope :with_tag, ->(tag_key){ joins(:tags).where('tags.key' => tag_key) }
The has_many_categories
also adds the following methods:
Movie.with_category( 'doc' )
# e.g. scope :with_category, ->(category_key){ joins(:categories).where('categories.key' => category_key) }
The TagReader
lets you read plain text fixtures (data sets). Example:
tags.1.yml:
-----------
# organizations
orgs: un, g5, g8, g20, eu, commonwealth, mercosur, nafta
football: fifa, uefa, afc, ofc, caf, csf, concacaf
# national regions
brasil: s|South, se|Southeast, co|Centerwest, ne|Northeast, n|North
To read the tags use:
TagReader.new( <include_path>).read( `tags.1` )
The tagutils
scripts are dedicated to the public domain.
Use it as you please with no restrictions whatsoever.
FAQs
Unknown package
We found that tagutils 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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.