libis-workflow-mongoid 2.0.24 → 2.0.25

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
  SHA1:
3
- metadata.gz: 741810e46242c967f9e6d037b5f4d49bdbf9d007
4
- data.tar.gz: cb4ecc74d6e52f9ae8dcfcf22bf07ffc7d7d896a
3
+ metadata.gz: 168eb24685de45ac7accf91bf0d1097f16bacf59
4
+ data.tar.gz: 9ddc21b998e2add48219544480f3d8603c00cff7
5
5
  SHA512:
6
- metadata.gz: a397bf2c8b23b432958884d5b8b5f55f623c1b043b4bfc205960b1e73ac9e2e37aa3e8966ad18dc29b6017e47fb41acb3fc48cac241ea9f3b58d1aad5e689eba
7
- data.tar.gz: 0b945a420ac941b51a39c83b022ce8f283c675b824f57d57b5f5c06119824a1c2f89aa4deebd044a2a840ca35cb2f7c55756d0f763ad29f73dc86f34b4308a86
6
+ metadata.gz: 5382c1f951a2cb9967cef9b4e60bb6c7b9c521744e435664654e3587768a9795a0df05e98df2da99b95ff2d1678313fac34904d87963cbe4e9aa14d38811473f
7
+ data.tar.gz: bc56d9ad8abf7d1071f87c864d75ae1561b315d2a93f7a50897c1f44d7a64d7ececaba5c40742d9f837ecc915f0579f6af482a5abdd4c612c5ab553898b364e9
@@ -1,7 +1,7 @@
1
1
  module Libis
2
2
  module Workflow
3
3
  module Mongoid
4
- VERSION = '2.0.24' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
4
+ VERSION = '2.0.25' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
5
5
  end
6
6
  end
7
7
  end
@@ -29,6 +29,15 @@ module Libis
29
29
  super(item)
30
30
  end
31
31
 
32
+ def copy_item(item)
33
+ new_item = item.dup
34
+ yield new_item, item if block_given?
35
+ new_item.parent = nil
36
+ item.get_items.each { |i| new_item.copy_item(i) }
37
+ self.add_item(new_item)
38
+ new_item
39
+ end
40
+
32
41
  def move_item(item)
33
42
  new_item = item.dup
34
43
  yield new_item, item if block_given?
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.24
4
+ version: 2.0.25
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-08-24 00:00:00.000000000 Z
11
+ date: 2017-02-13 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.6.4
161
+ rubygems_version: 2.5.1
162
162
  signing_key:
163
163
  specification_version: 4
164
164
  summary: Mongoid persistence for the LIBIS Workflow framework.