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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 168eb24685de45ac7accf91bf0d1097f16bacf59
4
- data.tar.gz: 9ddc21b998e2add48219544480f3d8603c00cff7
2
+ SHA256:
3
+ metadata.gz: 3ee908e8a19ffd1c7f7d91d2db7b64ddb35afeae3ebccb4639582eb66126ae7b
4
+ data.tar.gz: aa48bcaf68de56939f07ed731fbb966716d54258a4f6be36d69c37cf1e83c835
5
5
  SHA512:
6
- metadata.gz: 5382c1f951a2cb9967cef9b4e60bb6c7b9c521744e435664654e3587768a9795a0df05e98df2da99b95ff2d1678313fac34904d87963cbe4e9aa14d38811473f
7
- data.tar.gz: bc56d9ad8abf7d1071f87c864d75ae1561b315d2a93f7a50897c1f44d7a64d7ececaba5c40742d9f837ecc915f0579f6af482a5abdd4c612c5ab553898b364e9
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.1.7
8
- - 2.2.3
7
+ - 2.3.0
8
+ - 2.4.1
9
+ - 2.5.0
9
10
  - ruby-head
10
- - jruby-9.0.1.0
11
+ - jruby-9.1.9.0
12
+ - jruby-head
11
13
  jdk:
12
- - openjdk7
13
- - oraclejdk7
14
+ - openjdk8
14
15
  - oraclejdk8
16
+ - oraclejdk9
15
17
  matrix:
16
18
  exclude:
17
- - rvm: 2.1.7
18
- jdk: oraclejdk7
19
- - rvm: 2.1.7
19
+ - rvm: 2.3.0
20
20
  jdk: oraclejdk8
21
- - rvm: 2.2.3
22
- jdk: oraclejdk7
23
- - rvm: 2.2.3
21
+ - rvm: 2.3.0
22
+ jdk: oraclejdk9
23
+ - rvm: 2.4.1
24
24
  jdk: oraclejdk8
25
- - rvm: ruby-head
26
- jdk: oraclejdk7
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
@@ -1,5 +1,6 @@
1
1
  require 'mongoid'
2
2
  require 'mongoid/document'
3
+ # noinspection RubyResolve
3
4
  require 'yaml'
4
5
  require 'libis/tools/extend/hash'
5
6
 
@@ -1,3 +1,4 @@
1
+ # noinspection RubyResolve
1
2
  require 'singleton'
2
3
  require 'mongoid'
3
4
 
@@ -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)
@@ -1,3 +1,4 @@
1
+ # noinspection RubyResolve
1
2
  require 'fileutils'
2
3
 
3
4
  require 'libis/workflow/base/run'
@@ -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.25' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
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
- # encoding: utf-8
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
@@ -1,7 +1,9 @@
1
1
  require 'coveralls'
2
2
  Coveralls.wear!
3
3
 
4
+ # noinspection RubyResolve
4
5
  require 'bundler/setup'
6
+ # noinspection RubyResolve
5
7
  Bundler.setup
6
8
 
7
9
  require 'rspec'
@@ -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.25
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: 2017-02-13 00:00:00.000000000 Z
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.5.1
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.