libis-workflow-mongoid 2.0.25 → 2.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.travis.yml +20 -13
- data/lib/libis/workflow/mongoid/base.rb +1 -0
- data/lib/libis/workflow/mongoid/config.rb +1 -0
- data/lib/libis/workflow/mongoid/job.rb +5 -0
- data/lib/libis/workflow/mongoid/run.rb +1 -0
- data/lib/libis/workflow/mongoid/status_entry.rb +2 -0
- data/lib/libis/workflow/mongoid/version.rb +1 -1
- data/lib/libis/workflow/mongoid/work_item.rb +6 -0
- data/lib/libis/workflow/mongoid/workflow.rb +2 -0
- data/libis-workflow-mongoid.gemspec +3 -1
- data/spec/spec_helper.rb +2 -0
- data/spec/workflow_spec.rb +2 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 3ee908e8a19ffd1c7f7d91d2db7b64ddb35afeae3ebccb4639582eb66126ae7b
|
4
|
+
data.tar.gz: aa48bcaf68de56939f07ed731fbb966716d54258a4f6be36d69c37cf1e83c835
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 46e6b0d2adb0ee5e6575eca26a228dc6df261d45e2611da5890047dc46e8e751cae9c15bc6505395112cc46013f0a835e9696518531ea22694b347ed3b06b5b6
|
7
|
+
data.tar.gz: e0d57d1bfc833eae2b5ab52ef88a8dde0e5cca162c97b3ccb43b1438b29f4bc9ce1df2a66dcc8cd33bf526db2f36cfd96ebbb7de2e22470372a6c6abf5275bca
|
data/.travis.yml
CHANGED
@@ -4,30 +4,37 @@ bundler_args: --without development
|
|
4
4
|
cache: bundler
|
5
5
|
|
6
6
|
rvm:
|
7
|
-
- 2.
|
8
|
-
- 2.
|
7
|
+
- 2.3.0
|
8
|
+
- 2.4.1
|
9
|
+
- 2.5.0
|
9
10
|
- ruby-head
|
10
|
-
- jruby-9.
|
11
|
+
- jruby-9.1.9.0
|
12
|
+
- jruby-head
|
11
13
|
jdk:
|
12
|
-
-
|
13
|
-
- oraclejdk7
|
14
|
+
- openjdk8
|
14
15
|
- oraclejdk8
|
16
|
+
- oraclejdk9
|
15
17
|
matrix:
|
16
18
|
exclude:
|
17
|
-
- rvm: 2.
|
18
|
-
jdk: oraclejdk7
|
19
|
-
- rvm: 2.1.7
|
19
|
+
- rvm: 2.3.0
|
20
20
|
jdk: oraclejdk8
|
21
|
-
- rvm: 2.
|
22
|
-
jdk:
|
23
|
-
- rvm: 2.
|
21
|
+
- rvm: 2.3.0
|
22
|
+
jdk: oraclejdk9
|
23
|
+
- rvm: 2.4.1
|
24
24
|
jdk: oraclejdk8
|
25
|
-
- rvm:
|
26
|
-
jdk:
|
25
|
+
- rvm: 2.4.1
|
26
|
+
jdk: oraclejdk9
|
27
|
+
- rvm: 2.5.0
|
28
|
+
jdk: oraclejdk8
|
29
|
+
- rvm: 2.5.0
|
30
|
+
jdk: oraclejdk9
|
27
31
|
- rvm: ruby-head
|
28
32
|
jdk: oraclejdk8
|
33
|
+
- rvm: ruby-head
|
34
|
+
jdk: oraclejdk9
|
29
35
|
allow_failures:
|
30
36
|
- rvm: ruby-head
|
37
|
+
- rvm: jruby-head
|
31
38
|
branches:
|
32
39
|
only:
|
33
40
|
- master
|
@@ -22,11 +22,16 @@ module Libis
|
|
22
22
|
field :log_age, type: String, default: 'daily'
|
23
23
|
field :log_keep, type: Integer, default: 5
|
24
24
|
|
25
|
+
# noinspection RubyArgCount
|
25
26
|
index({name: 1}, {unique: 1, name: 'by_name'})
|
26
27
|
|
28
|
+
# noinspection RailsParamDefResolve
|
27
29
|
has_many :runs, as: :job, dependent: :destroy, autosave: true, order: :c_at.asc
|
30
|
+
|
31
|
+
# noinspection RailsParamDefResolve
|
28
32
|
belongs_to :workflow, polymorphic: true
|
29
33
|
|
34
|
+
# noinspection RubyArgCount
|
30
35
|
index({workflow_id: 1, workflow_type: 1, name: 1}, {name: 'by_workflow'})
|
31
36
|
|
32
37
|
def self.from_hash(hash)
|
@@ -17,7 +17,9 @@ module Libis
|
|
17
17
|
field :progress, type: Integer
|
18
18
|
field :max, type: Integer
|
19
19
|
|
20
|
+
# noinspection RubyArgCount
|
20
21
|
index({created: 1}, {name: 'by_created'})
|
22
|
+
# noinspection RubyArgCount
|
21
23
|
index({updated: 1}, {name: 'by_updated'})
|
22
24
|
|
23
25
|
embedded_in :item, polymorphic: true
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Libis
|
2
2
|
module Workflow
|
3
3
|
module Mongoid
|
4
|
-
VERSION = '2.0.
|
4
|
+
VERSION = '2.0.26' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
5
5
|
end
|
6
6
|
end
|
7
7
|
end
|
@@ -15,6 +15,7 @@ module Libis
|
|
15
15
|
field :properties, type: Hash, default: -> { Hash.new }
|
16
16
|
field :status_log, type: Array, default: -> { Array.new }
|
17
17
|
|
18
|
+
# noinspection RubyArgCount
|
18
19
|
index({_id: 1, _type: 1}, {unique: true, name: 'by_id'})
|
19
20
|
|
20
21
|
has_many :items, as: :parent, class_name: Libis::Workflow::Mongoid::WorkItem.to_s,
|
@@ -22,6 +23,7 @@ module Libis
|
|
22
23
|
|
23
24
|
belongs_to :parent, polymorphic: true
|
24
25
|
|
26
|
+
# noinspection RubyArgCount
|
25
27
|
index({parent_id: 1, parent_type: 1, c_at: 1}, {name: 'by_parent'})
|
26
28
|
|
27
29
|
def add_item(item)
|
@@ -60,6 +62,10 @@ module Libis
|
|
60
62
|
|
61
63
|
protected
|
62
64
|
|
65
|
+
def save_log_entry(_log_entry)
|
66
|
+
self.save!
|
67
|
+
end
|
68
|
+
|
63
69
|
def add_status_log(info)
|
64
70
|
# noinspection RubyResolve
|
65
71
|
self.status_log << info
|
@@ -18,8 +18,10 @@ module Libis
|
|
18
18
|
field :description, type: String
|
19
19
|
field :config, type: Hash, default: -> { Hash.new }
|
20
20
|
|
21
|
+
# noinspection RubyArgCount
|
21
22
|
index({name: 1}, {unique: 1, name: 'by_name'})
|
22
23
|
|
24
|
+
# noinspection RailsParamDefResolve
|
23
25
|
has_many :jobs, as: :workflow, dependent: :restrict, autosave: true, order: :name.asc
|
24
26
|
|
25
27
|
def self.from_hash(hash)
|
@@ -1,10 +1,11 @@
|
|
1
|
-
|
1
|
+
require 'date'
|
2
2
|
|
3
3
|
lib = File.expand_path('../lib', __FILE__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
|
6
6
|
require 'libis/workflow/mongoid/version'
|
7
7
|
|
8
|
+
# noinspection RubyResolve
|
8
9
|
Gem::Specification.new do |spec|
|
9
10
|
spec.name = 'libis-workflow-mongoid'
|
10
11
|
spec.version = ::Libis::Workflow::Mongoid::VERSION
|
@@ -18,6 +19,7 @@ Gem::Specification.new do |spec|
|
|
18
19
|
spec.homepage = 'https://github.com/libis/workflow-mongoid'
|
19
20
|
spec.license = 'MIT'
|
20
21
|
|
22
|
+
# noinspection RubyResolve
|
21
23
|
spec.platform = Gem::Platform::JAVA if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
|
22
24
|
|
23
25
|
spec.files = `git ls-files -z`.split("\0")
|
data/spec/spec_helper.rb
CHANGED
data/spec/workflow_spec.rb
CHANGED
@@ -39,6 +39,7 @@ describe 'TestWorkflow' do
|
|
39
39
|
|
40
40
|
let(:workflow) {
|
41
41
|
wf = TestWorkflow.find_or_initialize_by(name: 'TestWorkflow')
|
42
|
+
# noinspection RubyStringKeysInHashInspection
|
42
43
|
wf.configure(
|
43
44
|
'name' => 'TestWorkflow',
|
44
45
|
'description' => 'Workflow for testing',
|
@@ -62,6 +63,7 @@ describe 'TestWorkflow' do
|
|
62
63
|
wf
|
63
64
|
}
|
64
65
|
let(:job) {
|
66
|
+
# noinspection RubyStringKeysInHashInspection
|
65
67
|
job = TestJob.from_hash(
|
66
68
|
'name' => 'TestJob',
|
67
69
|
'description' => 'Job for testing',
|
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.26
|
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: 2018-03-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: libis-workflow
|
@@ -158,7 +158,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
requirements: []
|
160
160
|
rubyforge_project:
|
161
|
-
rubygems_version: 2.
|
161
|
+
rubygems_version: 2.7.6
|
162
162
|
signing_key:
|
163
163
|
specification_version: 4
|
164
164
|
summary: Mongoid persistence for the LIBIS Workflow framework.
|