Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Methodic is a macro-like utility to help test, validate, control options passed by an Hash param to a method, it could help you to merge with defaults values, It raise explained exceptions and return false if the validations steps failed.
In a valid Ruby environment :
$ sudo zsh
# gem ins methodic
require 'rubygems'
require 'methodic'
[...]
# in a method
def amethod ( _options = {})
myOptions = Methodic::get_options(_options) do |m|
m.specify_default_value_of :country => 'France'
m.specify_classes_of :name => String, :surname => String, :age => Fixnum, :country => String
aCond = Proc::new {|option| case options when 'Doe' then true else false end }
m.specify_condition_for :name => aCond
m.specify_presence_of :name
m.specify_presence_of :surname
m.specify_formats_of :name => /\w+/, :surname => /\w+/, :country => /\w+/
m.merge!
end
# processing method
end
[...]
require 'rubygems'
require 'methodic'
[...]
# in a method
def amethod ( _options = {})
myOptions = Methodic::get_options(_options,true) do |m|
# all others definitions MUST be included in known options list (explained in Spec), so : m.specify_known_options [:country,:name,:surname, :age]
m.specify_default_value_of :country => 'France'
aCond = Proc::new {|option| case options when 'Doe' then true else false end }
m.specify_condition_for :name => aCond
m.specify_classes_of :name => String, :surname => String, :age => Fixnum, :country => String
m.specify_presence_of :name
m.specify_presence_of :surname
m.specify_formats_of :name => /\w+/, :surname => /\w+/, :country => /\w+/
m.merge!
end
# processing method
end
[...]
aCond = Proc::new do |option|
case options
when .... then ...
when .... then ...
else ...
end
end
Methodic (c) 2012-2013 Romain GEORGES for Ultragreen Software
FAQs
Unknown package
We found that methodic 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.