visualize_packs 0.5.7 → 0.5.8

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: 698ac9ebae377a99e2b9b5fe62c3646bcaa8b4ce81439feee7354d81d80682c1
4
- data.tar.gz: 15335a5ce4cc6eb90926af902da548c268bc6c86caa8ae6fd9df5127cfb7e071
3
+ metadata.gz: a06b4d017a98eb6559d32111145f3e54eb06480591b5cbd15bea539e45dbc502
4
+ data.tar.gz: 0f462f35f53ed0c34263539ebf2bac51a97299df0cfeefaa925576d8f9e809a7
5
5
  SHA512:
6
- metadata.gz: 79f8106bfafe0a7cd9c17ff6f886871b4a24990e562a389b5dab45ff5838a3a0a22fc225d44ea7afcdeb8d8a20ff98e2037b74ed95cd170964027b8b53d40176
7
- data.tar.gz: 5e5d466148f46ee4876baa8ae184187115bc5d77f66d36d8396867c4fb61066f47ac6b32e22781fcbd4d98c7b387f60f271a8b0cc1a89f91ba383462ca48fcec
6
+ metadata.gz: 456f70ee594efe28a8628a836dc53e6a032ade6bcbdf5f86dd46b4b6a03f4574f6345b8f1510380c479243bbc428c43af5964dc542288db091e0b53686aa990c
7
+ data.tar.gz: c0fdb54da8673bb39bd63deb76b89bc72051c1a81e0bc8c7b87488bc2ac054c95ec2d961936302cc856583f23c5a435b6865ebed14b4dc00ad2b17a47a2fcd07
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
 
@@ -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,7 +1,7 @@
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.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusto Engineers