dependency-trees 0.0.6 → 0.0.8

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
  SHA256:
3
- metadata.gz: 2f94a5e608baca58c77d811b8af7dab324c4652f45d56af93a4d3bcabfbf25b5
4
- data.tar.gz: f5cdb7dbccc0d4a0cf6f3926dbb58301a33dec7c717cdc77bdc545e767ee16a9
3
+ metadata.gz: ab9473e445def6dc4b9761b4bd489e5cb5f88eb09479a3d2a7d4a8f8aee17adb
4
+ data.tar.gz: e791b23401582dfc3e055df4bb80788f13d0f993df0fe4b4598b188b15b35802
5
5
  SHA512:
6
- metadata.gz: 5c98a10353eca2d97ef8ae4d9ec575b66bd80b4f1a831f8ed1060d0363cd57d25f6fd9e602ca64cebec4599d590ada00f7dc083b2ab928ed73487e859ef44bc7
7
- data.tar.gz: 3debcf463ecde665bf14f925db481802acc0a9ff65edc8efe5c8a5572461952a8bc6f6f456bc866d6ef206c278e6bf3529bda9571f1dfda5cfa1e5d9262c7811
6
+ metadata.gz: f2f9e22ab9c93adbc25b0f3a6cacc980bd6d48c7e27b4f0832d80c9a1c01b438d27ac25b446cd8343c4631544e331b8fb7315cbf94fa8522e1fcd07a5216e703
7
+ data.tar.gz: 2beac964d33a438684f0f594a5199969f20f617d27e39193c185d42d0b8105c879635bfa28f59443396f3b7217329fb12f591af7b76bd9c2d204e048b11c929c
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'dependency-trees'
3
- s.version = '0.0.6'
3
+ s.version = '0.0.8'
4
4
  s.summary = 'Tool for better visualizing and managing dependencies'
5
5
  s.authors = ['Karol Selak']
6
6
  s.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
@@ -34,8 +34,8 @@ module DependencyTree
34
34
  next unless array.class == Array
35
35
 
36
36
  new_array = array.map do |subtree|
37
- next subtree.root_duplicate_summary if subtree[:duplicate]
38
- next subtree if subtree.class != Tree || subtree.size > 2
37
+ next subtree.root_referenced_earlier_summary if subtree[:referenced_earlier]
38
+ next subtree if subtree.class != Tree || subtree.size > 3
39
39
 
40
40
  subtree.root_summary
41
41
  end
@@ -65,8 +65,8 @@ module DependencyTree
65
65
  "#{self[:class]}, id #{self[:id]}, #{self[:status]}"
66
66
  end
67
67
 
68
- def root_duplicate_summary
69
- root_summary + ", duplicate"
68
+ def root_referenced_earlier_summary
69
+ root_summary + ", referenced_earlier"
70
70
  end
71
71
 
72
72
  def deep_tree_clone
@@ -113,14 +113,14 @@ module DependencyTree
113
113
  end
114
114
 
115
115
  def dependency_tree(depth = Float::INFINITY, hash_for_duplication_check = IdHash.new)
116
- is_duplicate = hash_for_duplication_check[self.class]&.include?(id)
116
+ is_referenced_earlier = hash_for_duplication_check[self.class]&.include?(id)
117
117
  hash_for_duplication_check.add(self.class, id)
118
- shoud_go_deeper = depth > 0 && !is_duplicate
118
+ shoud_go_deeper = depth > 0 && !is_referenced_earlier
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
122
  result[:class] = self.class.to_s.underscore
123
- result[:duplicate] = true if is_duplicate
123
+ result[:referenced_earlier] = true if is_referenced_earlier
124
124
  result
125
125
  end
126
126
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependency-trees
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karol Selak