
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Democritus is library for building classes from reusable components.
Democritus is inspired as followup of a common pattern that I saw in the development of Sipity's form objects. It also aims to address the needs of Sipity's yet to be developed sibling application; The dissemination of processed data.
I'm looking to apply the ideas put forward in Avdi Grimm's Naught gem.
I would like to be able to declare in Ruby the following:
ApprovalForm = Democritus.build(command_namespaces: ['Sipity::DemocritusCommands', 'Democritus::ClassBuilder::Commands']) do |builder|
builder.form do
attributes do
attribute(name: 'agree_to_terms_of_service', type: 'Boolean', validates: 'acceptance')
end
action_name(name: 'approval')
end
end
With an ApprovalForm
, I could #submit
if #valid?
(i.e. the agree_to_terms_of_service
has been accepted).
From that point forward, I would like to be able to create the class based on a JSON description:
{
"#command_namespaces": ["Sipity::DemocritusCommands", "Democritus::ClassBuilder::Commands"],
"#form": {
"#attributes": {
"#attribute": [
{ "name": "agree_to_terms_of_service", "type": "Boolean", "validates": "acceptance" }
]
},
"#action_name": { "name": "approval" }
}
}
ApprovalForm = Demcritus.build_from_json(json)
FAQs
Unknown package
We found that democritus 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
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.