libis-workflow-mongoid 2.0.beta.20 → 2.0.beta.21

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
2
  SHA1:
3
- metadata.gz: 674a0925bea93cd6af396d621e1d2a73a29e2ffb
4
- data.tar.gz: 8b8037e88db86b2d0c5a43b81418ac146c7f663b
3
+ metadata.gz: 4d88ce6d6d6b90f72527cca249309fe55e92a30b
4
+ data.tar.gz: 9d27cc522b2d3224c15f4ccf141aa777891a5486
5
5
  SHA512:
6
- metadata.gz: dd4ea904e7d5b87f731b6cb531b0d1a39446fdcba03df3078850f92f768e7925628f8b35e0d5570c3cb33dc46267307e47424ac31771ce55770a5eb4d84f0d29
7
- data.tar.gz: cfae7c656ae1f5e52a146a8148a7c3b14a7c80de083917affe9bbce848af40cf640dce6115638037d8683b8d58ec261de60e7788acaddcb65dd5479effb5e317
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.deep_dup.reject { |k,v| v.blank? || volatile_attributes.include?(k) }.to_hash
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.20' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
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.20
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-07 00:00:00.000000000 Z
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.2.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.