libis-workflow-mongoid 2.0.beta.20 → 2.0.beta.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libis/workflow/mongoid/base.rb +12 -2
- data/lib/libis/workflow/mongoid/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d88ce6d6d6b90f72527cca249309fe55e92a30b
|
4
|
+
data.tar.gz: 9d27cc522b2d3224c15f4ccf141aa777891a5486
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b456962e0f80aad26e6614bfde0bee8703596040a3ba8404b5cede910b457ed2b689bec1606f0a00fcf27e71940c9a6d0bc57179ead52ef697c35498a408550f
|
7
|
+
data.tar.gz: 4f5c8ab9c460a04e4ff315c85a31f76897748504cd0899f9a94f903c99d9f120017adcf8aa5d09edb65c16fc7293bfe3f612f0451e2808807471a7329539791a
|
@@ -1,10 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'mongoid'
|
3
3
|
require 'mongoid/document'
|
4
|
+
require 'yaml'
|
5
|
+
require 'libis/tools/extend/hash'
|
6
|
+
|
4
7
|
# require 'mongoid_indifferent_access'
|
5
8
|
require_relative 'sequence'
|
6
9
|
|
7
|
-
require 'active_support/core_ext/object/deep_dup'
|
8
10
|
|
9
11
|
module Libis
|
10
12
|
module Workflow
|
@@ -30,7 +32,15 @@ module Libis
|
|
30
32
|
end
|
31
33
|
|
32
34
|
def info
|
33
|
-
self.attributes.
|
35
|
+
result = self.attributes.reject { |k,v| v.blank? || volatile_attributes.include?(k) }
|
36
|
+
result = result.to_yaml.gsub(/!ruby\/hash:BSON::Document/,'')
|
37
|
+
# noinspection RubyResolve
|
38
|
+
result = YAML.load(result)
|
39
|
+
result.key_strings_to_symbols!(recursive: true)
|
40
|
+
end
|
41
|
+
|
42
|
+
def to_s
|
43
|
+
self.name || "#{self.class.name}_#{self.id}"
|
34
44
|
end
|
35
45
|
|
36
46
|
protected
|
@@ -3,7 +3,7 @@
|
|
3
3
|
module Libis
|
4
4
|
module Workflow
|
5
5
|
module Mongoid
|
6
|
-
VERSION = '2.0.beta.
|
6
|
+
VERSION = '2.0.beta.21' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
7
7
|
end
|
8
8
|
end
|
9
9
|
end
|
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.beta.
|
4
|
+
version: 2.0.beta.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Dekeyser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: libis-workflow
|
@@ -159,7 +159,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
159
159
|
version: 1.3.1
|
160
160
|
requirements: []
|
161
161
|
rubyforge_project:
|
162
|
-
rubygems_version: 2.
|
162
|
+
rubygems_version: 2.4.8
|
163
163
|
signing_key:
|
164
164
|
specification_version: 4
|
165
165
|
summary: Mongoid persistence for the LIBIS Workflow framework.
|