Releases: nerbyk/activefunction
Releases · nerbyk/activefunction
v0.4.0
ActiveFunction v0.4.0
1. Introduction of Modular Plugin System
Old ActiveFunction::Functions modules have been extracted into plugins system.
Example:
require "active_function"
ActiveFunction.config do
plugin :callbacks
plugin :strong_parameters
plugin :rendering
endMore details in ActiveFunction README
2. Callbacks Extraction
Callbacks system now engined by ActiveFunctionCore::Plugins::Hooks module and it's DSL is available through ActiveFunction::Plugins::Callbacks plugin.
Example:
require "active_function"
ActiveFunction.config do
plugin :callbacks
end
class YourClass < ActiveFunction::Base
before_action :do_something_before, only: [:your_method]
define_hooks_for :respond
after_respond :do_something_after
def your_method = response
def respond
# Method implementation here...
end
endMore details in ActiveFunctionCore v0.2.2
ActiveFunctionCore v0.2.2
Hooks Plugin Introduced
Introduced standalone ActiveFunctionCore::Plugins::Hooks module that provides ActiveSupport::Callbacks like DSL for hooks through ::define_hooks_for to define before_[method_name] & after_[method_name] callbacks and redefine #method_name to execute callbacks around it.
Example:
class YourClass
include ActiveFunction::Core::Plugins::Hooks
define_hooks_for :your_method
before_your_method :do_something_before
after_your_method :do_something_after
def your_method
# Method implementation here...
end
private
def do_something_before
# Callback logic to execute before your_method
end
def do_something_after
# Callback logic to execute after your_method
end
endMore details in ActiveFunctionCore README
v0.3.5
Groundwork done for future gem modularization.
v0.3.4
- Fix
RubyNextruntime integration
v0.3.3
v0.3.2
- Finish readme
- Fix callbacks broken by prepend change
- Add more tests for #process public interface
- Update
binscripts
v0.3.1
v0.3.0
- cleanup
- add
ActiveFunction::Functions::Response#commit! - extract action processing to separate method to handle
ActiveFunction::Functions::Callbacks#process overriding - add test for
ActiveFunction::Base.process
v0.2.0
- Add more tests
- Refactor rbs types signature
- Fix Steep Pipeline
- Refactor some codebase
v0.1.0
[0.1.0] - 2022-12-28
- Add
before_actionandafter_actioncallbacks with:onlyand:ifoptions - Add
ActiveFunction::Base#paramswithrequire,permit,[]andto_hpublic methods - Add specs for
ActiveFunction::Base.paramsmodule - Add
ActiveFunction::Base#renderwith:status,:jsonand:headoptions - Add RBS signature
- Add RBS Aws Event Types
- Add public interface type
steepchecking - Add
ruby-nexttranspiler