Skip to content

Commit

Permalink
Remove Ruote and Ruote-kit
Browse files Browse the repository at this point in the history
gem, dependencies, specific libs and code, references, etc
  • Loading branch information
northox committed May 13, 2017
1 parent f0a8846 commit 8f9e802
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 259 deletions.
5 changes: 2 additions & 3 deletions active-trail.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,13 @@ Gem::Specification.new do |s|
s.authors = ['Danny Fullerton']
s.email = ['[email protected]']
s.homepage = 'https://github.com/northox/active-trail'
s.summary = %q{Ruote-kit for Rails missing part.}
s.description = %q{Represent complete Ruote's workflow using standard rails facilities, e.g. render, partials, etc.}
s.summary = %q{What ActiveRecord is to database but for Flor workflow engine.}
s.description = %q{Represent complete Flor workflows using standard rails facilities, e.g. render, partials, etc.}

s.files = Dir["{app,config,lib}/**/*"] + %w(LICENSE Rakefile README.md)
s.test_files = Dir["test/**/*"]

s.add_runtime_dependency 'rails', '>= 4.1.0'
s.add_runtime_dependency 'ruote', '>= 2.3.0'
s.add_runtime_dependency 'protected_attributes', '>= 1.0.7' # TODO switch to strong_parameters
s.add_runtime_dependency 'active_attr'

Expand Down
16 changes: 1 addition & 15 deletions app/models/active_trail/active_record/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def proceed #TODO should be atomic
receiver.proceed(merged_wi)

# TODO this sucks ass!
# The trail seems to be written each time ruote 'steps' (each 0.8s).
# The trail seems to be written each time the workflow engine 'steps' (each 0.8s).
# Food for thought - If nothing better: Could we emulate atomicity by simply increasing the expid?
sleep(1)
end
Expand Down Expand Up @@ -137,20 +137,6 @@ def merged_wi

end

class Receiver < Ruote::Receiver

# TODO use DelayedJob to do it safely and async
# def initialize(engine)
#
# super(engine)
# Thread.new { listen }
# end

def proceed(workitem)
reply(workitem)
end
end

class StateMachine
include Statesman::Machine
include Statesman::Events
Expand Down
2 changes: 1 addition & 1 deletion app/models/active_trail/common_mixin.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module ActiveTrail::CommonMixin

CHILDREN = 1 # Branch expressions stores children expressions in the 3rd element
CHILDREN = 1 # Where branch expressions stores children expressions
ROOT_EXPID = '0' # Root expression id - yes, it's a string (e.g. 0_1_0)
SEP = '!' # FEID's field separator
EXPID_SEP = '_' # Expression id's child separator
Expand Down
2 changes: 1 addition & 1 deletion app/models/active_trail/concurrence.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ActiveTrail
class Concurrence < BranchExpression
def spacer_template
'ruote_trail/concurrence_spacer'
'active-trail/concurrence_spacer'
end
end
end
2 changes: 1 addition & 1 deletion app/models/active_trail/trail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def self.timestamp

protected

# Insert hash in a Ruote tree based on an expression id.
# Insert hash in a workflow tree based on an expression id.
#
def self.insert_in_tree(tree, exp, fields)
t = [tree]
Expand Down
4 changes: 2 additions & 2 deletions app/models/active_trail/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def find_cnodes nid
# and returns an object with its child Expressions (either Leaves or Branches).
#
# :expid is the relative position in the Workflow
# :exp is used to navigate within Ruote's workflow internal structure
# :exp is used to navigate within the workflow internal structure
#
def branch(expid, parent_node)

Expand All @@ -229,7 +229,7 @@ def leaf(expid, exp)

# Returns proper Expression type based on its name.
#
# Anything not a Ruote Expression is considered a Participant Expression, e.g.,
# Anything not an Expression is considered a Participant Expression, e.g.,
# if == If, sequence == Sequence, admin == Participant, xyz == Participant
#
def factory(exid, era, exp)
Expand Down
8 changes: 0 additions & 8 deletions lib/active_trail/active_trail.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
require 'flor'
require 'jsonclient'

require 'ruote/observer'
require 'ruote/workitem'

# require 'active_trail/observer'
require 'active_trail/configuration'
require 'active_trail/engine'
require 'active_trail/workflow_engine'
Expand All @@ -15,12 +13,6 @@
require 'active_model/mass_assignment_security'
require 'active_model/mass_assignment_security/sanitizer'

require 'ruote/storage/fs_storage'
require 'ruote/part/smtp_participant'
require 'ruote/exp/ro_notifications'
require 'ruote/part/ssh_participant'
require 'ruote/part/dummy_rest_participant'

module ActiveTrail

NO_SUBID = 'empty_subid' # Replacement for the subid part of a FEID.
Expand Down
6 changes: 3 additions & 3 deletions lib/active_trail/workflow_engine.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module ActiveTrail
class WorkflowEngine

def self.engine() RuoteKit.engine end
# def self.engine() RuoteKit.engine end # TODO

def self.process(exid)

Expand Down Expand Up @@ -62,12 +62,12 @@ def self.launch(pdef, fields={}, vars={}, root_stash=nil)

def self.register_participant(regex, handler)

engine.register(regex, handler)
# engine.register(regex, handler) # TODO
end

def self.register_participant_list(plist)

engine.participant_list= plist
# engine.participant_list= plist # TODO
end

class LaunchError < Exception
Expand Down
76 changes: 0 additions & 76 deletions lib/ruote/active_trail/observer.rb

This file was deleted.

32 changes: 0 additions & 32 deletions lib/ruote/exp/ro_notifications.rb

This file was deleted.

46 changes: 0 additions & 46 deletions lib/ruote/part/dummy_rest_participant.rb

This file was deleted.

68 changes: 0 additions & 68 deletions lib/ruote/part/ssh_participant.rb

This file was deleted.

3 changes: 0 additions & 3 deletions script/rails
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.

ENGINE_ROOT = File.expand_path('../..', __FILE__)
ENGINE_PATH = File.expand_path('../../lib/ruote/active_trail/engine', __FILE__)

require 'rails/all'
require 'rails/engine/commands'

0 comments on commit 8f9e802

Please sign in to comment.