dependency-trees 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dependency-trees.gemspec +1 -1
- data/lib/dependency_tree.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f94a5e608baca58c77d811b8af7dab324c4652f45d56af93a4d3bcabfbf25b5
|
4
|
+
data.tar.gz: f5cdb7dbccc0d4a0cf6f3926dbb58301a33dec7c717cdc77bdc545e767ee16a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c98a10353eca2d97ef8ae4d9ec575b66bd80b4f1a831f8ed1060d0363cd57d25f6fd9e602ca64cebec4599d590ada00f7dc083b2ab928ed73487e859ef44bc7
|
7
|
+
data.tar.gz: 3debcf463ecde665bf14f925db481802acc0a9ff65edc8efe5c8a5572461952a8bc6f6f456bc866d6ef206c278e6bf3529bda9571f1dfda5cfa1e5d9262c7811
|
data/dependency-trees.gemspec
CHANGED
data/lib/dependency_tree.rb
CHANGED
@@ -119,6 +119,7 @@ module DependencyTree
|
|
119
119
|
result = shoud_go_deeper ? get_associations_for_tree(depth, hash_for_duplication_check) : Tree.new
|
120
120
|
result[:id] = id
|
121
121
|
result[:instance] = self
|
122
|
+
result[:class] = self.class.to_s.underscore
|
122
123
|
result[:duplicate] = true if is_duplicate
|
123
124
|
result
|
124
125
|
end
|
@@ -135,7 +136,6 @@ module DependencyTree
|
|
135
136
|
self.send(association.name).sort_by(&:id).map do |associated_object|
|
136
137
|
result[symbol] = [] if result[symbol].nil?
|
137
138
|
result[symbol] << associated_object.dependency_tree(depth - 1, hash_for_duplication_check)
|
138
|
-
result[:class] = association.klass.name.underscore.to_sym
|
139
139
|
end
|
140
140
|
end
|
141
141
|
|