deep-cloning 0.1.0 → 0.1.1
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 +2 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2919350321ea9884c80a1d347fdf9a64e1c4ff7e21c5f33bf4b4c070bc29e362
|
4
|
+
data.tar.gz: 73abd02c495e96953aa5ebcd48546bc2ea1fdded3768fe6942ecab8376c7f1ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 582e5c79c8b4c365514797ace7d38b8e6debc18e53baf4147947878a00c6ba08feedc6814fb40cfdd6458dc5e3c9ca9ae8478435d3ccb200ab50501db9ed01e1
|
7
|
+
data.tar.gz: dffc1bd99453ce596e58574e451c3f1c862739d9e06ad78e60937f608badade8b961aadf2f30c9c0bbff43a4aecbd80e5b892aa29b2332fef3d212a16be8fc6b
|
data/lib/deep_cloning.rb
CHANGED
@@ -3,7 +3,7 @@ require 'active_record'
|
|
3
3
|
module DeepCloning
|
4
4
|
# This is the main class responsible to evaluate the equations
|
5
5
|
class Clone
|
6
|
-
VERSION = '0.1.
|
6
|
+
VERSION = '0.1.1'.freeze
|
7
7
|
def initialize(root, opts = { except: [], save_root: true })
|
8
8
|
@root = root
|
9
9
|
@opts = opts
|
@@ -29,6 +29,7 @@ module DeepCloning
|
|
29
29
|
walk?(n)
|
30
30
|
end
|
31
31
|
unless @cell
|
32
|
+
binding.pry
|
32
33
|
ap @opts[:source].map { |s| "#{s.id} - #{s.class.name}" }
|
33
34
|
raise 'cannot duplicate the hierarchy'
|
34
35
|
end
|
@@ -66,9 +67,6 @@ module DeepCloning
|
|
66
67
|
leafs_statuses["#{@cell.class.name}_#{@cell.id}"] = true
|
67
68
|
end
|
68
69
|
end
|
69
|
-
rescue => e
|
70
|
-
puts e.backtrace
|
71
|
-
puts e.message
|
72
70
|
end
|
73
71
|
|
74
72
|
# Need to check the relations instead the models only
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deep-cloning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nilton Vasques
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|