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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/deep_cloning.rb +7 -3
  3. metadata +17 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2512ab404a20f9d07270d685c61a45db3b81c7ea26357799766983231e14e0b4
4
- data.tar.gz: eef690a7066794bd25a6369b597d720bd5f70b4783a7a0ceae57ca2b244dad87
3
+ metadata.gz: ed97ff8ac7819a80779dadc0475b1fc1c8ceaa8ae76018affcfa4e30c1670458
4
+ data.tar.gz: 65c0103b141ec56604151fcaf96ca781b65a6a95a4b1bd4a98f080f405619a1f
5
5
  SHA512:
6
- metadata.gz: aab0059376aa29b05822c21580e482fd687b63c0fa8f9bff25cb9e8ec70b25c05f52ee526494780e9225fa1fc50192343aa3a013279d91da68fd04bb6a7d6077
7
- data.tar.gz: 9623e902c040cb985cabe5c2238b1e3d7b4c314d7585eba63bd4cd1643489546ac936772ef8d7e5fba48596c5512294f3e90f0ced4df3c2bed43f10a2a3f6e34
6
+ metadata.gz: 10db0ceb359c639814d6ca1c3116e02e2c6dff786ff9d715c1f242c9ec8c50562c8397cdbff46e7866f3419e7cda11dc806136d8495bee66f2bb4a22afe5d461
7
+ data.tar.gz: b6b38ac8b1cdc4792ffe40f28d38220f30ca5e5e7ba5883b5b6d41c47b034c9a614073585cc6c052b84d067ae4f0c25fbed7150390df756862d566b779549e02
@@ -1,9 +1,13 @@
1
- require 'active_record'
1
+ require 'hierarchy_tree'
2
2
 
3
3
  module DeepCloning
4
- # This is the main class responsible to evaluate the equations
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.1'.freeze
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.1
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: 2019-04-25 00:00:00.000000000 Z
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.6
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