Skip to content

Releases: nerbyk/activefunction

v0.4.0

12 Jan 17:39

Choose a tag to compare

v0.3.4...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
end

More 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
end

More 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
end

More details in ActiveFunctionCore README

v0.3.5

20 Aug 13:16
4f043d1

Choose a tag to compare

v0.3.3...v0.3.4

Groundwork done for future gem modularization.

v0.3.4

02 May 15:49
1dede51

Choose a tag to compare

  • Fix RubyNext runtime integration

v0.3.3...v0.3.4

v0.3.3

11 Feb 12:47
bf5ef19

Choose a tag to compare

rubygems release

v0.3.2

10 Feb 14:30
4bd433e

Choose a tag to compare

  • Finish readme
  • Fix callbacks broken by prepend change
  • Add more tests for #process public interface
  • Update bin scripts

v0.3.1...v0.3.2

v0.3.1

09 Feb 09:56
528f783

Choose a tag to compare

  • Updated readme
  • Make callbacks inheritable (#10)
  • include -> prepend Core module in Base class

v0.3.0...v0.3.1

v0.3.0

12 Jan 18:01
0aef457

Choose a tag to compare

  • 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...v0.3.0

v0.2.0

08 Jan 16:58
da1524e

Choose a tag to compare

  • Add more tests
  • Refactor rbs types signature
  • Fix Steep Pipeline
  • Refactor some codebase

v0.1.0...v0.2.0

v0.1.0

29 Dec 00:45

Choose a tag to compare

[0.1.0] - 2022-12-28

  • Add before_action and after_action callbacks with :only and :if options
  • Add ActiveFunction::Base#params with require, permit, [] and to_h public methods
  • Add specs for ActiveFunction::Base.params module
  • Add ActiveFunction::Base#render with :status, :json and :head options
  • Add RBS signature
  • Add RBS Aws Event Types
  • Add public interface type steep checking
  • Add ruby-next transpiler