pocky 2.2.0 → 2.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/lib/pocky/packwerk.rb +6 -6
- data/lib/pocky/tasks/generate.rake +4 -2
- data/lib/pocky/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf6db66f143fca23ba7dd902fc5af98d3d664972
|
4
|
+
data.tar.gz: a7acc183fe0d502d6a4a48b5866617a335c4b6ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05e7cc845b387c26c5a65c2d3503d5080b807ee61328538cd267680546d7b32cbdbbebb14327560bdbad2a9927c4552ce5281b75f105e564922a89b6c0f105a8
|
7
|
+
data.tar.gz: d2aebfb4e4f70e8e5b90925825d082acf5ade98b85e8d5cf81c46d4b5d3733845bdf5c2364c5a44fe196e8cb6146acb400cfc652241d3746c727ec5e83331cee
|
data/README.md
CHANGED
@@ -26,9 +26,10 @@ Pocky::Packwerk.generate(
|
|
26
26
|
default_package: 'app', # The default package listed as "." in package.yml and deprecated_references.yml
|
27
27
|
filename: 'packwerk.png', # Name of output file
|
28
28
|
dpi: 100, # Output file resolution
|
29
|
-
package_color: '#5CC8FF',
|
30
|
-
deprecated_reference_edge: 'black',
|
29
|
+
package_color: '#5CC8FF', # color name or hex color, see https://graphviz.org/doc/info/colors.html for more details
|
31
30
|
dependency_edge: 'darkgreen',
|
31
|
+
deprecated_reference_edge: 'black',
|
32
|
+
deprecated_reference_ranking: true, # Set ranking for deprecated references. Set to false to organize nodes on the same vertical level.
|
32
33
|
)
|
33
34
|
```
|
34
35
|
|
data/lib/pocky/packwerk.rb
CHANGED
@@ -25,7 +25,8 @@ module Pocky
|
|
25
25
|
dpi: 100,
|
26
26
|
package_color: '#5CC8FF',
|
27
27
|
dependency_edge: 'darkgreen',
|
28
|
-
deprecated_reference_edge: 'black'
|
28
|
+
deprecated_reference_edge: 'black',
|
29
|
+
deprecated_reference_ranking: true
|
29
30
|
)
|
30
31
|
@package_paths = [*package_path] if package_path
|
31
32
|
@root_path = defined?(Rails) ? Rails.root : Pathname.new(Dir.pwd)
|
@@ -46,14 +47,14 @@ module Pocky
|
|
46
47
|
style: 'filled, rounded',
|
47
48
|
shape: 'box',
|
48
49
|
}
|
50
|
+
@dependency_edge_options = {
|
51
|
+
color: dependency_edge
|
52
|
+
}
|
49
53
|
|
50
54
|
@deprecated_references_edge_options = {
|
51
55
|
color: deprecated_reference_edge,
|
52
56
|
}
|
53
|
-
|
54
|
-
@dependency_edge_options = {
|
55
|
-
color: dependency_edge
|
56
|
-
}
|
57
|
+
@deprecated_references_edge_options.merge!(constraint: false) unless deprecated_reference_ranking
|
57
58
|
end
|
58
59
|
|
59
60
|
def generate
|
@@ -99,7 +100,6 @@ module Pocky
|
|
99
100
|
@nodes[provider_package],
|
100
101
|
**@deprecated_references_edge_options.merge(
|
101
102
|
penwidth: edge_width(invocations.length),
|
102
|
-
constraint: false,
|
103
103
|
),
|
104
104
|
)
|
105
105
|
end
|
@@ -2,7 +2,9 @@ require 'pocky'
|
|
2
2
|
|
3
3
|
namespace :pocky do
|
4
4
|
desc 'Generate dependency graph for packwerk packages'
|
5
|
-
task :generate, [:package_path, :default_package, :filename, :dpi, :package_color, :deprecated_reference_edge, :
|
6
|
-
|
5
|
+
task :generate, [:package_path, :default_package, :filename, :dpi, :package_color, :dependency_edge, :deprecated_reference_edge, :deprecated_reference_ranking] do |_task, args|
|
6
|
+
params = args.to_h
|
7
|
+
params.merge!(package_path: args[:package_path].split(/\s+/)) if args[:package_path]
|
8
|
+
Pocky::Packwerk.generate(params)
|
7
9
|
end
|
8
10
|
end
|
data/lib/pocky/version.rb
CHANGED