build-graph 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 732e8eb3e448d4b4d2e29b99cfa776dd3fee02bcac14bf93c87112e907bca776
4
- data.tar.gz: 030b9b4aa3f3aadddd4f29569c8ff43151ec10d5a921bc7dd58300cc9808b78b
3
+ metadata.gz: f374fa94de0cc63fb17a1ab030e7dfe57119479a05f5f90e6929eb9bf71f1b5c
4
+ data.tar.gz: 5ef8cf4de08a081d1d3d213162fb76671f119fdc1960c62ddd8e2a9665c9845b
5
5
  SHA512:
6
- metadata.gz: 6cd9d0b4486e3617da1496598baf89a16508fac212ad0c92023948098eab6e1d53ad7fc0c75e9de3f5b0bba5b8f5acebab9cd833d2fb72a6d9220df6babb6183
7
- data.tar.gz: b71e886594c0b7aba83db98e4c7da0d5ed97d4f3341006edaa723246a531631457d224ec2a46b5caa25326f938c19861058bb6c28f6b06e1eee207f51a591d7d
6
+ metadata.gz: 3f408f712a5810758fb4958f27edf4c4c72dfb467844be6a4ea17129b2aac38bebe97d3b612f619b51ecf5dcc7b00e2e610a8fe60c4e7e09f89366b8c4524050
7
+ data.tar.gz: 5010e03903e790222bca6aec4ea612e0fa1b6b7e61269e6a307a37831494e536e20e86fbd5338e641c95726724c403f534b96e95562e7d2d51be82bf0b7a6037
checksums.yaml.gz.sig CHANGED
Binary file
@@ -7,6 +7,6 @@
7
7
  module Build
8
8
  # @namespace
9
9
  module Graph
10
- VERSION = "2.3.0"
10
+ VERSION = "2.3.1"
11
11
  end
12
12
  end
@@ -19,6 +19,7 @@ module Build
19
19
  # @returns [String] A Mermaid flowchart diagram in text format.
20
20
  def generate(walker)
21
21
  lines = ["flowchart LR"]
22
+ seen = {}
22
23
 
23
24
  walker.tasks.each do |node, task|
24
25
  next unless task.inputs && task.outputs
@@ -28,11 +29,13 @@ module Build
28
29
  output_ids = task.outputs.to_a.map{|path| sanitize_id(path)}
29
30
 
30
31
  task.inputs.each do |path|
31
- lines << " #{sanitize_id(path)}[#{path.basename}]"
32
+ id = sanitize_id(path)
33
+ seen[id] ||= (lines << " #{id}[#{path.basename}]")
32
34
  end
33
35
 
34
36
  task.outputs.each do |path|
35
- lines << " #{sanitize_id(path)}[#{path.basename}]"
37
+ id = sanitize_id(path)
38
+ seen[id] ||= (lines << " #{id}[#{path.basename}]")
36
39
  end
37
40
 
38
41
  label = node.respond_to?(:title) ? node.title.to_s : nil
data/readme.md CHANGED
@@ -16,6 +16,10 @@ Please see the [project documentation](https://ioquatix.github.io/build-graph) f
16
16
 
17
17
  Please see the [project releases](https://ioquatix.github.io/build-graphreleases/index) for all releases.
18
18
 
19
+ ### v2.3.1
20
+
21
+ - Deduplicate visualization nodes.
22
+
19
23
  ### v2.3.0
20
24
 
21
25
  - Add `Build::Graph::Visualization` for generating Mermaid diagrams of the build graph.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v2.3.1
4
+
5
+ - Deduplicate visualization nodes.
6
+
3
7
  ## v2.3.0
4
8
 
5
9
  - Add `Build::Graph::Visualization` for generating Mermaid diagrams of the build graph.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: build-graph
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file