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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3ee908e8a19ffd1c7f7d91d2db7b64ddb35afeae3ebccb4639582eb66126ae7b
4
- data.tar.gz: aa48bcaf68de56939f07ed731fbb966716d54258a4f6be36d69c37cf1e83c835
3
+ metadata.gz: 0f008b2769119c29bd99fed00eb5b0c9bd832918310c35a999608342990f55ec
4
+ data.tar.gz: 578f056c2d38f7ca6e6b19b4a23a5875435f22a2a7a27aea42ccacc85e7e7e78
5
5
  SHA512:
6
- metadata.gz: 46e6b0d2adb0ee5e6575eca26a228dc6df261d45e2611da5890047dc46e8e751cae9c15bc6505395112cc46013f0a835e9696518531ea22694b347ed3b06b5b6
7
- data.tar.gz: e0d57d1bfc833eae2b5ab52ef88a8dde0e5cca162c97b3ccb43b1438b29f4bc9ce1df2a66dcc8cd33bf526db2f36cfd96ebbb7de2e22470372a6c6abf5275bca
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.0
8
- - 2.4.1
9
- - 2.5.0
6
+ - 2.3
7
+ - 2.4
8
+ - 2.5
9
+ - 2.6
10
10
  - ruby-head
11
- - jruby-9.1.9.0
11
+ - jruby-9.1
12
12
  - jruby-head
13
13
  jdk:
14
14
  - openjdk8
15
- - oraclejdk8
16
- - oraclejdk9
15
+ - openjdk10
16
+ - openjdk11
17
17
  matrix:
18
18
  exclude:
19
- - rvm: 2.3.0
20
- jdk: oraclejdk8
21
- - rvm: 2.3.0
22
- jdk: oraclejdk9
23
- - rvm: 2.4.1
24
- jdk: oraclejdk8
25
- - rvm: 2.4.1
26
- jdk: oraclejdk9
27
- - rvm: 2.5.0
28
- jdk: oraclejdk8
29
- - rvm: 2.5.0
30
- jdk: oraclejdk9
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: oraclejdk8
36
+ jdk: openjdk10
33
37
  - rvm: ruby-head
34
- jdk: oraclejdk9
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.26' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
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: :restrict, autosave: true, order: :name.asc
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', '~> 5.0'
32
+ spec.add_runtime_dependency 'mongoid', '7.3.3'
33
33
 
34
- spec.add_development_dependency 'bundler', '~> 1.6'
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
@@ -1,5 +1,4 @@
1
1
  #!/bin/bash
2
2
  cd `dirname $0`
3
3
  mkdir -p ./data/db
4
- /opt/mongodb/bin/mongod --dbpath ./data/db
5
-
4
+ /usr/bin/mongod --dbpath ./data/db
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
- require 'backports/rails/string'
2
+ require 'libis/tools/extend/string'
3
3
  require 'libis-workflow'
4
4
 
5
5
  class CamelizeName < ::Libis::Workflow::Task
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.26
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: 2018-03-09 00:00:00.000000000 Z
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: '5.0'
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: '5.0'
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: '1.6'
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: '1.6'
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
- rubyforge_project:
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