visualize_packs 0.5.17 → 0.5.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/visualize_packs +7 -4
- data/lib/graph.dot.erb +1 -1
- data/lib/visualize_packs/options.rb +3 -0
- data/lib/visualize_packs.rb +2 -0
- 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: 3c493faea12dcf090c4823910d9ecdcfc7da5eca6e370732caa2e063a832a704
|
4
|
+
data.tar.gz: 80b1906deaf843d82c4b317f15234e0ec023fe5fc66efcb865bf94f519101c92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dab454f3ae4f6dac67e0027417bd996640fc85ab6ac397690051fd77c8a66aeb86175b86c4df39f18027a55d516f1f0b12f587fe090f2788991e6d927511dce0
|
7
|
+
data.tar.gz: 9d1fbc976c03a3540dd6f385193d7cd95e0b97a3f1c2fa6261000204a78924f280718b63568d8f510afd76f33d96db29a63984faeb6255e3ad971905948b6f70
|
data/bin/visualize_packs
CHANGED
@@ -18,18 +18,21 @@ OptionParser.new do |opt|
|
|
18
18
|
opt.on('--no-visibility-arrows', "Don't show visibility arrows") { |o| options.show_visibility = false }
|
19
19
|
|
20
20
|
opt.on('--no-todo-arrows', "Don't show pack todos") { |o| options.show_todos = false }
|
21
|
-
opt.on("--only-todo-types=", "Show only the selected types of todos. Comma-separated list of #{EdgeTodoTypes.values.map &:serialize}") { |o| options.only_todo_types = o.to_s.split(",").uniq.map { EdgeTodoTypes.deserialize(_1) } }
|
21
|
+
opt.on("--only-todo-types=STRING", "Show only the selected types of todos. Comma-separated list of #{EdgeTodoTypes.values.map &:serialize}") { |o| options.only_todo_types = o.to_s.split(",").uniq.map { EdgeTodoTypes.deserialize(_1) } }
|
22
|
+
opt.on("--use-todos-for-layout", "Show only the selected types of todos. Comma-separated list of #{EdgeTodoTypes.values.map &:serialize}") { |o| options.use_todos_for_layout = true }
|
22
23
|
|
23
24
|
opt.on('--no-teams', "Don't show team colors") { |o| options.show_teams = false }
|
24
25
|
|
25
|
-
opt.on('--focus-pack=', "Focus on a specific pack(s). Comma-separated list of packs. Wildcards supported: 'packs/*'") { |o| options.focus_pack = o.to_s.split(",") }
|
26
|
-
opt.on('--focus-pack-edge-mode=', "If focus-pack is set, this shows only between focussed packs (when set to none) or the edges into / out of / in and out of the focus packs to non-focus packs (which will be re-added to the graph). One of #{FocusPackEdgeDirection.values.map &:serialize}") { |o| options.show_only_edges_to_focus_pack = FocusPackEdgeDirection.deserialize(o) }
|
26
|
+
opt.on('--focus-pack=STRING', "Focus on a specific pack(s). Comma-separated list of packs. Wildcards supported: 'packs/*'") { |o| options.focus_pack = o.to_s.split(",") }
|
27
|
+
opt.on('--focus-pack-edge-mode=STRING', "If focus-pack is set, this shows only between focussed packs (when set to none) or the edges into / out of / in and out of the focus packs to non-focus packs (which will be re-added to the graph). One of #{FocusPackEdgeDirection.values.map &:serialize}") { |o| options.show_only_edges_to_focus_pack = FocusPackEdgeDirection.deserialize(o) }
|
27
28
|
opt.on('--exclude-packs=', "Exclude listed packs from diagram. If used with include you will get all included that are not excluded. Wildcards support: 'packs/ignores/*'") { |o| options.exclude_packs = o.to_s.split(",") }
|
28
29
|
|
29
30
|
opt.on('--roll-nested-into-parent-packs', "Don't show nested packs (not counting root). Connect edges to top-level pack instead") { |o| options.roll_nested_into_parent_packs = true }
|
30
31
|
opt.on('--no-nesting-arrows', "Don't draw relationships between parents and nested packs") { |o| options.show_nested_relationships = false }
|
31
32
|
|
32
|
-
opt.on('--remote-base-url=', "Link pack packs to a URL (affects graphviz SVG generation)") { |o| options.remote_base_url = o }
|
33
|
+
opt.on('--remote-base-url=STRING', "Link pack packs to a URL (affects graphviz SVG generation)") { |o| options.remote_base_url = o }
|
34
|
+
|
35
|
+
opt.on('--title=STRING', "Set a custom diagram title") { |o| options.title = o }
|
33
36
|
|
34
37
|
opt.on_tail("-h", "--help", "Show this message") do
|
35
38
|
puts opt
|
data/lib/graph.dot.erb
CHANGED
@@ -88,7 +88,7 @@ digraph package_diagram {
|
|
88
88
|
<%- todo_types.keys.each do |todo_type| -%>
|
89
89
|
<%- if show_edge.call(package.name, todos_to_package) -%>
|
90
90
|
"<%= package.name -%>" -> "<%= todos_to_package -%>"<%= todo_type == 'privacy' ? ':private' : '' -%> [ color=darkred style=dashed
|
91
|
-
<%- if options.
|
91
|
+
<%- if !options.use_todos_for_layout -%>
|
92
92
|
constraint=false
|
93
93
|
<%- end -%>
|
94
94
|
# headlabel="<%= todo_type -%>"
|
@@ -32,6 +32,7 @@ class Options < T::Struct
|
|
32
32
|
|
33
33
|
prop :show_todos, T::Boolean, default: true
|
34
34
|
prop :only_todo_types, T::Array[EdgeTodoTypes], default: EdgeTodoTypes.values
|
35
|
+
prop :use_todos_for_layout, T::Boolean, default: false
|
35
36
|
|
36
37
|
prop :show_teams, T::Boolean, default: true
|
37
38
|
|
@@ -43,4 +44,6 @@ class Options < T::Struct
|
|
43
44
|
prop :show_nested_relationships, T::Boolean, default: true
|
44
45
|
|
45
46
|
prop :remote_base_url, T.nilable(String)
|
47
|
+
|
48
|
+
prop :title, T.nilable(String), default: nil
|
46
49
|
end
|
data/lib/visualize_packs.rb
CHANGED
@@ -56,6 +56,8 @@ module VisualizePacks
|
|
56
56
|
|
57
57
|
sig { params(options: Options, max_todo_count: T.nilable(Integer)).returns(String) }
|
58
58
|
def self.diagram_title(options, max_todo_count)
|
59
|
+
return "<<b>#{options.title}</b>>" if options.title
|
60
|
+
|
59
61
|
app_name = File.basename(Dir.pwd)
|
60
62
|
focus_edge_info = options.focus_pack && options.show_only_edges_to_focus_pack != FocusPackEdgeDirection::All ? "showing only edges to/from focus pack" : "showing all edges between visible packs"
|
61
63
|
focus_info = options.focus_pack ? "Focus on #{limited_sentence(options.focus_pack)} (#{focus_edge_info})" : "All packs"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: visualize_packs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gusto Engineers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
11
|
+
date: 2023-09-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|