visualize_packs 0.5.22 → 0.5.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -4
- data/lib/graph.dot.erb +2 -2
- data/lib/visualize_packs.rb +1 -1
- 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: 0e0cfe73d505dcc80ec3792514b251aa3320c5e7c9703c071202bf1c384ca77a
|
4
|
+
data.tar.gz: 0bff429e62083b1a193ddaeb15c443568363ac5400d22b06e5d220e38aea2b90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd23c6aa9d40fc57d4b0272af1046c7a289062a27c809b78ef121c239b53347f7dee5e3ccd7afbebca49d25697ee01da6de9b92864c83d0524f1f3a394b8f0f3
|
7
|
+
data.tar.gz: d394fdfb12da6cb44fa0401aa33f17e9fcfcb801b201a485c92683260f5bb17be66054d7361bc01c95dea5bcb82e136d1da1c09040a43bf053ddc403521e1738
|
data/README.md
CHANGED
@@ -1,9 +1,11 @@
|
|
1
1
|
# visualize_packs
|
2
|
+
|
2
3
|
Visualize_packs helps you visualize the structure, intended and actual, of your package-based Ruby application.
|
3
4
|
|
4
5
|
This gem takes a minimal approach in that it only outputs a graph in the format of [graphviz](https://graphviz.org/)' [dot language](https://graphviz.org/doc/info/lang.html). Install graphviz and use one of the chains of commands from below to generate full or partial images of the graphs of your application.
|
5
6
|
|
6
7
|
## Visualize your entire application
|
8
|
+
|
7
9
|
```
|
8
10
|
bundle exec visualize_packs > packs.dot && dot packs.dot -Tpng -o packs.png && open packs.png
|
9
11
|
```
|
@@ -13,16 +15,15 @@ bundle exec visualize_packs > packs.dot && dot packs.dot -Tpng -o packs.png && o
|
|
13
15
|
This will generate a local dependency diagram for every pack in your app
|
14
16
|
|
15
17
|
```
|
16
|
-
find . -iname 'package.yml' | sed 's/\/package.yml//g' | sed 's/\.\///' | xargs -I % sh -c "bundle exec visualize_packs --
|
18
|
+
find . -iname 'package.yml' | sed 's/\/package.yml//g' | sed 's/\.\///' | xargs -I % sh -c "bundle exec visualize_packs --focus-pack=% > %/packs.dot && dot %/packs.dot -Tpng -o %/packs.png"
|
17
19
|
```
|
18
20
|
|
19
21
|
If your app is large and has many packages and todos, the above graphs will likely be too big. Try this version to get only the edges to and from the focus package for each diagram:
|
20
22
|
|
21
23
|
```
|
22
|
-
find . -iname 'package.yml' | sed 's/\/package.yml//g' | sed 's/\.\///' | xargs -I % sh -c "bundle exec visualize_packs --
|
24
|
+
find . -iname 'package.yml' | sed 's/\/package.yml//g' | sed 's/\.\///' | xargs -I % sh -c "bundle exec visualize_packs --focus-pack=% --focus-pack-edge-mode=inout > %/packs.dot && dot %/packs.dot -Tpng -o %/packs.png"
|
23
25
|
```
|
24
26
|
|
25
|
-
|
26
27
|
## Get help
|
27
28
|
|
28
29
|
```
|
@@ -49,4 +50,4 @@ Once you are ready, run the following and commit the new `diagram_examples.png`
|
|
49
50
|
./spec/update_cassettes.sh
|
50
51
|
```
|
51
52
|
|
52
|
-
Please check in a new `diagram_examples.png` only if there are actual visual changes.
|
53
|
+
Please check in a new `diagram_examples.png` only if there are actual visual changes.
|
data/lib/graph.dot.erb
CHANGED
@@ -150,7 +150,7 @@ digraph package_diagram {
|
|
150
150
|
<%- if options.show_visibility -%>
|
151
151
|
O [ fontsize=12 shape=box label="package"]
|
152
152
|
P [ fontsize=12 shape=box label="package"]
|
153
|
-
O -> P [label="
|
153
|
+
O -> P [label="visible to" <%= VisualizePacks::ArrowHead::ConfiguredVisibleTo.serialize %>]
|
154
154
|
<%- end -%>
|
155
155
|
<%- if options.show_relationship_todos -%>
|
156
156
|
<%- if options.relationship_todo_types.include?(EdgeTodoTypes::Privacy) -%>
|
@@ -205,4 +205,4 @@ digraph package_diagram {
|
|
205
205
|
LEGEND_NODE_2 -> "<%= all_team_names.last %><%= all_team_names.last %>" [style=invis]
|
206
206
|
<%- end -%>
|
207
207
|
<%- end -%>
|
208
|
-
}
|
208
|
+
}
|
data/lib/visualize_packs.rb
CHANGED
@@ -20,7 +20,7 @@ module VisualizePacks
|
|
20
20
|
VisibilityTodo = new('color=darkred style=dashed arrowhead=tee')
|
21
21
|
FolderVisibilityTodo = new('color=darkred style=dashed arrowhead=odot')
|
22
22
|
ConfiguredDependency = new('color=darkgreen')
|
23
|
-
|
23
|
+
ConfiguredVisibleTo = new('color=blue')
|
24
24
|
ConfiguredNested = new('color=purple')
|
25
25
|
end
|
26
26
|
end
|
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.23
|
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-
|
11
|
+
date: 2023-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|