visualize_packs 0.5.7 → 0.5.9

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: 698ac9ebae377a99e2b9b5fe62c3646bcaa8b4ce81439feee7354d81d80682c1
4
- data.tar.gz: 15335a5ce4cc6eb90926af902da548c268bc6c86caa8ae6fd9df5127cfb7e071
3
+ metadata.gz: 06613b520a9c2df95a6bef04aeef2fc1658b6e9ac6ce073db977db6bc72170af
4
+ data.tar.gz: 82f9e53a88d7e094b424a9e58f228172afcc621e38dc0d154609df26cbd9129e
5
5
  SHA512:
6
- metadata.gz: 79f8106bfafe0a7cd9c17ff6f886871b4a24990e562a389b5dab45ff5838a3a0a22fc225d44ea7afcdeb8d8a20ff98e2037b74ed95cd170964027b8b53d40176
7
- data.tar.gz: 5e5d466148f46ee4876baa8ae184187115bc5d77f66d36d8396867c4fb61066f47ac6b32e22781fcbd4d98c7b387f60f271a8b0cc1a89f91ba383462ca48fcec
6
+ metadata.gz: 7da1041d6cb907ba9f7e2da5e5d411344fd28d83bbc8045f7c6c0b5a0becc88ad090a1a3ffb8b8c4fdcbb5837e912bb867c9bf11651887d2ca7335d884df36ee
7
+ data.tar.gz: f6a7b5915af1499829ab9bfde65eb202ba638885e3a233e0048a14eea84830360feb5969101a79b8e943d13e50a5afa372a24524a105dd0a0e5a888d3bcd0f7c
data/bin/visualize_packs CHANGED
@@ -39,7 +39,7 @@ OptionParser.new do |opt|
39
39
  opt.on('--focus_folder=FOLDER', "Draw package diagram only for packages in FOLDER") { |o| options.focus_folder = o }
40
40
  opt.on('--no_nested_relationships', "Don't draw relationships between parents and nested packs") { |o| options.show_nested_relationships = false }
41
41
 
42
- opt.on('--exclude-packs=pack1,pack2,etc', "Exclude these packs from diagram") { |o| options.exclude_packs = o.to_s.split(",") }
42
+ opt.on('--exclude-packs=pack1,pack2,etc', "Exclude listed packs from diagram. Allows filname matching style wildcards like 'packs/ignores/*'") { |o| options.exclude_packs = o.to_s.split(",") }
43
43
 
44
44
  opt.on('--remote-base-url=PACKAGE', "Link package nodes to an URL (affects graphviz SVG generation)") { |o| options.remote_base_url = o }
45
45
 
data/lib/graph.dot.erb CHANGED
@@ -91,7 +91,9 @@ digraph package_diagram {
91
91
  <%- todo_types.keys.each do |todo_type| -%>
92
92
  <%- if show_edge.call(package.name, todos_to_package) -%>
93
93
  "<%= package.name -%>" -> "<%= todos_to_package -%>"<%= todo_type == 'privacy' ? ':private' : '' -%> [ color=darkred style=dashed
94
- constraint=false
94
+ <%- if options.show_dependencies -%>
95
+ constraint=false
96
+ <%- end -%>
95
97
  # headlabel="<%= todo_type -%>"
96
98
  <%- if todo_type == 'privacy' -%>
97
99
  arrowhead=crow
@@ -169,7 +169,7 @@ module VisualizePacks
169
169
  end
170
170
 
171
171
  if exclude_packs.any?
172
- result = result.reject { |p| exclude_packs.include? p }
172
+ result = result.reject { |p| exclude_pack?(p, exclude_packs) }
173
173
  end
174
174
 
175
175
  result.map { |pack_name| ParsePackwerk.find(pack_name) }
@@ -246,4 +246,8 @@ module VisualizePacks
246
246
 
247
247
  morphed_packages.reject { |p| nested_packages.keys.include?(p.name) }
248
248
  end
249
+
250
+ def self.exclude_pack?(pack, exclude_packs)
251
+ exclude_packs.any? {|p| File.fnmatch(p, pack)}
252
+ end
249
253
  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.7
4
+ version: 0.5.9
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-08-29 00:00:00.000000000 Z
11
+ date: 2023-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler