GithubHelp home page GithubHelp logo

subtletree / floristry Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mantor/floristry

0.0 2.0 0.0 482 KB

Visualize and interact with Flor's workflow engine through Rails facilities.

License: GNU General Public License v2.0

Dockerfile 0.28% Ruby 83.39% JavaScript 1.13% CSS 0.59% HTML 12.83% CoffeeScript 0.27% SCSS 1.51%

floristry's Introduction

Build Status

Floristry

The goal of this gem is to help you represent Flor's workflows using standard Rails facilities, e.g. partials, helpers, render, models, etc.

Floristry is an isolated engine which provides basic behaviors and representations to Flor's workflow language, e.g. sequence, concurrence, task, if, sleep, cron. Obviously, you can override their default behaviors (e.g. model) and representations (e.g. partial) your owns.

To override a view, simply create a new one in:

/app/views/floristry/_cron.html.erb.

Features

TODO

Hierarchy

  • Procedure
    • Leaf Procedure
      • Tasker
      • If
      • Wait
      • ...
    • Branch Procedure
      • Sequence
      • Concurrence
      • ...

Era - :pass, :present, :future

The following methods are available on each Procedures to identify its era:

active?
inactive?

is_past?
is_present?
is_future?

Extend

New behaviors ca be added to low-level Procedure such as Procedure (root), BranchProcedure or LeafProcedure to affect all Procedures at once, only Leaves or only Branches respectively.

Create a file called /config/initializers/floristry.rb containing modules with the desired behaviors. Then use the following config to define which module will be included in the which low-level Procedure.

module FloristryBranchBehavior
  def xyz
    # ...
  end

  # ...
end

Floristry.configure do |config|
  config.add_branch_Procedure_behavior = FloristryBranchBehavior
  #config.add_leaf_Procedure_behavior = FloristryLeafBehavior
  #config.add_Procedure_behavior = FloristryBehavior
end

Requirements

TODO

Installation

  1. Add this line to your application's Gemfile:

    gem 'floristry'

  2. And then execute:

    $ bundle install

  3. Then register the service in flor engine by running:

    rails g floristry:install --flack-and-flor

    This will our default Taskers and install Flack and Flor one directory level below your app ( ../). Remove the --flack-and-flor switch if you already have them installed.

  4. TODO

Testing

  1. Clone the gem
  2. Run bundle install
  3. Run rake app:floristry:setup_flack This will install Flack
  4. Run rake app:floristry:setup_dummy from the gem's root directory.
  5. Start Flack and the dummy rails app rake app:server:start
  6. Run the specs bundle exec rspec (specs need a running flack instance).
  7. Use the dummy app listening at localhost:3000 for testing.
  8. Stop all the servers: rake app:server:stop

Usage

TODO

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Do your stuff
  4. Commit your changes (git commit -am 'Add some feature')
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

License

GPLv2

Source

https://github.com/mantor/floristry

Authors

  • Danny Fullerton - Mantor Organization
  • Jean-Francois Rioux - Mantor Organization

floristry's People

Contributors

jfrioux avatar northox avatar subtletree avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.