rules_engine 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +0 -0
- data/README.textile +12 -12
- data/VERSION +1 -1
- data/lib/rules_engine.rb +4 -18
- data/lib/rules_engine/cache.rb +1 -1
- data/lib/rules_engine/discovery.rb +14 -5
- data/lib/rules_engine/process/auditor.rb +62 -0
- data/lib/rules_engine/process/auditor/db_auditor.rb +48 -0
- data/lib/rules_engine/process/runner.rb +147 -0
- data/lib/rules_engine/process/runner/db_runner.rb +78 -0
- data/lib/rules_engine/publish/publisher.rb +53 -0
- data/lib/rules_engine/publish/publisher/db_publisher.rb +93 -0
- data/lib/rules_engine/rule.rb +6 -6
- data/lib/rules_engine/rule_outcome.rb +4 -4
- data/lib/rules_engine_view.rb +14 -0
- data/lib/rules_engine_view/boxes.rb +0 -0
- data/lib/rules_engine_view/buttons.rb +0 -0
- data/lib/rules_engine_view/defer.rb +19 -3
- data/lib/rules_engine_view/form_fields.rb +0 -0
- data/lib/rules_engine_view/model_loader.rb +6 -2
- data/lib/rules_engine_view/navigate.rb +1 -3
- data/rails_generators/manifests/rule_complex.rb +30 -0
- data/rails_generators/manifests/rule_complex.yml +24 -0
- data/rails_generators/manifests/rule_simple.rb +26 -0
- data/rails_generators/manifests/rule_simple.yml +21 -0
- data/rails_generators/manifests/rules_engine.rb +244 -276
- data/rails_generators/manifests/rules_engine.yml +37 -59
- data/rails_generators/rules_engine_generator.rb +16 -32
- data/rails_generators/templates/app/controllers/re_plan_workflow_rules_controller.rb +142 -0
- data/rails_generators/templates/app/controllers/re_plan_workflows_controller.rb +139 -0
- data/rails_generators/templates/app/controllers/re_plans_controller.rb +131 -0
- data/rails_generators/templates/app/controllers/re_processes_controller.rb +15 -0
- data/rails_generators/templates/app/controllers/re_publications_controller.rb +15 -0
- data/rails_generators/templates/app/controllers/{re_pipeline_rules_controller.rb → re_workflow_rules_controller.rb} +12 -12
- data/rails_generators/templates/app/controllers/re_workflows_controller.rb +96 -0
- data/rails_generators/templates/app/helpers/rules_engine_helper.rb +42 -0
- data/rails_generators/templates/app/models/re_plan.rb +126 -0
- data/rails_generators/templates/app/models/re_plan_workflow.rb +10 -0
- data/rails_generators/templates/app/models/re_rule.rb +47 -60
- data/rails_generators/templates/app/models/re_rule_expected_outcome.rb +3 -21
- data/rails_generators/templates/app/models/re_workflow.rb +61 -0
- data/rails_generators/templates/app/rules/{complex_rule.rb → rule_complex.rb} +30 -30
- data/rails_generators/templates/app/rules/{simple_rule.rb → rule_simple.rb} +13 -14
- data/rails_generators/templates/app/views/layouts/rules_engine.html.erb +6 -9
- data/rails_generators/templates/app/views/re_plan_workflow_rules/edit.html.erb +13 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/edit.js.erb +9 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/error.html.erb +12 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/error.js.erb +7 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/help.html.erb +12 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/help.js.erb +4 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/new.html.erb +16 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/new.js.erb +10 -0
- data/rails_generators/templates/app/views/re_plan_workflow_rules/update.js.erb +19 -0
- data/rails_generators/templates/app/views/re_plan_workflows/change.html.erb +78 -0
- data/rails_generators/templates/app/views/re_plan_workflows/edit.html.erb +12 -0
- data/rails_generators/templates/app/views/re_plan_workflows/edit.js.erb +8 -0
- data/rails_generators/templates/app/views/re_plan_workflows/new.html.erb +12 -0
- data/rails_generators/templates/app/views/re_plan_workflows/new.js.erb +5 -0
- data/rails_generators/templates/app/views/re_plan_workflows/show.html.erb +70 -0
- data/rails_generators/templates/app/views/re_plan_workflows/update.js.erb +19 -0
- data/rails_generators/templates/app/views/re_plans/_change.html.erb +39 -0
- data/rails_generators/templates/app/views/re_plans/_edit.html.erb +20 -0
- data/rails_generators/templates/app/views/re_plans/_empty.html.erb +12 -0
- data/rails_generators/templates/app/views/re_plans/_index.html.erb +42 -0
- data/rails_generators/templates/app/views/re_plans/_menu.html.erb +26 -0
- data/rails_generators/templates/app/views/re_plans/_new.html.erb +18 -0
- data/rails_generators/templates/app/views/re_plans/_preview.html.erb +47 -0
- data/rails_generators/templates/app/views/re_plans/_show.html.erb +27 -0
- data/rails_generators/templates/app/views/re_plans/_workflow_change.html.erb +44 -0
- data/rails_generators/templates/app/views/re_plans/_workflow_preview.html.erb +24 -0
- data/rails_generators/templates/app/views/re_plans/_workflow_show.html.erb +32 -0
- data/rails_generators/templates/app/views/re_plans/change.html.erb +118 -0
- data/rails_generators/templates/app/views/re_plans/create.js.erb +9 -0
- data/rails_generators/templates/app/views/re_plans/edit.html.erb +11 -0
- data/rails_generators/templates/app/views/re_plans/edit.js.erb +8 -0
- data/rails_generators/templates/app/views/re_plans/index.html.erb +33 -0
- data/rails_generators/templates/app/views/re_plans/index.js.erb +18 -0
- data/rails_generators/templates/app/views/re_plans/new.html.erb +9 -0
- data/rails_generators/templates/app/views/re_plans/new.js.erb +5 -0
- data/rails_generators/templates/app/views/re_plans/preview.html.erb +6 -0
- data/rails_generators/templates/app/views/re_plans/preview.js.erb +4 -0
- data/rails_generators/templates/app/views/re_plans/re_process.html.erb +12 -0
- data/rails_generators/templates/app/views/re_plans/re_process.js.erb +4 -0
- data/rails_generators/templates/app/views/re_plans/show.html.erb +56 -0
- data/rails_generators/templates/app/views/{re_pipelines → re_plans}/template.html.erb +1 -1
- data/rails_generators/templates/app/views/re_plans/update.js.erb +15 -0
- data/rails_generators/templates/app/views/re_processes/_index_prepare.html.erb +12 -0
- data/rails_generators/templates/app/views/re_processes/_index_update.html.erb +20 -0
- data/rails_generators/templates/app/views/re_processes/_show.html.erb +30 -0
- data/rails_generators/templates/app/views/re_processes/index.html.erb +11 -0
- data/rails_generators/templates/app/views/re_processes/index.js.erb +4 -0
- data/rails_generators/templates/app/views/re_processes/show.html.erb +8 -0
- data/rails_generators/templates/app/views/re_processes/show.js.erb +4 -0
- data/rails_generators/templates/app/views/re_publications/_show_prepare.html.erb +14 -0
- data/rails_generators/templates/app/views/re_publications/_show_update.html.erb +16 -0
- data/rails_generators/templates/app/views/re_publications/show.html.erb +11 -0
- data/rails_generators/templates/app/views/re_publications/show.js.erb +4 -0
- data/rails_generators/templates/app/views/re_rule_definitions/rule_complex/_edit.html.erb +7 -0
- data/rails_generators/templates/app/views/re_rule_definitions/{complex_rule → rule_complex}/_help.html.erb +1 -1
- data/rails_generators/templates/app/views/re_rule_definitions/rule_complex/_new.html.erb +7 -0
- data/rails_generators/templates/app/views/re_rule_definitions/rule_complex/_script.html.erb +25 -0
- data/rails_generators/templates/app/views/re_rule_definitions/{complex_rule → rule_complex}/_title.html.erb +0 -0
- data/rails_generators/templates/app/views/re_rule_definitions/{complex_rule → rule_complex}/_word.html.erb +0 -0
- data/rails_generators/templates/app/views/re_rule_definitions/{complex_rule → rule_complex}/_words.html.erb +2 -2
- data/rails_generators/templates/app/views/re_rule_definitions/{complex_rule/_pipeline.html.erb → rule_complex/_workflow.html.erb} +5 -5
- data/rails_generators/templates/app/views/re_rule_definitions/rule_simple/_edit.html.erb +1 -0
- data/rails_generators/templates/app/views/re_rule_definitions/{simple_rule → rule_simple}/_form.html.erb +1 -1
- data/rails_generators/templates/app/views/re_rule_definitions/{simple_rule → rule_simple}/_help.html.erb +0 -0
- data/rails_generators/templates/app/views/re_rule_definitions/rule_simple/_new.html.erb +1 -0
- data/rails_generators/templates/app/views/re_workflow_rules/_edit.html.erb +19 -0
- data/rails_generators/templates/app/views/{re_pipeline_rules → re_workflow_rules}/_error.html.erb +0 -0
- data/rails_generators/templates/app/views/re_workflow_rules/_help.html.erb +15 -0
- data/rails_generators/templates/app/views/{re_pipeline_rules → re_workflow_rules}/_new.html.erb +6 -3
- data/rails_generators/templates/app/views/re_workflow_rules/edit.html.erb +13 -0
- data/rails_generators/templates/app/views/re_workflow_rules/edit.js.erb +9 -0
- data/rails_generators/templates/app/views/re_workflow_rules/error.html.erb +12 -0
- data/rails_generators/templates/app/views/re_workflow_rules/error.js.erb +7 -0
- data/rails_generators/templates/app/views/re_workflow_rules/help.html.erb +12 -0
- data/rails_generators/templates/app/views/re_workflow_rules/help.js.erb +4 -0
- data/rails_generators/templates/app/views/re_workflow_rules/new.html.erb +15 -0
- data/rails_generators/templates/app/views/{re_pipeline_rules → re_workflow_rules}/new.js.erb +1 -1
- data/rails_generators/templates/app/views/re_workflow_rules/update.js.erb +17 -0
- data/rails_generators/templates/app/views/re_workflows/_add_prepare.html.erb +15 -0
- data/rails_generators/templates/app/views/re_workflows/_add_update.html.erb +21 -0
- data/rails_generators/templates/app/views/re_workflows/_edit.html.erb +23 -0
- data/rails_generators/templates/app/views/re_workflows/_empty.html.erb +12 -0
- data/rails_generators/templates/app/views/re_workflows/_index.html.erb +41 -0
- data/rails_generators/templates/app/views/re_workflows/_menu.html.erb +92 -0
- data/rails_generators/templates/app/views/re_workflows/_new.html.erb +21 -0
- data/rails_generators/templates/app/views/re_workflows/_plan_prepare.html.erb +14 -0
- data/rails_generators/templates/app/views/re_workflows/_plan_update.html.erb +21 -0
- data/rails_generators/templates/app/views/re_workflows/_preview.html.erb +30 -0
- data/rails_generators/templates/app/views/re_workflows/_rule_change.html.erb +65 -0
- data/rails_generators/templates/app/views/re_workflows/_rule_empty.html.erb +13 -0
- data/rails_generators/templates/app/views/{re_pipeline_rules/_index.html.erb → re_workflows/_rule_preview.html.erb} +20 -11
- data/rails_generators/templates/app/views/re_workflows/_rule_show.html.erb +46 -0
- data/rails_generators/templates/app/views/re_workflows/_show.html.erb +24 -0
- data/rails_generators/templates/app/views/re_workflows/add.html.erb +11 -0
- data/rails_generators/templates/app/views/re_workflows/add.js.erb +6 -0
- data/rails_generators/templates/app/views/re_workflows/change.html.erb +53 -0
- data/rails_generators/templates/app/views/re_workflows/create.js.erb +9 -0
- data/rails_generators/templates/app/views/re_workflows/edit.html.erb +11 -0
- data/rails_generators/templates/app/views/re_workflows/edit.js.erb +8 -0
- data/rails_generators/templates/app/views/re_workflows/index.html.erb +34 -0
- data/rails_generators/templates/app/views/re_workflows/new.html.erb +9 -0
- data/rails_generators/templates/app/views/re_workflows/new.js.erb +5 -0
- data/rails_generators/templates/app/views/re_workflows/plan.html.erb +12 -0
- data/rails_generators/templates/app/views/re_workflows/plan.js.erb +4 -0
- data/rails_generators/templates/app/views/re_workflows/preview.html.erb +5 -0
- data/rails_generators/templates/app/views/re_workflows/preview.js.erb +4 -0
- data/rails_generators/templates/app/views/re_workflows/show.html.erb +47 -0
- data/rails_generators/templates/app/views/re_workflows/update.js.erb +17 -0
- data/rails_generators/templates/config/initializers/rules_engine.rb +9 -0
- data/rails_generators/templates/db/migrate/20100308225008_create_rules_engine.rb +113 -0
- data/rails_generators/templates/doc/README.rules_engine +113 -98
- data/rails_generators/templates/lib/tasks/rules_engine.rake +29 -10
- data/rails_generators/templates/public/javascripts/rules_engine/re_plan_change.js +85 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_plan_new.js +29 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_plan_preview.js +18 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_process_index.js +43 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_process_show.js +18 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_publication_show.js +39 -0
- data/rails_generators/templates/public/javascripts/{re_view.js → rules_engine/re_view.js} +19 -3
- data/rails_generators/templates/public/javascripts/rules_engine/re_workflow_add.js +124 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_workflow_change.js +185 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_workflow_new.js +29 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_workflow_plan.js +38 -0
- data/rails_generators/templates/public/javascripts/rules_engine/re_workflow_preview.js +18 -0
- data/rails_generators/templates/public/stylesheets/{re_view_box → rules_engine/images/re_view_box}/shadowbox.png +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_box → rules_engine/images/re_view_box}/whitebox.jpg +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/checked-off.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/checked-on.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/icon-add.png +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/icon-delete.png +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-blue-left.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-blue-right.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-gray-left.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-gray-right.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-green-left.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-green-right.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-orange-left.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-orange-right.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-red-left.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_button → rules_engine/images/re_view_button}/oval-red-right.gif +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_error → rules_engine/images/re_view_error}/re-alert-close.png +0 -0
- data/rails_generators/templates/public/stylesheets/{re_view_navigate → rules_engine/images/re_view_navigate}/breadcrumb.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/next-disabled-14.png → images/rules_engine/re_common/list-next-disabled-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/next-enabled-14.png → images/rules_engine/re_common/list-next-enabled-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/prev-disabled-14.png → images/rules_engine/re_common/list-prev-disabled-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/prev-enabled-14.png → images/rules_engine/re_common/list-prev-enabled-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/loadingAnimation.gif → images/rules_engine/re_common/loading.gif} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/alert-18.png → images/rules_engine/re_common/status-changed-18.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/alert-25.png → images/rules_engine/re_common/status-changed-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/info-18.png → images/rules_engine/re_common/status-draft-18.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/info-25.png → images/rules_engine/re_common/status-draft-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/error-14.png → images/rules_engine/re_common/status-error-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/info-14.png → images/rules_engine/re_common/status-info-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/success-18.png → images/rules_engine/re_common/status-published-18.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/success-25.png → images/rules_engine/re_common/status-published-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/success-14.png → images/rules_engine/re_common/status-success-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/current-14.png → images/rules_engine/re_common/status-valid-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/current-18.png → images/rules_engine/re_common/status-valid-18.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/draft-14.png → images/rules_engine/re_common/status-verify-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/error-18.png → images/rules_engine/re_common/status-verify-18.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_job/error-25.png → images/rules_engine/re_common/status-verify-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/alert-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/change-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/delete-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/edit-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/list-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/new-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/preview-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/publish-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/revert-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/show-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/title-plural.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_plan/title-single.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule/stop-failure-14.png → images/rules_engine/re_process/error-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_process/info-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_process/list-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule/stop-success-14.png → images/rules_engine/re_process/success-14.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_publication/show-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule_class → images/rules_engine/re_rule}/add-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_rule/alert-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline → images/rules_engine/re_rule}/destroy-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_rule/edit-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_rule/error-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule_class → images/rules_engine/re_rule}/help-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_rule/help-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/current-25.png → images/rules_engine/re_rule/icon-ad-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule → images/rules_engine/re_rule}/move-down-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule → images/rules_engine/re_rule}/move-down-off-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule → images/rules_engine/re_rule}/move-up-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule → images/rules_engine/re_rule}/move-up-off-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_rule/new-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule/next-change-25.png → images/rules_engine/re_rule/next-down-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule/next-show-18.png → images/rules_engine/re_rule/next-right-18.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/change-25.png → images/rules_engine/re_rule/show-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule → images/rules_engine/re_rule}/start-pipeline-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule → images/rules_engine/re_rule}/stop-failure-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_rule → images/rules_engine/re_rule}/stop-success-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_rule/title-plural.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_rule/title-single.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/add-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/add-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/add-off-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/alert-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/change-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/change-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/delete-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/edit-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/is-default-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/list-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/make-default-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/make-default-off-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/new-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/{re_pipeline/revert-25.png → images/rules_engine/re_workflow/plan-25.png} +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/preview-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/remove-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/show-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/show-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/title-plural.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/images/rules_engine/re_workflow/title-single.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/screen.css +1580 -0
- data/rails_generators/templates/spec/controllers/re_plans_controller_spec.rb +409 -0
- data/rails_generators/templates/spec/helpers/rules_engine_helper_spec.rb +86 -0
- data/rails_generators/templates/spec/lib/rules/rule_complex_spec.rb +331 -0
- data/rails_generators/templates/spec/lib/rules/rule_simple_spec.rb +161 -0
- data/rails_generators/templates/spec/models/re_plan_spec.rb +349 -0
- data/rails_generators/templates/spec/models/re_plan_workflow_spec.rb +6 -0
- data/rails_generators/templates/spec/models/re_rule_expected_outcome_spec.rb +7 -51
- data/rails_generators/templates/spec/models/re_rule_spec.rb +108 -152
- data/rails_generators/templates/spec/models/re_workflow_spec.rb +186 -0
- data/rails_generators/templates/spec/support/rules_engine_blueprints.rb +27 -0
- data/spec/railsenv/log/debug.log +7061 -1
- data/spec/railsenv/log/empty.txt +1 -0
- data/spec/railsenv/log/test.log +492 -1
- data/spec/rules_engine/discovery_spec.rb +40 -4
- data/spec/rules_engine/process/auditor/db_auditor_spec.rb +115 -0
- data/spec/rules_engine/process/auditor_spec.rb +111 -0
- data/spec/rules_engine/process/runner/db_runner_spec.rb +229 -0
- data/spec/rules_engine/process/runner_spec.rb +236 -0
- data/spec/rules_engine/publish/publisher/db_publisher_spec.rb +280 -0
- data/spec/rules_engine/publish/publisher_spec.rb +64 -0
- data/spec/rules_engine/rule_spec.rb +7 -11
- data/spec/rules_engine_view/defer_spec.rb +30 -0
- data/spec/rules_engine_view/model_loader_spec.rb +3 -3
- data/spec/spec_helper.rb +36 -1
- metadata +268 -292
- data/lib/rules_engine/job.rb +0 -127
- data/rails_generators/manifests/rules_engine_complex.rb +0 -30
- data/rails_generators/manifests/rules_engine_complex.yml +0 -24
- data/rails_generators/manifests/rules_engine_simple.rb +0 -26
- data/rails_generators/manifests/rules_engine_simple.yml +0 -21
- data/rails_generators/templates/app/controllers/re_jobs_controller.rb +0 -20
- data/rails_generators/templates/app/controllers/re_pipeline_jobs_controller.rb +0 -16
- data/rails_generators/templates/app/controllers/re_pipelines_controller.rb +0 -171
- data/rails_generators/templates/app/helpers/re_pipeline_helper.rb +0 -14
- data/rails_generators/templates/app/models/re_job.rb +0 -122
- data/rails_generators/templates/app/models/re_job_audit.rb +0 -18
- data/rails_generators/templates/app/models/re_pipeline.rb +0 -47
- data/rails_generators/templates/app/models/re_pipeline_activated.rb +0 -29
- data/rails_generators/templates/app/models/re_pipeline_activated_observer.rb +0 -11
- data/rails_generators/templates/app/models/re_pipeline_base.rb +0 -63
- data/rails_generators/templates/app/views/re_jobs/_empty.html.erb +0 -14
- data/rails_generators/templates/app/views/re_jobs/_index_large.html.erb +0 -79
- data/rails_generators/templates/app/views/re_jobs/_index_small.html.erb +0 -41
- data/rails_generators/templates/app/views/re_jobs/_show.html.erb +0 -38
- data/rails_generators/templates/app/views/re_jobs/index.html.erb +0 -14
- data/rails_generators/templates/app/views/re_jobs/index.js.erb +0 -12
- data/rails_generators/templates/app/views/re_jobs/show.html.erb +0 -14
- data/rails_generators/templates/app/views/re_jobs/show.js.erb +0 -4
- data/rails_generators/templates/app/views/re_pipeline_jobs/index.html.erb +0 -15
- data/rails_generators/templates/app/views/re_pipeline_jobs/index.js.erb +0 -12
- data/rails_generators/templates/app/views/re_pipeline_rules/_change.html.erb +0 -57
- data/rails_generators/templates/app/views/re_pipeline_rules/_edit.html.erb +0 -16
- data/rails_generators/templates/app/views/re_pipeline_rules/_empty.html.erb +0 -12
- data/rails_generators/templates/app/views/re_pipeline_rules/_empty.js.erb +0 -7
- data/rails_generators/templates/app/views/re_pipeline_rules/_help.html.erb +0 -13
- data/rails_generators/templates/app/views/re_pipeline_rules/_menu.html.erb +0 -37
- data/rails_generators/templates/app/views/re_pipeline_rules/_show.html.erb +0 -44
- data/rails_generators/templates/app/views/re_pipeline_rules/destroy.js.erb +0 -14
- data/rails_generators/templates/app/views/re_pipeline_rules/edit.html.erb +0 -12
- data/rails_generators/templates/app/views/re_pipeline_rules/edit.js.erb +0 -8
- data/rails_generators/templates/app/views/re_pipeline_rules/error.html.erb +0 -12
- data/rails_generators/templates/app/views/re_pipeline_rules/error.js.erb +0 -7
- data/rails_generators/templates/app/views/re_pipeline_rules/help.html.erb +0 -12
- data/rails_generators/templates/app/views/re_pipeline_rules/help.js.erb +0 -4
- data/rails_generators/templates/app/views/re_pipeline_rules/new.html.erb +0 -15
- data/rails_generators/templates/app/views/re_pipeline_rules/update.js.erb +0 -21
- data/rails_generators/templates/app/views/re_pipelines/_change.html.erb +0 -48
- data/rails_generators/templates/app/views/re_pipelines/_change_actions.html.erb +0 -34
- data/rails_generators/templates/app/views/re_pipelines/_confirm.html.erb +0 -39
- data/rails_generators/templates/app/views/re_pipelines/_edit.html.erb +0 -20
- data/rails_generators/templates/app/views/re_pipelines/_empty.html.erb +0 -13
- data/rails_generators/templates/app/views/re_pipelines/_index.html.erb +0 -64
- data/rails_generators/templates/app/views/re_pipelines/_new.html.erb +0 -18
- data/rails_generators/templates/app/views/re_pipelines/_show.html.erb +0 -36
- data/rails_generators/templates/app/views/re_pipelines/change.html.erb +0 -37
- data/rails_generators/templates/app/views/re_pipelines/create.js.erb +0 -9
- data/rails_generators/templates/app/views/re_pipelines/edit.html.erb +0 -12
- data/rails_generators/templates/app/views/re_pipelines/edit.js.erb +0 -8
- data/rails_generators/templates/app/views/re_pipelines/index.html.erb +0 -61
- data/rails_generators/templates/app/views/re_pipelines/index.js.erb +0 -18
- data/rails_generators/templates/app/views/re_pipelines/new.html.erb +0 -9
- data/rails_generators/templates/app/views/re_pipelines/new.js.erb +0 -5
- data/rails_generators/templates/app/views/re_pipelines/show.html.erb +0 -39
- data/rails_generators/templates/app/views/re_pipelines/update.js.erb +0 -14
- data/rails_generators/templates/app/views/re_rule_definitions/complex_rule/_edit.html.erb +0 -7
- data/rails_generators/templates/app/views/re_rule_definitions/complex_rule/_new.html.erb +0 -7
- data/rails_generators/templates/app/views/re_rule_definitions/complex_rule/_script.html.erb +0 -26
- data/rails_generators/templates/app/views/re_rule_definitions/simple_rule/_edit.html.erb +0 -1
- data/rails_generators/templates/app/views/re_rule_definitions/simple_rule/_new.html.erb +0 -1
- data/rails_generators/templates/db/migrate/20100308225008_create_re_pipelines.rb +0 -77
- data/rails_generators/templates/features/support/blueprint_re_pipelines.rb +0 -20
- data/rails_generators/templates/public/javascripts/re_job_index.js +0 -75
- data/rails_generators/templates/public/javascripts/re_pipeline_change.js +0 -194
- data/rails_generators/templates/public/javascripts/re_pipeline_index.js +0 -40
- data/rails_generators/templates/public/javascripts/re_pipeline_index_jobs.js +0 -10
- data/rails_generators/templates/public/javascripts/re_pipeline_new.js +0 -30
- data/rails_generators/templates/public/javascripts/re_pipeline_show_jobs.js +0 -11
- data/rails_generators/templates/public/stylesheets/re_view.css +0 -120
- data/rails_generators/templates/public/stylesheets/re_view_box.css +0 -119
- data/rails_generators/templates/public/stylesheets/re_view_box/accept.png +0 -0
- data/rails_generators/templates/public/stylesheets/re_view_box/exclamation.png +0 -0
- data/rails_generators/templates/public/stylesheets/re_view_box/shadowbox.jpg +0 -0
- data/rails_generators/templates/public/stylesheets/re_view_button.css +0 -118
- data/rails_generators/templates/public/stylesheets/re_view_error.css +0 -61
- data/rails_generators/templates/public/stylesheets/re_view_form.css +0 -121
- data/rails_generators/templates/public/stylesheets/re_view_navigate.css +0 -46
- data/rails_generators/templates/public/stylesheets/re_view_table.css +0 -137
- data/rails_generators/templates/public/stylesheets/rules_engine.css +0 -520
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/error-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/info-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/list-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/list-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/list-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/list-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/next-disabled-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/next-disabled-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/next-disabled-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/next-enabled-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/next-enabled-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/next-enabled-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/prev-disabled-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/prev-disabled-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/prev-disabled-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/prev-enabled-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/prev-enabled-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/prev-enabled-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_job/success-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/activate-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/activate-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/activate-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/activate-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/alert-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/alert-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/change-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/change-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/change-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/changed-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/changed-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/changed-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/changed-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/current-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/deactivate-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/deactivate-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/deactivate-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/deactivate-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/destroy-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/destroy-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/destroy-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/draft-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/draft-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/draft-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/edit-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/edit-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/edit-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/edit-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/list-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/list-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/list-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/list-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/list-down.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/list-right.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/new-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/new-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/new-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/new-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/revert-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/revert-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/revert-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/show-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/show-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/show-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/show-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/verify-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/verify-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/verify-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_pipeline/verify-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/destroy-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/destroy-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/destroy-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/destroy-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/edit-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/edit-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/edit-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/edit-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-down-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-down-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-down-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-down-off-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-down-off-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-down-off-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-up-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-up-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-up-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-up-off-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-up-off-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/move-up-off-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/next-change-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/next-change-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/next-change-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/next-show-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/next-show-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/next-show-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/start-pipeline-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/stop-failure-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/stop-failure-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/stop-success-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/stop-success-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/valid-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/valid-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/valid-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/valid-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/verify-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/verify-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/verify-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule/verify-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/add-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/add-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/add-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/help-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/help-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/help-48.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/list-down.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/list-right.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/new-14.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/new-18.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/new-25.png +0 -0
- data/rails_generators/templates/public/stylesheets/rules_engine/re_rule_class/new-48.png +0 -0
- data/rails_generators/templates/spec/controllers/re_jobs_controller_spec.rb +0 -50
- data/rails_generators/templates/spec/controllers/re_pipeline_jobs_controller_spec.rb +0 -37
- data/rails_generators/templates/spec/controllers/re_pipeline_rules_controller_spec.rb +0 -390
- data/rails_generators/templates/spec/controllers/re_pipelines_controller_spec.rb +0 -497
- data/rails_generators/templates/spec/helpers/re_pipeline_helper_spec.rb +0 -29
- data/rails_generators/templates/spec/lib/rules/complex_rule_spec.rb +0 -336
- data/rails_generators/templates/spec/lib/rules/simple_rule_spec.rb +0 -171
- data/rails_generators/templates/spec/models/re_job_audit_spec.rb +0 -23
- data/rails_generators/templates/spec/models/re_job_spec.rb +0 -163
- data/rails_generators/templates/spec/models/re_pipeline_activated_observer_spec.rb +0 -28
- data/rails_generators/templates/spec/models/re_pipeline_activated_spec.rb +0 -71
- data/rails_generators/templates/spec/models/re_pipeline_base_spec.rb +0 -164
- data/rails_generators/templates/spec/models/re_pipeline_spec.rb +0 -198
- data/spec/rules_engine/job_spec.rb +0 -323
@@ -0,0 +1,131 @@
|
|
1
|
+
class RePlansController < ApplicationController
|
2
|
+
helper :rules_engine
|
3
|
+
layout 'rules_engine'
|
4
|
+
|
5
|
+
# before_filter :login_required
|
6
|
+
before_filter :rules_engine_editor_access_required, :only => [:new, :create, :edit, :update, :destroy, :change, :publish, :revert]
|
7
|
+
before_filter :rules_engine_reader_access_required, :only => [:index, :show, :preview, :re_process]
|
8
|
+
|
9
|
+
before_filter :only => [:show, :edit, :update, :destroy, :change, :preview, :publish, :revert, :re_process] do |controller|
|
10
|
+
controller.re_load_model :re_plan
|
11
|
+
end
|
12
|
+
|
13
|
+
def index
|
14
|
+
klass = RePlan
|
15
|
+
klass = klass.order_title
|
16
|
+
@re_plans = klass.find(:all)
|
17
|
+
end
|
18
|
+
|
19
|
+
def show
|
20
|
+
end
|
21
|
+
|
22
|
+
def new
|
23
|
+
@re_plan = RePlan.new
|
24
|
+
end
|
25
|
+
|
26
|
+
def create
|
27
|
+
@re_plan = RePlan.new(params[:re_plan])
|
28
|
+
|
29
|
+
if @re_plan.save
|
30
|
+
flash[:success] = 'Plan Created.'
|
31
|
+
|
32
|
+
respond_to do |format|
|
33
|
+
format.html do
|
34
|
+
redirect_to(re_plans_path)
|
35
|
+
end
|
36
|
+
format.js do
|
37
|
+
render :action => "create"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
else
|
41
|
+
render :action => "new"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def edit
|
46
|
+
end
|
47
|
+
|
48
|
+
def update
|
49
|
+
update_params = params[:re_plan] || {}
|
50
|
+
@re_plan.attributes = update_params.except(:code)
|
51
|
+
if @re_plan.save
|
52
|
+
flash[:success] = 'Plan Updated.'
|
53
|
+
|
54
|
+
respond_to do |format|
|
55
|
+
format.html do
|
56
|
+
redirect_to(change_re_plan_path(@re_plan))
|
57
|
+
end
|
58
|
+
format.js do
|
59
|
+
render :action => "update"
|
60
|
+
end
|
61
|
+
end
|
62
|
+
else
|
63
|
+
render :action => "edit"
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def destroy
|
68
|
+
RulesEngine::Publish.publisher.remove(@re_plan.code)
|
69
|
+
@re_plan.destroy
|
70
|
+
flash[:success] = 'Plan Deleted.'
|
71
|
+
|
72
|
+
respond_to do |format|
|
73
|
+
format.html do
|
74
|
+
redirect_to(re_plans_path)
|
75
|
+
end
|
76
|
+
format.js do
|
77
|
+
render :inline => "window.location.href = '#{re_plans_path}';"
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def change
|
83
|
+
end
|
84
|
+
|
85
|
+
def preview
|
86
|
+
end
|
87
|
+
|
88
|
+
def publish
|
89
|
+
if @re_plan.plan_error || params['tag'].blank?
|
90
|
+
flash[:error] = 'Cannot Publish Plan.'
|
91
|
+
else
|
92
|
+
@re_plan.plan_version = RulesEngine::Publish.publisher.publish(@re_plan.code, params['tag'], @re_plan.publish)
|
93
|
+
@re_plan.plan_status = RePlan::PLAN_STATUS_PUBLISHED
|
94
|
+
@re_plan.save
|
95
|
+
flash[:success] = 'Plan Published.'
|
96
|
+
end
|
97
|
+
|
98
|
+
respond_to do |format|
|
99
|
+
format.html do
|
100
|
+
redirect_to(change_re_plan_path(@re_plan))
|
101
|
+
end
|
102
|
+
format.js do
|
103
|
+
render :action => "update"
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
def revert
|
109
|
+
plan = RulesEngine::Publish.publisher.get(@re_plan.code)
|
110
|
+
if plan.nil?
|
111
|
+
flash[:error] = 'Cannot Find Published Plan.'
|
112
|
+
else
|
113
|
+
@re_plan.revert!(plan)
|
114
|
+
@re_plan.save!
|
115
|
+
flash[:success] = 'Changes Discarded.'
|
116
|
+
end
|
117
|
+
|
118
|
+
respond_to do |format|
|
119
|
+
format.html do
|
120
|
+
redirect_to(change_re_plan_path(@re_plan))
|
121
|
+
end
|
122
|
+
format.js do
|
123
|
+
render :action => "update"
|
124
|
+
end
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
def re_process
|
129
|
+
@re_processes = RulesEngine::Process.runner.history(@re_plan.code, :page => params[:page] || 1, :per_page => 5)
|
130
|
+
end
|
131
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class ReProcessesController < ApplicationController
|
2
|
+
helper :rules_engine
|
3
|
+
layout 'rules_engine'
|
4
|
+
|
5
|
+
# before_filter :login_required
|
6
|
+
before_filter :rules_engine_reader_access_required, :only => [:index, :show]
|
7
|
+
|
8
|
+
def index
|
9
|
+
@re_processes = RulesEngine::Process.runner.history(nil, :page => params[:page] || 1, :per_page => 5)
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@re_audits = RulesEngine::Process.auditor.history(params[:id])
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class RePublicationsController < ApplicationController
|
2
|
+
helper :rules_engine
|
3
|
+
layout 'rules_engine'
|
4
|
+
|
5
|
+
# before_filter :login_required
|
6
|
+
before_filter :rules_engine_reader_access_required, :only => [:show]
|
7
|
+
|
8
|
+
before_filter :only => [:show] do |controller|
|
9
|
+
controller.re_load_model :re_plan
|
10
|
+
end
|
11
|
+
|
12
|
+
def show
|
13
|
+
@re_publications = RulesEngine::Publish.publisher.history(@re_plan.code, :page => params[:page] || 1, :per_page => 5)
|
14
|
+
end
|
15
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class
|
2
|
-
helper :
|
1
|
+
class ReWorkflowRulesController < ApplicationController
|
2
|
+
helper :rules_engine
|
3
3
|
layout 'rules_engine'
|
4
4
|
|
5
5
|
# before_filter :login_required
|
@@ -7,11 +7,11 @@ class RePipelineRulesController < ApplicationController
|
|
7
7
|
before_filter :rules_engine_reader_access_required, :only => [:help, :error]
|
8
8
|
|
9
9
|
before_filter do |controller|
|
10
|
-
controller.re_load_model :
|
10
|
+
controller.re_load_model :re_workflow, {:param_id => :re_workflow_id, :redirect_path => :re_workflows_path}
|
11
11
|
end
|
12
12
|
|
13
13
|
before_filter :only => [:edit, :update, :destroy, :move_up, :move_down] do |controller|
|
14
|
-
controller.re_load_model :re_rule, {:param_id => :id, :parents => [:
|
14
|
+
controller.re_load_model :re_rule, {:param_id => :id, :parents => [:re_workflow], :redirect_path => :change_re_workflow_path}
|
15
15
|
end
|
16
16
|
|
17
17
|
def help
|
@@ -28,7 +28,7 @@ class RePipelineRulesController < ApplicationController
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def new
|
31
|
-
@re_rule = ReRule.new(:
|
31
|
+
@re_rule = ReRule.new(:re_workflow_id => @re_workflow.id, :rule_class_name => params[:rule_class_name])
|
32
32
|
if @re_rule.rule.nil?
|
33
33
|
render :action => "error"
|
34
34
|
return
|
@@ -38,7 +38,7 @@ class RePipelineRulesController < ApplicationController
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def create
|
41
|
-
@re_rule = ReRule.new(:
|
41
|
+
@re_rule = ReRule.new(:re_workflow_id => @re_workflow.id, :rule_class_name => params[:rule_class_name])
|
42
42
|
if @re_rule.rule.nil?
|
43
43
|
render :action => "error"
|
44
44
|
return
|
@@ -50,7 +50,7 @@ class RePipelineRulesController < ApplicationController
|
|
50
50
|
|
51
51
|
respond_to do |format|
|
52
52
|
format.html do
|
53
|
-
redirect_to(
|
53
|
+
redirect_to(change_re_workflow_path(@re_workflow))
|
54
54
|
end
|
55
55
|
format.js do
|
56
56
|
render :action => "update"
|
@@ -82,7 +82,7 @@ class RePipelineRulesController < ApplicationController
|
|
82
82
|
|
83
83
|
respond_to do |format|
|
84
84
|
format.html do
|
85
|
-
redirect_to(
|
85
|
+
redirect_to(change_re_workflow_path(@re_workflow))
|
86
86
|
end
|
87
87
|
format.js do
|
88
88
|
render :action => "update"
|
@@ -99,10 +99,10 @@ class RePipelineRulesController < ApplicationController
|
|
99
99
|
|
100
100
|
respond_to do |format|
|
101
101
|
format.html do
|
102
|
-
redirect_to(
|
102
|
+
redirect_to(change_re_workflow_path(@re_workflow))
|
103
103
|
end
|
104
104
|
format.js do
|
105
|
-
render :action => "
|
105
|
+
render :action => "update"
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
@@ -114,7 +114,7 @@ class RePipelineRulesController < ApplicationController
|
|
114
114
|
|
115
115
|
respond_to do |format|
|
116
116
|
format.html do
|
117
|
-
redirect_to(
|
117
|
+
redirect_to(change_re_workflow_path(@re_workflow))
|
118
118
|
end
|
119
119
|
format.js do
|
120
120
|
render :action => "update"
|
@@ -128,7 +128,7 @@ class RePipelineRulesController < ApplicationController
|
|
128
128
|
|
129
129
|
respond_to do |format|
|
130
130
|
format.html do
|
131
|
-
redirect_to(
|
131
|
+
redirect_to(change_re_workflow_path(@re_workflow))
|
132
132
|
end
|
133
133
|
format.js do
|
134
134
|
render :action => "update"
|
@@ -0,0 +1,96 @@
|
|
1
|
+
class ReWorkflowsController < ApplicationController
|
2
|
+
helper :rules_engine
|
3
|
+
layout 'rules_engine'
|
4
|
+
|
5
|
+
# before_filter :login_required
|
6
|
+
before_filter :rules_engine_editor_access_required, :only => [:new, :create, :edit, :update, :destroy, :change]
|
7
|
+
before_filter :rules_engine_reader_access_required, :only => [:index, :show, :preview, :plan, :add]
|
8
|
+
|
9
|
+
before_filter :only => [:show, :edit, :update, :destroy, :change, :preview, :plan] do |controller|
|
10
|
+
controller.re_load_model :re_workflow
|
11
|
+
end
|
12
|
+
|
13
|
+
def index
|
14
|
+
@re_workflows = ReWorkflow.order_title.find(:all)
|
15
|
+
end
|
16
|
+
|
17
|
+
def show
|
18
|
+
end
|
19
|
+
|
20
|
+
def new
|
21
|
+
@re_workflow = ReWorkflow.new
|
22
|
+
end
|
23
|
+
|
24
|
+
def create
|
25
|
+
@re_workflow = ReWorkflow.new(params[:re_workflow])
|
26
|
+
|
27
|
+
if @re_workflow.save
|
28
|
+
flash[:success] = 'Workflow Created.'
|
29
|
+
|
30
|
+
respond_to do |format|
|
31
|
+
format.html do
|
32
|
+
redirect_to(change_re_workflow_path(@re_workflow))
|
33
|
+
end
|
34
|
+
format.js do
|
35
|
+
render :action => "create"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
else
|
39
|
+
render :action => "new"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def edit
|
44
|
+
end
|
45
|
+
|
46
|
+
def update
|
47
|
+
update_params = params[:re_workflow] || {}
|
48
|
+
@re_workflow.attributes = update_params.except(:code)
|
49
|
+
if @re_workflow.save
|
50
|
+
flash[:success] = 'Workflow Updated.'
|
51
|
+
|
52
|
+
respond_to do |format|
|
53
|
+
format.html do
|
54
|
+
redirect_to(change_re_workflow_path(@re_workflow))
|
55
|
+
end
|
56
|
+
format.js do
|
57
|
+
render :action => "update"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
else
|
61
|
+
render :action => "edit"
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def destroy
|
66
|
+
@re_workflow.destroy
|
67
|
+
flash[:success] = 'Workflow Removed.'
|
68
|
+
|
69
|
+
respond_to do |format|
|
70
|
+
format.html do
|
71
|
+
redirect_to(re_workflows_path)
|
72
|
+
end
|
73
|
+
format.js do
|
74
|
+
render :inline => "window.location.href = '#{re_workflows_path}';"
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
def change
|
80
|
+
RulesEngine::Discovery.discover!
|
81
|
+
end
|
82
|
+
|
83
|
+
def preview
|
84
|
+
end
|
85
|
+
|
86
|
+
def plan
|
87
|
+
klass = RePlanWorkflow
|
88
|
+
klass = klass.order_plan_title
|
89
|
+
klass = klass.by_workflow_id(@re_workflow.id)
|
90
|
+
@re_plan_workflows = klass.paginate(:include => :re_plan, :page => params[:page] || 1, :per_page => 10)
|
91
|
+
end
|
92
|
+
|
93
|
+
def add
|
94
|
+
@re_workflows = ReWorkflow.order_title.find(:all)
|
95
|
+
end
|
96
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module RulesEngineHelper
|
2
|
+
|
3
|
+
def re_plan_status re_plan
|
4
|
+
case re_plan.plan_status
|
5
|
+
when RePlan::PLAN_STATUS_PUBLISHED
|
6
|
+
'published'
|
7
|
+
when RePlan::PLAN_STATUS_CHANGED
|
8
|
+
'changed'
|
9
|
+
else # when RePlan::PLAN_STATUS_DRAFT
|
10
|
+
'draft'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def re_plan_version re_plan
|
15
|
+
return '' if re_plan.nil? || re_plan.plan_version.nil?
|
16
|
+
"Ver.#{re_plan.plan_version}"
|
17
|
+
end
|
18
|
+
|
19
|
+
def re_process_status process_status
|
20
|
+
case process_status.to_i
|
21
|
+
when RulesEngine::Process::PROCESS_STATUS_RUNNING
|
22
|
+
'running'
|
23
|
+
when RulesEngine::Process::PROCESS_STATUS_SUCCESS
|
24
|
+
'success'
|
25
|
+
when RulesEngine::Process::PROCESS_STATUS_FAILURE
|
26
|
+
'error'
|
27
|
+
else # RulesEngine::Process::PROCESS_STATUS_NONE
|
28
|
+
'info'
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def re_audit_status audit_status
|
33
|
+
case audit_status.to_i
|
34
|
+
when RulesEngine::Process::AUDIT_SUCCESS
|
35
|
+
'success'
|
36
|
+
when RulesEngine::Process::AUDIT_FAILURE
|
37
|
+
'error'
|
38
|
+
else # RulesEngine::Process::AUDIT_INFO
|
39
|
+
'info'
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,126 @@
|
|
1
|
+
class RePlan < ActiveRecord::Base
|
2
|
+
has_many :re_plan_workflows, :dependent => :destroy
|
3
|
+
has_many :re_workflows, :through => :re_plan_workflows, :order => 're_plan_workflows.position'
|
4
|
+
|
5
|
+
PLAN_STATUS_DRAFT = 0
|
6
|
+
PLAN_STATUS_CHANGED = 1
|
7
|
+
PLAN_STATUS_PUBLISHED = 2
|
8
|
+
PLAN_STATUS_REVERTED = 3
|
9
|
+
|
10
|
+
validates_presence_of :code
|
11
|
+
validates_presence_of :title
|
12
|
+
validates_uniqueness_of :code, :case_sensitive => false, :message=>"alread taken."
|
13
|
+
|
14
|
+
named_scope :order_code, :order => 'code ASC'
|
15
|
+
named_scope :order_title, :order => 'title ASC'
|
16
|
+
|
17
|
+
before_create :before_create_plan
|
18
|
+
before_save :before_save_plan
|
19
|
+
|
20
|
+
def before_create_plan
|
21
|
+
self.plan_status = PLAN_STATUS_DRAFT
|
22
|
+
end
|
23
|
+
|
24
|
+
def before_save_plan
|
25
|
+
if (plan_status == PLAN_STATUS_REVERTED)
|
26
|
+
self.plan_status = PLAN_STATUS_PUBLISHED
|
27
|
+
elsif changes.detect { |change| !ignore_attributes.include?(change[0])}
|
28
|
+
self.changed!(false)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def code=(new_code)
|
33
|
+
self[:code] = new_code.strip.downcase.gsub(/[^a-zA-Z0-9]+/i, '_') if new_code && new_record?
|
34
|
+
end
|
35
|
+
|
36
|
+
def publish
|
37
|
+
data = {
|
38
|
+
"code" => code,
|
39
|
+
"title" => title,
|
40
|
+
"description" => description,
|
41
|
+
"first_workflow" => re_workflows.empty? ? '' : re_workflows[0].code,
|
42
|
+
}
|
43
|
+
re_workflows.each_with_index do | re_workflow, index |
|
44
|
+
data["workflow_#{re_workflow.code}"] = re_workflow.publish
|
45
|
+
|
46
|
+
if re_workflows[-1] == re_workflow
|
47
|
+
data["workflow_#{re_workflow.code}"]["next_workflow"] = ''
|
48
|
+
else
|
49
|
+
data["workflow_#{re_workflow.code}"]["next_workflow"] = re_workflows[index+1].code
|
50
|
+
end
|
51
|
+
end
|
52
|
+
data
|
53
|
+
end
|
54
|
+
|
55
|
+
def revert!(rule_data)
|
56
|
+
self.plan_status = RePlan::PLAN_STATUS_REVERTED
|
57
|
+
self.code = rule_data["code"]
|
58
|
+
self.title = rule_data["title"]
|
59
|
+
self.description = rule_data["description"]
|
60
|
+
|
61
|
+
orig_re_workflows = []
|
62
|
+
workflow_data = rule_data["workflow_#{rule_data["first_workflow"]}"]
|
63
|
+
while (workflow_data && orig_re_workflows.length < 500)
|
64
|
+
workflow_code = workflow_data["code"]
|
65
|
+
re_workflow = ReWorkflow.find_by_code(workflow_code) || ReWorkflow.new
|
66
|
+
re_workflow.revert!(workflow_data)
|
67
|
+
orig_re_workflows << re_workflow
|
68
|
+
|
69
|
+
next_workflow = workflow_data["next_workflow"]
|
70
|
+
workflow_data = next_workflow.blank? ? nil : rule_data["workflow_#{next_workflow}"]
|
71
|
+
end
|
72
|
+
|
73
|
+
self.re_workflows = orig_re_workflows
|
74
|
+
self
|
75
|
+
end
|
76
|
+
|
77
|
+
def add_workflow re_workflow
|
78
|
+
return false if self.re_workflows.include?(re_workflow)
|
79
|
+
self.re_workflows << re_workflow
|
80
|
+
changed!
|
81
|
+
true
|
82
|
+
end
|
83
|
+
|
84
|
+
def remove_workflow re_workflow
|
85
|
+
return false unless self.re_workflows.include?(re_workflow)
|
86
|
+
self.re_workflows.delete(re_workflow)
|
87
|
+
changed!
|
88
|
+
true
|
89
|
+
end
|
90
|
+
|
91
|
+
|
92
|
+
def default_workflow= re_workflow
|
93
|
+
return if self.re_workflows.empty? || self.re_workflows[0] == re_workflow
|
94
|
+
re_plan_workflow = re_plan_workflows.detect { | re_plan_workflow | re_plan_workflow.re_workflow_id == re_workflow.id}
|
95
|
+
return unless re_plan_workflow
|
96
|
+
re_plan_workflow.move_to_top
|
97
|
+
changed!
|
98
|
+
end
|
99
|
+
|
100
|
+
def default_workflow
|
101
|
+
self.re_workflows.empty? ? nil : self.re_workflows[0]
|
102
|
+
end
|
103
|
+
|
104
|
+
def plan_error
|
105
|
+
return 'workflows req\'d' if re_workflows.empty?
|
106
|
+
return 'workflow error' if re_workflows.any? { | re_workflow | re_workflow.workflow_error }
|
107
|
+
nil
|
108
|
+
end
|
109
|
+
|
110
|
+
def published!
|
111
|
+
self.plan_status = PLAN_STATUS_PUBLISHED
|
112
|
+
self.save!
|
113
|
+
end
|
114
|
+
|
115
|
+
def changed!(update = true)
|
116
|
+
if self.plan_status == PLAN_STATUS_PUBLISHED
|
117
|
+
self.plan_status = PLAN_STATUS_CHANGED
|
118
|
+
self.save! if update
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
protected
|
123
|
+
def ignore_attributes
|
124
|
+
[self.class.primary_key, self.class.inheritance_column, "plan_status", "plan_version", "created_at", "updated_at"]
|
125
|
+
end
|
126
|
+
end
|