depviz 0.1.0

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.
Files changed (6) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +2 -0
  3. data/lib/depviz.rb +66 -0
  4. data.tar.gz.sig +0 -0
  5. metadata +107 -0
  6. metadata.gz.sig +0 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: eaffb3d18b0a6cc7632b74bfffdfd0a0802392ed
4
+ data.tar.gz: 82eafea7592aaaeb420c3652a5a91b1bf591d573
5
+ SHA512:
6
+ metadata.gz: 5b82c635009e1bee787c43ce20e5516ee8c3d50ab7bd0c135ddaf450e3b768089364f52e28dcaa3b742df6b49ea0af91ba37b0a00448399b4fb2a91165fc3a5c
7
+ data.tar.gz: 3742ec178dcd73d9c74fd23b3122e025688a6f153d41acc4037d0f9e0478e311c43f1386fcc6dbcf57f8930ff06ef3d6b59bef24d5d80d200891fc8a64c13a1a
checksums.yaml.gz.sig ADDED
@@ -0,0 +1,2 @@
1
+ ����j�E�e|'�S�2RvV�;/�?
2
+ K���ǖ�M�yq��q���>Eh��ݮ>��O�J�Y�?��B�H\��͠ң�0��m�M�F����QE���g��c��_�+�^�i�9������;�� $�Y�I��%�����!-;4%4M��bǀ|�}��j;t-����@���Q�iYDx{��R�hBYP��+J4���D-l-GkG�D�A�`N��9u�HY�3C�%n�*F����9x�ƅ\jW�c
data/lib/depviz.rb ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ # file: depviz.rb
4
+
5
+ require 'logger'
6
+ require 'pxgraphviz'
7
+ require 'dependency_builder'
8
+
9
+
10
+ class DepViz
11
+
12
+ def initialize(s, root: 'platform', style: default_stylesheet())
13
+
14
+ header = "
15
+ <?polyrex schema='items[type]/item[label]' delimiter =' # '?>
16
+ type: digraph
17
+
18
+ "
19
+ tree = DependencyBuilder.new(s).to_s
20
+ s2 = root + "\n" + tree.lines.map {|x| ' ' + x}.join
21
+ @pxg = PxGraphViz.new(header + s2, style: style)
22
+
23
+ end
24
+
25
+ def to_svg()
26
+ @pxg.to_svg
27
+ end
28
+
29
+ def to_xml()
30
+ @pxg.doc.xml(pretty: true)
31
+ end
32
+
33
+ private
34
+
35
+ def default_stylesheet()
36
+
37
+ <<STYLE
38
+ node {
39
+ color: #ddaa66;
40
+ fillcolor: #447722;
41
+ fontcolor: #ffeecc;
42
+ fontname: 'Trebuchet MS';
43
+ fontsize: 10;
44
+ margin: 0.1;
45
+ penwidth: 1.3;
46
+ style: filled;
47
+ }
48
+
49
+ a node {
50
+ color: #0011ee;
51
+ }
52
+
53
+ edge {
54
+ arrowsize: 0.9;
55
+ color: #666;
56
+ fontcolor: #444444;
57
+ fontname: Verdana;
58
+ fontsize: 8;
59
+ dir: forward;
60
+ weight: 1;
61
+ }
62
+ STYLE
63
+
64
+ end
65
+
66
+ end
data.tar.gz.sig ADDED
Binary file
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: depviz
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - James Robertson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDXjCCAkagAwIBAgIBATANBgkqhkiG9w0BAQUFADAsMSowKAYDVQQDDCFnZW1t
14
+ YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgwMTIxMTkyMzE2WhcN
15
+ MTkwMTIxMTkyMzE2WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
16
+ cnRzb24vREM9ZXUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQ3L67
17
+ 8183BAMBswfY/06QuC63URRc8KHhoCfFC+3DE5h+bSycpUnu4lJ44QvFi1fycMmm
18
+ 2HchCK0cLDX9ZxOqSO4YJWmh99TmA8nvqIDfe0hFx5Zcrn/b6SdKaUOxv6rWpvPw
19
+ OfF3YjaHkeAvgar0xYvagUKESSKLr0Pbc/a7gJKaVZkHJFbnoyEguLYut6OpEEPP
20
+ M78+Mtai/tFbVRwhDmid2BHZS57+4kTXFuA4UqePNVyXt8mrtic1vgNKbsQ0nSbJ
21
+ t9QgEaqEAGSCkFye6b+dx8WVgq0MAchgQ2tvQhifzqRqtmEOhzf0785yKxNEHsDt
22
+ F49kONjTsDQXtJd5AgMBAAGjgYowgYcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
23
+ HQYDVR0OBBYEFGsQrpJ6RZLNIpwQeKMZLs8ZbFFaMCYGA1UdEQQfMB2BG2dlbW1h
24
+ c3RlckBqYW1lc3JvYmVydHNvbi5ldTAmBgNVHRIEHzAdgRtnZW1tYXN0ZXJAamFt
25
+ ZXNyb2JlcnRzb24uZXUwDQYJKoZIhvcNAQEFBQADggEBAGT7n8qvDZb8tAeB600O
26
+ a054HpBNHLJ/HxbMyv+gE2n7yDg3D4sR2X6ekQVW8Rg6emZAhDWa+dREHzL2j+dp
27
+ hU13ewBbz3Oh2+M7+AsLWlp6lB1CwJ/HBaC7ePq2ijbDd8OpJaTRCDh/ICH6vkfm
28
+ otS5scbDgYhQ2MmW2beylEznx9C+GhixFVcxWIDikknpEUvoOYoJalM0a8x5I7JG
29
+ R/eJT/8JSL1Sz0ywBXzMSh8mBjYP5EkovU82TyiYbg0kJ7PSNIM2vb0x/VAO9LCY
30
+ TCqBEF2WnZz6KeKywr1qQSkgenmZJAIRJf6Yc2GlE/o9rTHz+kWZGg9ZvB3AU6qZ
31
+ 2QY=
32
+ -----END CERTIFICATE-----
33
+ date: 2018-01-21 00:00:00.000000000 Z
34
+ dependencies:
35
+ - !ruby/object:Gem::Dependency
36
+ name: pxgraphviz
37
+ requirement: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: '0.4'
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: 0.4.3
45
+ type: :runtime
46
+ prerelease: false
47
+ version_requirements: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - "~>"
50
+ - !ruby/object:Gem::Version
51
+ version: '0.4'
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 0.4.3
55
+ - !ruby/object:Gem::Dependency
56
+ name: dependency_builder
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.1'
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: 0.1.0
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - "~>"
70
+ - !ruby/object:Gem::Version
71
+ version: '0.1'
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 0.1.0
75
+ description:
76
+ email: james@jamesrobertson.eu
77
+ executables: []
78
+ extensions: []
79
+ extra_rdoc_files: []
80
+ files:
81
+ - lib/depviz.rb
82
+ homepage: https://github.com/jrobertson/depviz
83
+ licenses:
84
+ - MIT
85
+ metadata: {}
86
+ post_install_message:
87
+ rdoc_options: []
88
+ require_paths:
89
+ - lib
90
+ required_ruby_version: !ruby/object:Gem::Requirement
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ requirements: []
101
+ rubyforge_project:
102
+ rubygems_version: 2.6.13
103
+ signing_key:
104
+ specification_version: 4
105
+ summary: Generates a complete dependency tree from disparate dependencies to an SVG
106
+ document.
107
+ test_files: []
metadata.gz.sig ADDED
Binary file