deep-cloning 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deep_cloning.rb +7 -3
- metadata +17 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ed97ff8ac7819a80779dadc0475b1fc1c8ceaa8ae76018affcfa4e30c1670458
|
4
|
+
data.tar.gz: 65c0103b141ec56604151fcaf96ca781b65a6a95a4b1bd4a98f080f405619a1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10db0ceb359c639814d6ca1c3116e02e2c6dff786ff9d715c1f242c9ec8c50562c8397cdbff46e7866f3419e7cda11dc806136d8495bee66f2bb4a22afe5d461
|
7
|
+
data.tar.gz: b6b38ac8b1cdc4792ffe40f28d38220f30ca5e5e7ba5883b5b6d41c47b034c9a614073585cc6c052b84d067ae4f0c25fbed7150390df756862d566b779549e02
|
data/lib/deep_cloning.rb
CHANGED
@@ -1,9 +1,13 @@
|
|
1
|
-
require '
|
1
|
+
require 'hierarchy_tree'
|
2
2
|
|
3
3
|
module DeepCloning
|
4
|
-
|
4
|
+
def self.descendants(klass)
|
5
|
+
Hierarchy.descendants(klass)
|
6
|
+
end
|
7
|
+
|
8
|
+
# This is the main class responsible to duplicate an entire hierarchy
|
5
9
|
class Clone
|
6
|
-
VERSION = '0.2.
|
10
|
+
VERSION = '0.2.2'.freeze
|
7
11
|
def initialize(root, opts = { except: [], save_root: true })
|
8
12
|
@root = root
|
9
13
|
@opts = opts
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep-cloning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nilton Vasques
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2020-02-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: minitest
|
@@ -40,6 +40,20 @@ dependencies:
|
|
40
40
|
- - "~>"
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '12.1'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: hierarchy_tree
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '0'
|
43
57
|
- !ruby/object:Gem::Dependency
|
44
58
|
name: activerecord
|
45
59
|
requirement: !ruby/object:Gem::Requirement
|
@@ -85,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
99
|
version: '0'
|
86
100
|
requirements: []
|
87
101
|
rubyforge_project:
|
88
|
-
rubygems_version: 2.7.
|
102
|
+
rubygems_version: 2.7.9
|
89
103
|
signing_key:
|
90
104
|
specification_version: 4
|
91
105
|
summary: DeepCloning is a gem that is able to replicate a set of records in depth
|