pocky 1.3.0 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +13 -5
- data/Rakefile +3 -3
- data/lib/Rakefile +4 -0
- data/lib/pocky.rb +2 -1
- data/lib/pocky/{graph.rb → packwerk.rb} +5 -4
- data/lib/pocky/version.rb +1 -1
- data/lib/railtie.rb +13 -0
- data/lib/tasks/generate.rake +8 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1bd1bd4dd6b8693596464cce4a18d69e015acb74d0534bf80c0f4861dbcb3487
|
4
|
+
data.tar.gz: b04b473ba73db68dcdd62ba9e76bf8ef25d2febba6ffe9cc11d1d90946f74243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b572f0aeb26942d289a15ac2d066bcdaa2908810f3cc729725f212c41598dabb33690b72da3e3deb35b7945e668d70ddccca498f00043abc25ac5a36252949cb
|
7
|
+
data.tar.gz: 29c7d372e528161abc4e3c833521860a89a4411fd2f5cb35f294df150b0c697256b38dd8ca34009be21250467b14a1600bda76fa556e0fa2bdd2d96bf8701571
|
data/README.md
CHANGED
@@ -6,18 +6,26 @@ Pocky generates dependency graphs for your packwerk packages. The gem is named a
|
|
6
6
|
|
7
7
|
## Usage
|
8
8
|
|
9
|
+
Invoke from irb or code
|
9
10
|
```ruby
|
10
|
-
Pocky::
|
11
|
+
Pocky::Packwerk.generate(
|
11
12
|
root_path: 'path/to/app/packages',
|
12
|
-
default_package: '
|
13
|
-
package_prefix: 'app/packages',
|
14
|
-
|
13
|
+
default_package: 'Default', # The default package listed as "." in deprecated_references.yml
|
14
|
+
package_prefix: 'app/packages', # this is for matching package names listed in deprecated_references.yml
|
15
|
+
filename: 'packwerk-viz.png', # Name of output file
|
16
|
+
dpi: 150 # Output file resolution
|
15
17
|
)
|
16
18
|
```
|
17
19
|
|
18
20
|
![pocky-graph](https://user-images.githubusercontent.com/138784/103251690-a6299b80-492e-11eb-92f1-205752d850d8.png)
|
19
21
|
|
20
|
-
Note that the the
|
22
|
+
Note that the the bold edges indicate heavier dependencies.
|
23
|
+
|
24
|
+
Invoke as a rake task
|
25
|
+
|
26
|
+
```
|
27
|
+
rake pocky:generate[path/to/app/packages,Default,app/packages,packwerk-viz.png,150]
|
28
|
+
```
|
21
29
|
|
22
30
|
## Installation
|
23
31
|
|
data/Rakefile
CHANGED
data/lib/Rakefile
ADDED
data/lib/pocky.rb
CHANGED
@@ -4,7 +4,7 @@ require 'yaml'
|
|
4
4
|
require 'ruby-graphviz'
|
5
5
|
|
6
6
|
module Pocky
|
7
|
-
class
|
7
|
+
class Packwerk
|
8
8
|
MAX_EDGE_WIDTH = 5
|
9
9
|
|
10
10
|
def self.generate(params)
|
@@ -16,13 +16,14 @@ module Pocky
|
|
16
16
|
root_path:,
|
17
17
|
default_package: 'Default',
|
18
18
|
package_prefix: '',
|
19
|
-
|
19
|
+
filename: 'packwerk-viz.png',
|
20
|
+
dpi: 150
|
20
21
|
)
|
21
22
|
@root_path = root_path
|
22
23
|
@default_package = default_package
|
23
24
|
@package_prefix = package_prefix
|
24
25
|
@output_filename = output_filename
|
25
|
-
|
26
|
+
@output_dpi = output_dpi.to_i
|
26
27
|
@deprecated_references = {}
|
27
28
|
@nodes = {}
|
28
29
|
end
|
@@ -35,7 +36,7 @@ module Pocky
|
|
35
36
|
private
|
36
37
|
|
37
38
|
def build_directed_graph
|
38
|
-
graph = GraphViz.new(:G, type: :digraph, dpi:
|
39
|
+
graph = GraphViz.new(:G, type: :digraph, dpi: @output_dpi)
|
39
40
|
@deprecated_references.each do |package, references|
|
40
41
|
@nodes[package] ||= graph.add_nodes(package)
|
41
42
|
references.each do |provider, dependencies|
|
data/lib/pocky/version.rb
CHANGED
data/lib/railtie.rb
ADDED
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: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Quan Nguyen
|
@@ -40,9 +40,12 @@ files:
|
|
40
40
|
- Rakefile
|
41
41
|
- bin/console
|
42
42
|
- bin/setup
|
43
|
+
- lib/Rakefile
|
43
44
|
- lib/pocky.rb
|
44
|
-
- lib/pocky/
|
45
|
+
- lib/pocky/packwerk.rb
|
45
46
|
- lib/pocky/version.rb
|
47
|
+
- lib/railtie.rb
|
48
|
+
- lib/tasks/generate.rake
|
46
49
|
- pocky.gemspec
|
47
50
|
homepage: https://github.com/mquan/pocky
|
48
51
|
licenses:
|
@@ -66,8 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
66
69
|
- !ruby/object:Gem::Version
|
67
70
|
version: '0'
|
68
71
|
requirements: []
|
69
|
-
|
70
|
-
rubygems_version: 2.4.5
|
72
|
+
rubygems_version: 3.1.4
|
71
73
|
signing_key:
|
72
74
|
specification_version: 4
|
73
75
|
summary: A ruby gem that generates dependency graph for your packwerk packages
|