0.01
There's a lot of open issues
Step workflows for Rails/ActiveRecord
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 7.0
>= 0
~> 13.0
~> 1.50.0, < 2.0
>= 0

Runtime

 Project Readme

stepper_motor

Is a useful tool for running stepped or iterative workflows inside your Rails application.

Usage

Define a workflow and launch your user into it:

class SignupJourney < StepperMotor::Journey
  step :after_signup do
    WelcomeMailer.welcome_email(hero).deliver_later
  end

  step :remind_of_tasks, wait: 2.days do
    ServiceUpdateMailer.two_days_spent_email(hero).deliver_later
  end

  step :onboarding_complete, wait: 15.days do
    OnboardingCompleteMailer.onboarding_complete_email(hero).deliver_later
  end
end

SignupJourney.create!(hero: current_user)

Want to know more? Dive into the manual we provide.

Installation

Add the gem to the application's Gemfile, and then generate and run the migration

$ bundle add stepper_motor
$ bundle install
$ bin/rails g stepper_motor:install --uuid # Pass "uuid" if you are using UUID for your primary and foreign keys
$ bin/rails db:migrate

🚧 stepper_motor is undergoing active development

For versions 0.1.x stepper_motor is going to undergo active development, with infrequent - but possible - API changes and database schema changes. Here's what it means for you:

  • When you update the gem you must run bin/rails g stepper_motor:install --skip to add any migrations you may need
  • You have to ensure the application running a new version has the DB schema already updated. If your deployment does not allow for automatic sequential migrate-then-deploy, deploy the migrations first.

Starting with versions 0.2.x and up, stepper_motor will make the best possible effort to allow operation without having applied the recent migrations.

Development

After checking out the repo, run bundle to install dependencies. The development process from there on is like any other gem.

Is it any good?

Yes.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/stepper-motor/stepper_motor.