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.
Dependo is a very simple Dependency Injection framework for Ruby. Some say you don't need dependency injection when you're using Ruby. Maybe they're right, but I've come across some places where I need it.
For example, in my apps using Sinatra and Sequel, I need to be able to log, using a single Logger instance, from both my Sinatra app and from within my Sequel models. I'm not about to pass that Logger around as a parameter anywhere, and I don't want to instantiate it in every class that needs to log.
So, injecting the Logger is the easiest, best solution.
Dependo doesn't depend on anything. In test, it relies on rspec and either rcov (Ruby 1.8) or simplecov (Ruby 1.9).
Install the gem: gem install dependo-(version).gem
rake spec
rake gem:build
rake gem:install
Dependo::Registry[:log] = Logger.new(STDOUT)
This makes it easy to use your injected dependencies as instance methods:
class MyThing
include Dependo::Mixin
end
thing = MyThing.new
thing.log.info "I'm logging!"
This makes it easy to use your injected dependencies as class methods:
class MyThing
extend Dependo::Mixin
end
MyThing.log.info "I'm logging!"
##License
See the LICENSE file. Licensed under the Apache 2.0 License
FAQs
Unknown package
We found that dependo 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.