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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a959e82aa82926bcbdc5cc7e33537b7a4aa3135d
4
- data.tar.gz: 8c910efce4731c8faa38487e49d5330b5cf98ce4
3
+ metadata.gz: bf6db66f143fca23ba7dd902fc5af98d3d664972
4
+ data.tar.gz: a7acc183fe0d502d6a4a48b5866617a335c4b6ba
5
5
  SHA512:
6
- metadata.gz: bfe9892ba4b494e65dbd93c6d02ce1ec982851bb373ca494d7b27f090ac9da30bd91653c19a7885018bad48b8859a487fb05d6416167993ee54cfcc04f0b1cee
7
- data.tar.gz: d4a6e984e0eec0d743b6bd26088c0b56d27def6d051acecee208dec046f2b7813c1613cd98996ca6e176f28ff68b58a131008146599eb764de3050a460844721
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', # color name or hex color, see https://graphviz.org/doc/info/colors.html for more details
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
 
@@ -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, :dependency_edge] do |_task, args|
6
- Pocky::Packwerk.generate(args)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pocky
4
- VERSION = "2.2.0"
4
+ VERSION = "2.3.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pocky
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quan Nguyen