libis-workflow 2.0.beta.19-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +2 -0
- data/.gitignore +36 -0
- data/.travis.yml +32 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +397 -0
- data/Rakefile +7 -0
- data/lib/libis/exceptions.rb +8 -0
- data/lib/libis/workflow/action.rb +24 -0
- data/lib/libis/workflow/base/dir_item.rb +15 -0
- data/lib/libis/workflow/base/file_item.rb +82 -0
- data/lib/libis/workflow/base/job.rb +85 -0
- data/lib/libis/workflow/base/logger.rb +30 -0
- data/lib/libis/workflow/base/logging.rb +76 -0
- data/lib/libis/workflow/base/run.rb +86 -0
- data/lib/libis/workflow/base/work_item.rb +176 -0
- data/lib/libis/workflow/base/workflow.rb +153 -0
- data/lib/libis/workflow/base.rb +7 -0
- data/lib/libis/workflow/config.rb +24 -0
- data/lib/libis/workflow/dir_item.rb +12 -0
- data/lib/libis/workflow/file_item.rb +17 -0
- data/lib/libis/workflow/job.rb +26 -0
- data/lib/libis/workflow/message_registry.rb +32 -0
- data/lib/libis/workflow/run.rb +26 -0
- data/lib/libis/workflow/status.rb +83 -0
- data/lib/libis/workflow/task.rb +287 -0
- data/lib/libis/workflow/task_group.rb +62 -0
- data/lib/libis/workflow/tasks/analyzer.rb +49 -0
- data/lib/libis/workflow/version.rb +7 -0
- data/lib/libis/workflow/work_item.rb +43 -0
- data/lib/libis/workflow/worker.rb +42 -0
- data/lib/libis/workflow/workflow.rb +22 -0
- data/lib/libis/workflow.rb +40 -0
- data/lib/libis-workflow.rb +2 -0
- data/libis-workflow.gemspec +38 -0
- data/spec/items/test_dir_item.rb +15 -0
- data/spec/items/test_file_item.rb +18 -0
- data/spec/items/test_run.rb +10 -0
- data/spec/items.rb +3 -0
- data/spec/spec_helper.rb +8 -0
- data/spec/task_spec.rb +16 -0
- data/spec/tasks/camelize_name.rb +13 -0
- data/spec/tasks/checksum_tester.rb +33 -0
- data/spec/tasks/collect_files.rb +48 -0
- data/spec/workflow_spec.rb +188 -0
- metadata +196 -0
@@ -0,0 +1,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'libis/exceptions'
|
3
|
+
|
4
|
+
module Libis
|
5
|
+
module Workflow
|
6
|
+
|
7
|
+
autoload :MessageRegistry, 'libis/workflow/message_registry'
|
8
|
+
autoload :Config, 'libis/workflow/config'
|
9
|
+
|
10
|
+
module Base
|
11
|
+
autoload :WorkItem, 'libis/workflow/base/work_item'
|
12
|
+
autoload :FileItem, 'libis/workflow/base/file_item'
|
13
|
+
autoload :DirItem, 'libis/workflow/base/dir_item'
|
14
|
+
autoload :Logger, 'libis/workflow/base/logger'
|
15
|
+
autoload :Logging, 'libis/workflow/base/logging'
|
16
|
+
autoload :Job, 'libis/workflow/base/job'
|
17
|
+
autoload :Run, 'libis/workflow/base/run'
|
18
|
+
autoload :Workflow, 'libis/workflow/base/workflow'
|
19
|
+
end
|
20
|
+
|
21
|
+
autoload :Status, 'libis/workflow/status'
|
22
|
+
|
23
|
+
autoload :WorkItem, 'libis/workflow/work_item'
|
24
|
+
autoload :FileItem, 'libis/workflow/file_item'
|
25
|
+
autoload :DirItem, 'libis/workflow/dir_item'
|
26
|
+
|
27
|
+
autoload :Workflow, 'libis/workflow/workflow'
|
28
|
+
autoload :Job, 'libis/workflow/job'
|
29
|
+
autoload :Run, 'libis/workflow/run'
|
30
|
+
autoload :Task, 'libis/workflow/task'
|
31
|
+
autoload :TaskGroup, 'libis/workflow/task_group'
|
32
|
+
|
33
|
+
autoload :Worker, 'libis/workflow/worker'
|
34
|
+
|
35
|
+
def self.configure
|
36
|
+
yield Config.instance
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
4
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
+
|
6
|
+
require 'libis/workflow/version'
|
7
|
+
|
8
|
+
Gem::Specification.new do |spec|
|
9
|
+
spec.name = 'libis-workflow'
|
10
|
+
spec.version = ::Libis::Workflow::VERSION
|
11
|
+
spec.date = Date.today.to_s
|
12
|
+
|
13
|
+
spec.summary = %q{LIBIS Workflow framework.}
|
14
|
+
spec.description = %q{A simple framework to build custom task/workflow solutions.}
|
15
|
+
|
16
|
+
spec.author = 'Kris Dekeyser'
|
17
|
+
spec.email = 'kris.dekeyser@libis.be'
|
18
|
+
spec.homepage = 'https://github.com/Kris-LIBIS/workflow'
|
19
|
+
spec.license = 'MIT'
|
20
|
+
|
21
|
+
spec.platform = Gem::Platform::JAVA if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
|
22
|
+
|
23
|
+
spec.files = `git ls-files -z`.split("\x0")
|
24
|
+
spec.executables = spec.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
25
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
26
|
+
|
27
|
+
spec.require_paths = ['lib']
|
28
|
+
|
29
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
30
|
+
spec.add_development_dependency 'rake', '~> 10.3'
|
31
|
+
spec.add_development_dependency 'rspec', '~> 3.1'
|
32
|
+
spec.add_development_dependency 'simplecov', '~> 0.9'
|
33
|
+
spec.add_development_dependency 'coveralls', '~> 0.7'
|
34
|
+
|
35
|
+
spec.add_runtime_dependency 'libis-tools', '~> 0.9'
|
36
|
+
spec.add_runtime_dependency 'sidekiq', '~> 3.3'
|
37
|
+
|
38
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'libis/workflow/dir_item'
|
3
|
+
|
4
|
+
class TestDirItem < ::Libis::Workflow::DirItem
|
5
|
+
|
6
|
+
def name=(dir)
|
7
|
+
raise RuntimeError, "'#{dir}' is not a directory" unless File.directory? dir
|
8
|
+
super dir
|
9
|
+
end
|
10
|
+
|
11
|
+
def name
|
12
|
+
self.properties[:name] || super
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'libis/tools/checksum'
|
3
|
+
|
4
|
+
require 'libis/workflow/file_item'
|
5
|
+
|
6
|
+
class TestFileItem < ::Libis::Workflow::FileItem
|
7
|
+
|
8
|
+
def filename=(file)
|
9
|
+
raise RuntimeError, "'#{file}' is not a file" unless File.file? file
|
10
|
+
set_checksum :SHA256, ::Libis::Tools::Checksum.hexdigest(file, :SHA256)
|
11
|
+
super file
|
12
|
+
end
|
13
|
+
|
14
|
+
def name
|
15
|
+
self.properties[:name] || super
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
data/spec/items.rb
ADDED
data/spec/spec_helper.rb
ADDED
data/spec/task_spec.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
require 'libis/workflow/task'
|
4
|
+
|
5
|
+
describe 'Task' do
|
6
|
+
|
7
|
+
it 'should create a default task' do
|
8
|
+
|
9
|
+
task = ::Libis::Workflow::Task.new nil
|
10
|
+
|
11
|
+
expect(task.parent).to eq nil
|
12
|
+
expect(task.name).to eq 'Task'
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'backports/rails/string'
|
3
|
+
|
4
|
+
require 'libis/workflow'
|
5
|
+
|
6
|
+
class CamelizeName < ::Libis::Workflow::Task
|
7
|
+
|
8
|
+
def process(item)
|
9
|
+
return unless (item.is_a?(TestFileItem) || item.is_a?(TestDirItem))
|
10
|
+
item.properties[:name] = item.name.camelize
|
11
|
+
end
|
12
|
+
|
13
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'libis/tools/checksum'
|
3
|
+
|
4
|
+
require 'libis/exceptions'
|
5
|
+
require 'libis/workflow'
|
6
|
+
|
7
|
+
class ChecksumTester < ::Libis::Workflow::Task
|
8
|
+
|
9
|
+
parameter checksum_type: nil,
|
10
|
+
description: 'Checksum type to use.',
|
11
|
+
constraint: ::Libis::Tools::Checksum::CHECKSUM_TYPES.map {|x| x.to_s}
|
12
|
+
|
13
|
+
def process(item)
|
14
|
+
return unless item.is_a? TestFileItem
|
15
|
+
|
16
|
+
checksum_type = parameter(:checksum_type)
|
17
|
+
|
18
|
+
if checksum_type.nil?
|
19
|
+
::Libis::Tools::Checksum::CHECKSUM_TYPES.each do |x|
|
20
|
+
test_checksum(item, x) if item.checksum(x)
|
21
|
+
end
|
22
|
+
else
|
23
|
+
test_checksum(item, checksum_type)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def test_checksum(item, checksum_type)
|
28
|
+
checksum = ::Libis::Tools::Checksum.hexdigest(item.fullpath, checksum_type.to_sym)
|
29
|
+
return if item.checksum(checksum_type) == checksum
|
30
|
+
raise ::Libis::WorkflowError, "Checksum test #{checksum_type} failed for #{item.filepath}"
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'libis/exceptions'
|
3
|
+
|
4
|
+
require_relative '../items'
|
5
|
+
|
6
|
+
class CollectFiles < ::Libis::Workflow::Task
|
7
|
+
|
8
|
+
parameter location: '.',
|
9
|
+
description: 'Dir location to start scanning for files.'
|
10
|
+
parameter subdirs: false,
|
11
|
+
description: 'Look for files in subdirs too.'
|
12
|
+
parameter selection: nil,
|
13
|
+
description: 'Only select files that match the given regular expression. Ignored if empty.'
|
14
|
+
|
15
|
+
def process(item)
|
16
|
+
if item.is_a? TestRun
|
17
|
+
add_item(item, parameter(:location))
|
18
|
+
elsif item.is_a? TestDirItem
|
19
|
+
collect_files(item, item.fullpath)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def collect_files(item, dir)
|
24
|
+
glob_string = dir
|
25
|
+
glob_string = File.join(glob_string, '**') if parameter(:subdirs)
|
26
|
+
glob_string = File.join(glob_string, '*')
|
27
|
+
|
28
|
+
Dir.glob(glob_string).select do |x|
|
29
|
+
parameter(:selection) && !parameter(:selection).empty? ? x =~ Regexp.new(parameter(:selection)) : true
|
30
|
+
end.sort.each do |file|
|
31
|
+
next if %w'. ..'.include? file
|
32
|
+
add_item(item, file)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def add_item(item, file)
|
37
|
+
child = if File.file?(file)
|
38
|
+
TestFileItem.new
|
39
|
+
elsif File.directory?(file)
|
40
|
+
TestDirItem.new
|
41
|
+
else
|
42
|
+
Item.new
|
43
|
+
end
|
44
|
+
child.filename = file
|
45
|
+
item << child
|
46
|
+
end
|
47
|
+
|
48
|
+
end
|
@@ -0,0 +1,188 @@
|
|
1
|
+
require_relative 'spec_helper'
|
2
|
+
|
3
|
+
require 'stringio'
|
4
|
+
|
5
|
+
describe 'TestWorkflow' do
|
6
|
+
|
7
|
+
let(:basedir) { File.absolute_path File.join(File.dirname(__FILE__)) }
|
8
|
+
let(:dirname) { File.join(basedir, 'items') }
|
9
|
+
|
10
|
+
let(:logoutput) { StringIO.new }
|
11
|
+
|
12
|
+
let(:workflow) {
|
13
|
+
# noinspection RubyResolve
|
14
|
+
::Libis::Workflow.configure do |cfg|
|
15
|
+
cfg.itemdir = dirname
|
16
|
+
cfg.taskdir = File.join(basedir, 'tasks')
|
17
|
+
cfg.workdir = File.join(basedir, 'work')
|
18
|
+
cfg.logger = Logger.new logoutput
|
19
|
+
cfg.logger.level = Logger::DEBUG
|
20
|
+
end
|
21
|
+
|
22
|
+
workflow = ::Libis::Workflow::Workflow.new
|
23
|
+
workflow.configure(
|
24
|
+
name: 'TestWorkflow',
|
25
|
+
description: 'Workflow for testing',
|
26
|
+
tasks: [
|
27
|
+
{class: 'CollectFiles', recursive: true},
|
28
|
+
{
|
29
|
+
name: 'ProcessFiles', recursive: false,
|
30
|
+
tasks: [
|
31
|
+
{class: 'ChecksumTester', recursive: true},
|
32
|
+
{class: 'CamelizeName', recursive: true}
|
33
|
+
]
|
34
|
+
}
|
35
|
+
],
|
36
|
+
input: {
|
37
|
+
dirname: {default: '.', propagate_to: 'CollectFiles#location'},
|
38
|
+
checksum_type: {default: 'SHA1', propagate_to: 'ChecksumTester'}
|
39
|
+
}
|
40
|
+
)
|
41
|
+
workflow
|
42
|
+
}
|
43
|
+
|
44
|
+
let(:job) {
|
45
|
+
job = ::Libis::Workflow::Job.new
|
46
|
+
job.configure(
|
47
|
+
name: 'TestJob',
|
48
|
+
description: 'Job for testing',
|
49
|
+
workflow: workflow,
|
50
|
+
run_object: 'TestRun',
|
51
|
+
input: {dirname: dirname, checksum_type: 'SHA256'},
|
52
|
+
)
|
53
|
+
job
|
54
|
+
}
|
55
|
+
|
56
|
+
it 'should contain three tasks' do
|
57
|
+
expect(workflow.config[:tasks].size).to eq 3
|
58
|
+
expect(workflow.config[:tasks].first[:class]).to eq 'CollectFiles'
|
59
|
+
expect(workflow.config[:tasks].last[:class]).to eq '::Libis::Workflow::Tasks::Analyzer'
|
60
|
+
end
|
61
|
+
|
62
|
+
# noinspection RubyResolve
|
63
|
+
it 'should camelize the workitem name' do
|
64
|
+
run = job.execute
|
65
|
+
expect(run.options['CollectFiles'][:location]).to eq dirname
|
66
|
+
expect(run.items.count).to eq 1
|
67
|
+
expect(run.items.first.class).to eq TestDirItem
|
68
|
+
expect(run.items.first.count).to eq 3
|
69
|
+
expect(run.items.first.first.class).to eq TestFileItem
|
70
|
+
|
71
|
+
expect(run.items.first.name).to eq 'Items'
|
72
|
+
|
73
|
+
run.items.first.each_with_index do |x, i|
|
74
|
+
expect(x.name).to eq %w'TestDirItem.rb TestFileItem.rb TestRun.rb'[i]
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
it 'should return expected debug output' do
|
79
|
+
|
80
|
+
sample_out = <<STR
|
81
|
+
DEBUG -- CollectFiles - TestRun : Processing subitem (1/1): items
|
82
|
+
DEBUG -- CollectFiles - items : Processing subitem (1/3): test_dir_item.rb
|
83
|
+
DEBUG -- CollectFiles - items : Processing subitem (2/3): test_file_item.rb
|
84
|
+
DEBUG -- CollectFiles - items : Processing subitem (3/3): test_run.rb
|
85
|
+
DEBUG -- CollectFiles - items : 3 of 3 subitems passed
|
86
|
+
DEBUG -- CollectFiles - TestRun : 1 of 1 subitems passed
|
87
|
+
DEBUG -- ProcessFiles - TestRun : Running subtask (1/2): ChecksumTester
|
88
|
+
DEBUG -- ProcessFiles/ChecksumTester - TestRun : Processing subitem (1/1): items
|
89
|
+
DEBUG -- ProcessFiles/ChecksumTester - items : Processing subitem (1/3): test_dir_item.rb
|
90
|
+
DEBUG -- ProcessFiles/ChecksumTester - items : Processing subitem (2/3): test_file_item.rb
|
91
|
+
DEBUG -- ProcessFiles/ChecksumTester - items : Processing subitem (3/3): test_run.rb
|
92
|
+
DEBUG -- ProcessFiles/ChecksumTester - items : 3 of 3 subitems passed
|
93
|
+
DEBUG -- ProcessFiles/ChecksumTester - TestRun : 1 of 1 subitems passed
|
94
|
+
DEBUG -- ProcessFiles - TestRun : Running subtask (2/2): CamelizeName
|
95
|
+
DEBUG -- ProcessFiles/CamelizeName - TestRun : Processing subitem (1/1): items
|
96
|
+
DEBUG -- ProcessFiles/CamelizeName - Items : Processing subitem (1/3): test_dir_item.rb
|
97
|
+
DEBUG -- ProcessFiles/CamelizeName - Items : Processing subitem (2/3): test_file_item.rb
|
98
|
+
DEBUG -- ProcessFiles/CamelizeName - Items : Processing subitem (3/3): test_run.rb
|
99
|
+
DEBUG -- ProcessFiles/CamelizeName - Items : 3 of 3 subitems passed
|
100
|
+
DEBUG -- ProcessFiles/CamelizeName - TestRun : 1 of 1 subitems passed
|
101
|
+
STR
|
102
|
+
sample_out = sample_out.lines.to_a
|
103
|
+
|
104
|
+
run = job.execute
|
105
|
+
output = logoutput.string.lines.to_a
|
106
|
+
|
107
|
+
expect(output.count).to eq sample_out.count
|
108
|
+
output.each_with_index do |o, i|
|
109
|
+
expect(o[/(?<=\] ).*/]).to eq sample_out[i].strip
|
110
|
+
end
|
111
|
+
|
112
|
+
expect(run.summary['DEBUG']).to eq 20
|
113
|
+
expect(run.log_history.count).to eq 8
|
114
|
+
expect(run.status_log.count).to eq 8
|
115
|
+
expect(run.items.first.log_history.count).to eq 12
|
116
|
+
expect(run.items.first.status_log.count).to eq 6
|
117
|
+
|
118
|
+
[
|
119
|
+
{task: 'CollectFiles', status: :STARTED},
|
120
|
+
{task: 'CollectFiles', status: :DONE},
|
121
|
+
{task: 'ProcessFiles', status: :STARTED},
|
122
|
+
{task: 'ProcessFiles/ChecksumTester', status: :STARTED},
|
123
|
+
{task: 'ProcessFiles/ChecksumTester', status: :DONE},
|
124
|
+
{task: 'ProcessFiles/CamelizeName', status: :STARTED},
|
125
|
+
{task: 'ProcessFiles/CamelizeName', status: :DONE},
|
126
|
+
{task: 'ProcessFiles', status: :DONE},
|
127
|
+
].each_with_index do |h, i|
|
128
|
+
h.keys.each { |key| expect(run.status_log[i][key]).to eq h[key] }
|
129
|
+
end
|
130
|
+
|
131
|
+
[
|
132
|
+
{task: 'CollectFiles', status: :STARTED},
|
133
|
+
{task: 'CollectFiles', status: :DONE},
|
134
|
+
{task: 'ProcessFiles/ChecksumTester', status: :STARTED},
|
135
|
+
{task: 'ProcessFiles/ChecksumTester', status: :DONE},
|
136
|
+
{task: 'ProcessFiles/CamelizeName', status: :STARTED},
|
137
|
+
{task: 'ProcessFiles/CamelizeName', status: :DONE},
|
138
|
+
].each_with_index do |h, i|
|
139
|
+
h.keys.each { |key| expect(run.items.first.status_log[i][key]).to eq h[key] }
|
140
|
+
end
|
141
|
+
|
142
|
+
[
|
143
|
+
{task: 'CollectFiles', status: :STARTED},
|
144
|
+
{task: 'CollectFiles', status: :DONE},
|
145
|
+
{task: 'ProcessFiles/ChecksumTester', status: :STARTED},
|
146
|
+
{task: 'ProcessFiles/ChecksumTester', status: :DONE},
|
147
|
+
{task: 'ProcessFiles/CamelizeName', status: :STARTED},
|
148
|
+
{task: 'ProcessFiles/CamelizeName', status: :DONE},
|
149
|
+
].each_with_index do |h, i|
|
150
|
+
h.keys.each { |key| expect(run.items.first.first.status_log[i][key]).to eq h[key] }
|
151
|
+
end
|
152
|
+
|
153
|
+
[
|
154
|
+
{severity: 'DEBUG', task: 'CollectFiles', message: 'Processing subitem (1/1): items'},
|
155
|
+
{severity: 'DEBUG', task: 'CollectFiles', message: '1 of 1 subitems passed'},
|
156
|
+
{severity: 'DEBUG', task: 'ProcessFiles', message: 'Running subtask (1/2): ChecksumTester'},
|
157
|
+
{severity: 'DEBUG', task: 'ProcessFiles/ChecksumTester', message: 'Processing subitem (1/1): items'},
|
158
|
+
{severity: 'DEBUG', task: 'ProcessFiles/ChecksumTester', message: '1 of 1 subitems passed'},
|
159
|
+
{severity: 'DEBUG', task: 'ProcessFiles', message: 'Running subtask (2/2): CamelizeName'},
|
160
|
+
{severity: 'DEBUG', task: 'ProcessFiles/CamelizeName', message: 'Processing subitem (1/1): items'},
|
161
|
+
{severity: 'DEBUG', task: 'ProcessFiles/CamelizeName', message: '1 of 1 subitems passed'},
|
162
|
+
].each_with_index do |h, i|
|
163
|
+
h.keys.each { |key| expect(run.log_history[i][key]).to eq h[key] }
|
164
|
+
end
|
165
|
+
|
166
|
+
[
|
167
|
+
{severity: 'DEBUG', task: 'CollectFiles', message: 'Processing subitem (1/3): test_dir_item.rb'},
|
168
|
+
{severity: 'DEBUG', task: 'CollectFiles', message: 'Processing subitem (2/3): test_file_item.rb'},
|
169
|
+
{severity: 'DEBUG', task: 'CollectFiles', message: 'Processing subitem (3/3): test_run.rb'},
|
170
|
+
{severity: 'DEBUG', task: 'CollectFiles', message: '3 of 3 subitems passed'},
|
171
|
+
{severity: 'DEBUG', task: 'ProcessFiles/ChecksumTester', message: 'Processing subitem (1/3): test_dir_item.rb'},
|
172
|
+
{severity: 'DEBUG', task: 'ProcessFiles/ChecksumTester', message: 'Processing subitem (2/3): test_file_item.rb'},
|
173
|
+
{severity: 'DEBUG', task: 'ProcessFiles/ChecksumTester', message: 'Processing subitem (3/3): test_run.rb'},
|
174
|
+
{severity: 'DEBUG', task: 'ProcessFiles/ChecksumTester', message: '3 of 3 subitems passed'},
|
175
|
+
{severity: 'DEBUG', task: 'ProcessFiles/CamelizeName', message: 'Processing subitem (1/3): test_dir_item.rb'},
|
176
|
+
{severity: 'DEBUG', task: 'ProcessFiles/CamelizeName', message: 'Processing subitem (2/3): test_file_item.rb'},
|
177
|
+
{severity: 'DEBUG', task: 'ProcessFiles/CamelizeName', message: 'Processing subitem (3/3): test_run.rb'},
|
178
|
+
{severity: 'DEBUG', task: 'ProcessFiles/CamelizeName', message: '3 of 3 subitems passed'},
|
179
|
+
].each_with_index do |h, i|
|
180
|
+
h.keys.each { |key| expect(run.items.first.log_history[i][key]).to eq h[key] }
|
181
|
+
end
|
182
|
+
|
183
|
+
# noinspection RubyResolve
|
184
|
+
expect(run.items.first.first.log_history).to be_empty
|
185
|
+
|
186
|
+
end
|
187
|
+
|
188
|
+
end
|
metadata
ADDED
@@ -0,0 +1,196 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: libis-workflow
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.0.beta.19
|
5
|
+
platform: java
|
6
|
+
authors:
|
7
|
+
- Kris Dekeyser
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - "~>"
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '1.6'
|
19
|
+
name: bundler
|
20
|
+
prerelease: false
|
21
|
+
type: :development
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.6'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '10.3'
|
33
|
+
name: rake
|
34
|
+
prerelease: false
|
35
|
+
type: :development
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.3'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '3.1'
|
47
|
+
name: rspec
|
48
|
+
prerelease: false
|
49
|
+
type: :development
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - "~>"
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0.9'
|
61
|
+
name: simplecov
|
62
|
+
prerelease: false
|
63
|
+
type: :development
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.9'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0.7'
|
75
|
+
name: coveralls
|
76
|
+
prerelease: false
|
77
|
+
type: :development
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.7'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0.9'
|
89
|
+
name: libis-tools
|
90
|
+
prerelease: false
|
91
|
+
type: :runtime
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.9'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '3.3'
|
103
|
+
name: sidekiq
|
104
|
+
prerelease: false
|
105
|
+
type: :runtime
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.3'
|
111
|
+
description: A simple framework to build custom task/workflow solutions.
|
112
|
+
email: kris.dekeyser@libis.be
|
113
|
+
executables: []
|
114
|
+
extensions: []
|
115
|
+
extra_rdoc_files: []
|
116
|
+
files:
|
117
|
+
- ".coveralls.yml"
|
118
|
+
- ".gitignore"
|
119
|
+
- ".travis.yml"
|
120
|
+
- Gemfile
|
121
|
+
- LICENSE
|
122
|
+
- README.md
|
123
|
+
- Rakefile
|
124
|
+
- lib/libis-workflow.rb
|
125
|
+
- lib/libis/exceptions.rb
|
126
|
+
- lib/libis/workflow.rb
|
127
|
+
- lib/libis/workflow/action.rb
|
128
|
+
- lib/libis/workflow/base.rb
|
129
|
+
- lib/libis/workflow/base/dir_item.rb
|
130
|
+
- lib/libis/workflow/base/file_item.rb
|
131
|
+
- lib/libis/workflow/base/job.rb
|
132
|
+
- lib/libis/workflow/base/logger.rb
|
133
|
+
- lib/libis/workflow/base/logging.rb
|
134
|
+
- lib/libis/workflow/base/run.rb
|
135
|
+
- lib/libis/workflow/base/work_item.rb
|
136
|
+
- lib/libis/workflow/base/workflow.rb
|
137
|
+
- lib/libis/workflow/config.rb
|
138
|
+
- lib/libis/workflow/dir_item.rb
|
139
|
+
- lib/libis/workflow/file_item.rb
|
140
|
+
- lib/libis/workflow/job.rb
|
141
|
+
- lib/libis/workflow/message_registry.rb
|
142
|
+
- lib/libis/workflow/run.rb
|
143
|
+
- lib/libis/workflow/status.rb
|
144
|
+
- lib/libis/workflow/task.rb
|
145
|
+
- lib/libis/workflow/task_group.rb
|
146
|
+
- lib/libis/workflow/tasks/analyzer.rb
|
147
|
+
- lib/libis/workflow/version.rb
|
148
|
+
- lib/libis/workflow/work_item.rb
|
149
|
+
- lib/libis/workflow/worker.rb
|
150
|
+
- lib/libis/workflow/workflow.rb
|
151
|
+
- libis-workflow.gemspec
|
152
|
+
- spec/items.rb
|
153
|
+
- spec/items/test_dir_item.rb
|
154
|
+
- spec/items/test_file_item.rb
|
155
|
+
- spec/items/test_run.rb
|
156
|
+
- spec/spec_helper.rb
|
157
|
+
- spec/task_spec.rb
|
158
|
+
- spec/tasks/camelize_name.rb
|
159
|
+
- spec/tasks/checksum_tester.rb
|
160
|
+
- spec/tasks/collect_files.rb
|
161
|
+
- spec/workflow_spec.rb
|
162
|
+
homepage: https://github.com/Kris-LIBIS/workflow
|
163
|
+
licenses:
|
164
|
+
- MIT
|
165
|
+
metadata: {}
|
166
|
+
post_install_message:
|
167
|
+
rdoc_options: []
|
168
|
+
require_paths:
|
169
|
+
- lib
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: '0'
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: 1.3.1
|
180
|
+
requirements: []
|
181
|
+
rubyforge_project:
|
182
|
+
rubygems_version: 2.4.8
|
183
|
+
signing_key:
|
184
|
+
specification_version: 4
|
185
|
+
summary: LIBIS Workflow framework.
|
186
|
+
test_files:
|
187
|
+
- spec/items.rb
|
188
|
+
- spec/items/test_dir_item.rb
|
189
|
+
- spec/items/test_file_item.rb
|
190
|
+
- spec/items/test_run.rb
|
191
|
+
- spec/spec_helper.rb
|
192
|
+
- spec/task_spec.rb
|
193
|
+
- spec/tasks/camelize_name.rb
|
194
|
+
- spec/tasks/checksum_tester.rb
|
195
|
+
- spec/tasks/collect_files.rb
|
196
|
+
- spec/workflow_spec.rb
|