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.
TODO
- Procedure
- Leaf Procedure
- Tasker
- If
- Wait
- ...
- Branch Procedure
- Sequence
- Concurrence
- ...
- Leaf Procedure
The following methods are available on each Procedures to identify its era:
active?
inactive?
is_past?
is_present?
is_future?
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
TODO
-
Add this line to your application's Gemfile:
gem 'floristry'
-
And then execute:
$ bundle install
-
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. -
TODO
- Clone the gem
- Run
bundle install
- Run
rake app:floristry:setup_flack
This will install Flack - Run
rake app:floristry:setup_dummy
from the gem's root directory. - Start Flack and the dummy rails app
rake app:server:start
- Run the specs
bundle exec rspec
(specs need a running flack instance). - Use the dummy app listening at localhost:3000 for testing.
- Stop all the servers:
rake app:server:stop
TODO
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Do your stuff
- Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
GPLv2
https://github.com/mantor/floristry
- Danny Fullerton - Mantor Organization
- Jean-Francois Rioux - Mantor Organization