0.0
No commit activity in last 3 years
No release in over 3 years
Laminar gem support for Rails applications.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.14
~> 2.1
~> 12.3.3
~> 3.0
~> 0.16

Runtime

~> 0.5.1
>= 4.2, < 6.1
 Project Readme

Laminar on Rails

Build Status Maintainability

Adds Rails support to the Laminar workflow gem. Laminar Rails supports Ruby MRI versions 2.3+ and rails 4.2 - 6.0.

Installation

Add this line to your application's Gemfile:

gem 'laminar-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install laminar-rails

Usage

Laminar-Rails adds a couple of generators to facilitate the creation of new Laminar particles and flows.

$ rails generate laminar:particle foo

The generator adds a file app/flows/foo.rb:

class Foo
  include Laminar::Particle

  def call
    # TODO
  end
end

The generator also adds a matching spec/flows/foo_spec.rb.

There is also a flow generator:

$ rails generate laminar:flow foo

that creates a flow template:

class Foo
  include Laminar::Flow

  # flow do
    # step :step1
    # step :step2
  # end
end

You can specify particle names on the generator command line.

$ rails generate laminar:flow foo something something_else

will create a new flow pre-populated with steps:

class Foo
  include Laminar::Flow

  flow do
    step :something
    step :something_else
  end
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/laminar-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the Laminar::Rails project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.