
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
A robust implementation of the Command pattern for Ruby applications, providing type-safe, self-documenting business operations with standardized error handling and composable workflows.
Tired of scattered business logic and unclear error handling? Domainic::Command brings clarity to your domain operations by:
class CreateUser
include Domainic::Command
# Define expected inputs with validation
argument :login, String, "The user's login", required: true
argument :password, String, "The user's password", required: true
# Define expected outputs
output :user, User, "The created user", required: true
output :created_at, Time, "When the user was created"
def execute
user = User.create!(login: context.login, password: context.password)
context.user = user
context.created_at = Time.current
end
end
# Success case
result = CreateUser.call(login: "user@example.com", password: "secret123")
result.successful? # => true
result.user # => #<User id: 1, login: "user@example.com">
# Failure case
result = CreateUser.call(login: "invalid")
result.failure? # => true
result.errors # => { password: ["is required"] }
Add this line to your application's Gemfile:
gem 'domainic-command'
Or install it yourself as:
gem install domainic-command
For detailed usage instructions and examples, see USAGE.md.
We welcome contributions! Please see our Contributing Guidelines for:
Before contributing, please review our Code of Conduct.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that domainic-command demonstrated a healthy version release cadence and project activity because the last version was released less than 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
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.