libis-workflow 2.1.0 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +25 -20
- data/lib/libis/workflow.rb +0 -2
- data/lib/libis/workflow/base/work_item.rb +0 -1
- data/lib/libis/workflow/task.rb +1 -3
- data/lib/libis/workflow/version.rb +1 -1
- data/libis-workflow.gemspec +0 -3
- data/spec/tasks/camelize_name.rb +1 -1
- metadata +2 -45
- data/lib/libis/workflow/worker.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f27a6bc3d327dad98c500784066bcc9d31abda7b907ebd12519d02771caf92b
|
4
|
+
data.tar.gz: 2d9ae244388348bbf9a31c4a8f74f6560f23fd3528a42d03afd4593989726574
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e499f76d38811108f38571d44a69d049800fa816ac89e1cf7d96048199aebff6894abc86ad702c2d831960826b3b9cf19b15cb9b67224d6941e5cceb636ff704
|
7
|
+
data.tar.gz: e335ed09bef247098f795cbf65369109ce0cfdabe285afd7774e5474af56661f9d8396228120289006ed39ceefc3e4dcc87814f36457aac9a666e936654edf16
|
data/.travis.yml
CHANGED
@@ -3,34 +3,39 @@ sudo: false
|
|
3
3
|
bundler_args: --without development
|
4
4
|
cache: bundler
|
5
5
|
rvm:
|
6
|
-
- 2.3
|
7
|
-
- 2.4
|
8
|
-
- 2.5
|
6
|
+
- 2.3
|
7
|
+
- 2.4
|
8
|
+
- 2.5
|
9
|
+
- 2.6
|
9
10
|
- ruby-head
|
10
|
-
- jruby-9.1
|
11
|
+
- jruby-9.1
|
11
12
|
- jruby-head
|
12
13
|
jdk:
|
13
14
|
- openjdk8
|
14
|
-
-
|
15
|
-
-
|
15
|
+
- openjdk10
|
16
|
+
- openjdk11
|
16
17
|
matrix:
|
17
18
|
exclude:
|
18
|
-
- rvm: 2.3
|
19
|
-
jdk:
|
20
|
-
- rvm: 2.3
|
21
|
-
jdk:
|
22
|
-
- rvm: 2.4
|
23
|
-
jdk:
|
24
|
-
- rvm: 2.4
|
25
|
-
jdk:
|
26
|
-
- rvm: 2.5
|
27
|
-
jdk:
|
28
|
-
- rvm: 2.5
|
29
|
-
jdk:
|
19
|
+
- rvm: 2.3
|
20
|
+
jdk: openjdk10
|
21
|
+
- rvm: 2.3
|
22
|
+
jdk: openjdk11
|
23
|
+
- rvm: 2.4
|
24
|
+
jdk: openjdk10
|
25
|
+
- rvm: 2.4
|
26
|
+
jdk: openjdk11
|
27
|
+
- rvm: 2.5
|
28
|
+
jdk: openjdk10
|
29
|
+
- rvm: 2.5
|
30
|
+
jdk: openjdk11
|
31
|
+
- rvm: 2.6
|
32
|
+
jdk: openjdk10
|
33
|
+
- rvm: 2.6
|
34
|
+
jdk: openjdk11
|
30
35
|
- rvm: ruby-head
|
31
|
-
jdk:
|
36
|
+
jdk: openjdk10
|
32
37
|
- rvm: ruby-head
|
33
|
-
jdk:
|
38
|
+
jdk: openjdk11
|
34
39
|
allow_failures:
|
35
40
|
- rvm: ruby-head
|
36
41
|
- rvm: jruby-head
|
data/lib/libis/workflow.rb
CHANGED
data/lib/libis/workflow/task.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
module Libis
|
2
2
|
module Workflow
|
3
|
-
VERSION = '2.1.
|
3
|
+
VERSION = '2.1.2' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
4
4
|
end
|
5
5
|
end
|
data/libis-workflow.gemspec
CHANGED
@@ -27,7 +27,6 @@ Gem::Specification.new do |spec|
|
|
27
27
|
|
28
28
|
spec.require_paths = ['lib']
|
29
29
|
|
30
|
-
spec.add_development_dependency 'bundler', '~> 1.6'
|
31
30
|
spec.add_development_dependency 'rake', '~> 10.3'
|
32
31
|
spec.add_development_dependency 'rspec', '~> 3.1'
|
33
32
|
spec.add_development_dependency 'simplecov', '~> 0.9'
|
@@ -35,6 +34,4 @@ Gem::Specification.new do |spec|
|
|
35
34
|
spec.add_development_dependency 'awesome_print'
|
36
35
|
|
37
36
|
spec.add_runtime_dependency 'libis-tools', '~> 1.0'
|
38
|
-
spec.add_runtime_dependency 'sidekiq', '~> 5.0'
|
39
|
-
spec.add_runtime_dependency 'eldritch', '~> 1.1'
|
40
37
|
end
|
data/spec/tasks/camelize_name.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libis-workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Dekeyser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: bundler
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '1.6'
|
20
|
-
type: :development
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '1.6'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: rake
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,34 +94,6 @@ dependencies:
|
|
108
94
|
- - "~>"
|
109
95
|
- !ruby/object:Gem::Version
|
110
96
|
version: '1.0'
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
|
-
name: sidekiq
|
113
|
-
requirement: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '5.0'
|
118
|
-
type: :runtime
|
119
|
-
prerelease: false
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
requirements:
|
122
|
-
- - "~>"
|
123
|
-
- !ruby/object:Gem::Version
|
124
|
-
version: '5.0'
|
125
|
-
- !ruby/object:Gem::Dependency
|
126
|
-
name: eldritch
|
127
|
-
requirement: !ruby/object:Gem::Requirement
|
128
|
-
requirements:
|
129
|
-
- - "~>"
|
130
|
-
- !ruby/object:Gem::Version
|
131
|
-
version: '1.1'
|
132
|
-
type: :runtime
|
133
|
-
prerelease: false
|
134
|
-
version_requirements: !ruby/object:Gem::Requirement
|
135
|
-
requirements:
|
136
|
-
- - "~>"
|
137
|
-
- !ruby/object:Gem::Version
|
138
|
-
version: '1.1'
|
139
97
|
description: A simple framework to build custom task/workflow solutions.
|
140
98
|
email: kris.dekeyser@libis.be
|
141
99
|
executables: []
|
@@ -172,7 +130,6 @@ files:
|
|
172
130
|
- lib/libis/workflow/task_runner.rb
|
173
131
|
- lib/libis/workflow/version.rb
|
174
132
|
- lib/libis/workflow/work_item.rb
|
175
|
-
- lib/libis/workflow/worker.rb
|
176
133
|
- lib/libis/workflow/workflow.rb
|
177
134
|
- libis-workflow.gemspec
|
178
135
|
- spec/items.rb
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require 'sidekiq'
|
2
|
-
|
3
|
-
require 'libis/tools/extend/hash'
|
4
|
-
require 'libis/workflow/config'
|
5
|
-
require 'libis/workflow/workflow'
|
6
|
-
|
7
|
-
module Libis
|
8
|
-
module Workflow
|
9
|
-
|
10
|
-
class Worker
|
11
|
-
include Sidekiq::Worker
|
12
|
-
|
13
|
-
def perform(job_config, options = {})
|
14
|
-
job = configure(job_config, options)
|
15
|
-
options[:interactive] = false
|
16
|
-
job.execute options
|
17
|
-
end
|
18
|
-
|
19
|
-
def configure(job_config, options = {})
|
20
|
-
log_path = options.delete :log_path
|
21
|
-
if log_path
|
22
|
-
Libis::Workflow::Config.logger = ::Logger.new(
|
23
|
-
File.join(log_path, "#{job_config[:name]}.log"),
|
24
|
-
(options.delete(:log_shift_age) || 'daily'),
|
25
|
-
(options.delete(:log_shift_size) || 1024 ** 2)
|
26
|
-
)
|
27
|
-
Libis::Workflow::Config.logger.formatter = ::Logger::Formatter.new
|
28
|
-
Libis::Workflow::Config.logger.level = (options.delete(:log_level) || ::Logger::DEBUG)
|
29
|
-
end
|
30
|
-
get_job(job_config)
|
31
|
-
end
|
32
|
-
|
33
|
-
def get_job(job_config)
|
34
|
-
job = ::Libis::Workflow::Job.new
|
35
|
-
job.configure job_config.key_symbols_to_strings(recursive: true)
|
36
|
-
job
|
37
|
-
end
|
38
|
-
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|