libis-workflow-mongoid 2.0.26 → 2.0.30
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 -21
- data/lib/libis/workflow/mongoid/version.rb +1 -1
- data/lib/libis/workflow/mongoid/work_item.rb +1 -1
- data/lib/libis/workflow/mongoid/workflow.rb +1 -1
- data/lib/libis/workflow/mongoid.rb +0 -1
- data/libis-workflow-mongoid.gemspec +2 -2
- data/spec/db_start.sh +1 -2
- data/spec/tasks/camelize_name.rb +1 -1
- metadata +11 -13
- data/lib/libis/workflow/mongoid/worker.rb +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f008b2769119c29bd99fed00eb5b0c9bd832918310c35a999608342990f55ec
|
4
|
+
data.tar.gz: 578f056c2d38f7ca6e6b19b4a23a5875435f22a2a7a27aea42ccacc85e7e7e78
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4e67aa30895f5fa53b251c2434a0f5e8c21440218fb11ace03300d65351163be3936b5a21a560dce4797d257ed04179e4f08c3016dc1c2b9caf279991341fc1
|
7
|
+
data.tar.gz: db2f1d83a268b9366e13f23f0af08e8d5352457ed6afd2a6a2b643807febba9d1d9efd413072edae8abd5e8611df09ad50495ff73b57702944558d3926be1a80
|
data/.travis.yml
CHANGED
@@ -2,36 +2,40 @@ language: ruby
|
|
2
2
|
sudo: false
|
3
3
|
bundler_args: --without development
|
4
4
|
cache: bundler
|
5
|
-
|
6
5
|
rvm:
|
7
|
-
- 2.3
|
8
|
-
- 2.4
|
9
|
-
- 2.5
|
6
|
+
- 2.3
|
7
|
+
- 2.4
|
8
|
+
- 2.5
|
9
|
+
- 2.6
|
10
10
|
- ruby-head
|
11
|
-
- jruby-9.1
|
11
|
+
- jruby-9.1
|
12
12
|
- jruby-head
|
13
13
|
jdk:
|
14
14
|
- openjdk8
|
15
|
-
-
|
16
|
-
-
|
15
|
+
- openjdk10
|
16
|
+
- openjdk11
|
17
17
|
matrix:
|
18
18
|
exclude:
|
19
|
-
- rvm: 2.3
|
20
|
-
jdk:
|
21
|
-
- rvm: 2.3
|
22
|
-
jdk:
|
23
|
-
- rvm: 2.4
|
24
|
-
jdk:
|
25
|
-
- rvm: 2.4
|
26
|
-
jdk:
|
27
|
-
- rvm: 2.5
|
28
|
-
jdk:
|
29
|
-
- rvm: 2.5
|
30
|
-
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
|
31
35
|
- rvm: ruby-head
|
32
|
-
jdk:
|
36
|
+
jdk: openjdk10
|
33
37
|
- rvm: ruby-head
|
34
|
-
jdk:
|
38
|
+
jdk: openjdk11
|
35
39
|
allow_failures:
|
36
40
|
- rvm: ruby-head
|
37
41
|
- rvm: jruby-head
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Libis
|
2
2
|
module Workflow
|
3
3
|
module Mongoid
|
4
|
-
VERSION = '2.0.
|
4
|
+
VERSION = '2.0.30' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
@@ -21,7 +21,7 @@ module Libis
|
|
21
21
|
has_many :items, as: :parent, class_name: Libis::Workflow::Mongoid::WorkItem.to_s,
|
22
22
|
dependent: :destroy, autosave: true, order: :c_at.asc
|
23
23
|
|
24
|
-
belongs_to :parent, polymorphic: true
|
24
|
+
belongs_to :parent, polymorphic: true, optional: true
|
25
25
|
|
26
26
|
# noinspection RubyArgCount
|
27
27
|
index({parent_id: 1, parent_type: 1, c_at: 1}, {name: 'by_parent'})
|
@@ -22,7 +22,7 @@ module Libis
|
|
22
22
|
index({name: 1}, {unique: 1, name: 'by_name'})
|
23
23
|
|
24
24
|
# noinspection RailsParamDefResolve
|
25
|
-
has_many :jobs, as: :workflow, dependent: :
|
25
|
+
has_many :jobs, as: :workflow, dependent: :restrict_with_exception, autosave: true, order: :name.asc
|
26
26
|
|
27
27
|
def self.from_hash(hash)
|
28
28
|
self.create_from_hash(hash, [:name]) do |item, cfg|
|
@@ -12,7 +12,6 @@ module Libis
|
|
12
12
|
autoload :Job, 'libis/workflow/mongoid/job'
|
13
13
|
autoload :WorkItem, 'libis/workflow/mongoid/work_item'
|
14
14
|
autoload :Run, 'libis/workflow/mongoid/run'
|
15
|
-
autoload :Worker, 'libis/workflow/mongoid/worker'
|
16
15
|
autoload :Workflow, 'libis/workflow/mongoid/workflow'
|
17
16
|
|
18
17
|
def self.configure
|
@@ -29,9 +29,9 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.require_paths = ['lib']
|
30
30
|
|
31
31
|
spec.add_runtime_dependency 'libis-workflow', '~> 2.0'
|
32
|
-
spec.add_runtime_dependency 'mongoid', '
|
32
|
+
spec.add_runtime_dependency 'mongoid', '7.3.3'
|
33
33
|
|
34
|
-
spec.add_development_dependency 'bundler'
|
34
|
+
spec.add_development_dependency 'bundler'
|
35
35
|
spec.add_development_dependency 'rake'
|
36
36
|
spec.add_development_dependency 'rspec'
|
37
37
|
spec.add_development_dependency 'coveralls'
|
data/spec/db_start.sh
CHANGED
data/spec/tasks/camelize_name.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libis-workflow-mongoid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.30
|
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: 2022-03-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: libis-workflow
|
@@ -28,30 +28,30 @@ dependencies:
|
|
28
28
|
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 7.3.3
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 7.3.3
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,7 +120,6 @@ files:
|
|
120
120
|
- lib/libis/workflow/mongoid/status_entry.rb
|
121
121
|
- lib/libis/workflow/mongoid/version.rb
|
122
122
|
- lib/libis/workflow/mongoid/work_item.rb
|
123
|
-
- lib/libis/workflow/mongoid/worker.rb
|
124
123
|
- lib/libis/workflow/mongoid/workflow.rb
|
125
124
|
- libis-workflow-mongoid.gemspec
|
126
125
|
- mongoid.yml
|
@@ -157,8 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
157
156
|
- !ruby/object:Gem::Version
|
158
157
|
version: '0'
|
159
158
|
requirements: []
|
160
|
-
|
161
|
-
rubygems_version: 2.7.6
|
159
|
+
rubygems_version: 3.2.15
|
162
160
|
signing_key:
|
163
161
|
specification_version: 4
|
164
162
|
summary: Mongoid persistence for the LIBIS Workflow framework.
|
@@ -1,20 +0,0 @@
|
|
1
|
-
require 'libis/workflow/worker'
|
2
|
-
require 'sidekiq'
|
3
|
-
|
4
|
-
module Libis
|
5
|
-
module Workflow
|
6
|
-
module Mongoid
|
7
|
-
|
8
|
-
class Worker < Libis::Workflow::Worker
|
9
|
-
|
10
|
-
def get_job(job_config)
|
11
|
-
job_name = job_config.delete(:name)
|
12
|
-
job = ::Libis::Workflow::Mongoid::Job.find(name: job_name).first
|
13
|
-
raise RuntimeError.new "Workflow #{job_name} not found" unless job.is_a? ::Libis::Workflow::Mongoid::Job
|
14
|
-
job
|
15
|
-
end
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|