depviz 0.3.1 → 0.3.2

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
- SHA1:
3
- metadata.gz: 9de2db147b2a012a02e566f4cb09a9d221a79616
4
- data.tar.gz: 671778c28dcc04b89715f19ac558807a0cda7f75
2
+ SHA256:
3
+ metadata.gz: 444438556fb362373ed28ab7b7b4825d6aa9d16e796854e779cd8649df358ee6
4
+ data.tar.gz: 0c209f6628c5060ee2ae4b7c2db85ec3911e4676864fd6c6449be2b7bbfc1952
5
5
  SHA512:
6
- metadata.gz: 5343e06fe2d67c6185000d75bb870752cd1b45e17ff8b4592c639e1e15e0ba1c684ca85fe2eec4d70cc5cf73fe8663f348ff01c691c71b30ad874a24c5c44752
7
- data.tar.gz: daebe39ea30843cc9fbc04500ed0a2fce16ecd9fdea38a8cf7e7f2bfe5c020e97201a0e88e0eae50f9293814e0d820d529c469a1803400ed7fcf198142512f28
6
+ metadata.gz: 5fb7829f76797e1d8d660fd77c4a3c99052e2a3244cbe85308f71cce6751bd9f4df16bff84974440dcd3f7ed7807f9598b4187d0d3667c8787876ef9670300fa
7
+ data.tar.gz: b69c55268229148fd0d7ca4b5bfe911335c83df902cfc24973ac2c9c673c3ba61197c3f5fb93b5ad19c10ff5703c59c9fc70cdadc198f8929d579ce2a9ade00e
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/lib/depviz.rb CHANGED
@@ -12,18 +12,31 @@ class DepViz
12
12
 
13
13
  class Item
14
14
 
15
- def initialize(s, root: nil, name: name)
16
- @s, @root, @name = s, root, name
15
+ def initialize(s, root: nil, name: name, debug: false)
16
+ @s, @root, @name, @debug = s, root, name, debug
17
17
  end
18
18
 
19
19
  def dependencies()
20
20
 
21
- a = LineTree.new(@s, root: @root).to_doc.root.xpath('//' + @name)
21
+ if @debug then
22
+ puts 'inside DepViz::Item::dependencies'
23
+ puts '@s: ' + @s.inspect
24
+ puts '@root: ' + @root.inspect
25
+ end
22
26
 
23
- s = a.map {|x| x.backtrack.to_s.split('/')[1..-1]}\
24
- .map {|x| x.map.with_index {|y,i| ' ' * i + y }.join("\n")}\
25
- .join("\n")
27
+ a = LineTree.new(@s).to_doc.root.xpath('//' + @name)
28
+ puts 'dep: a: ' + a.inspect if @debug
29
+
30
+ a2 = a.map do |x|
31
+ puts ' dependencies x: ' + x.inspect if @debug
32
+ x.backtrack.to_s.split('/')[1..-1]
33
+ end
34
+ puts 'a2: ' + a2.inspect if @debug
26
35
 
36
+ s = a2.map {|x| x.map.with_index {|y,i| ' ' * i + y }.join("\n")}\
37
+ .join("\n")
38
+ puts 'child s: ' + s.inspect if @debug
39
+
27
40
  dv3 = DepViz.new()
28
41
  dv3.read s
29
42
  dv3
@@ -47,9 +60,9 @@ class DepViz
47
60
 
48
61
  end
49
62
 
50
- def initialize(s='', root: 'platform', style: default_stylesheet())
63
+ def initialize(s='', root: 'platform', style: default_stylesheet(), debug: false)
51
64
 
52
- @style, @root = style, root
65
+ @style, @root, @debug = style, root, debug
53
66
  @header = "
54
67
  <?polyrex schema='items[type]/item[label]' delimiter =' # '?>
55
68
  type: digraph
@@ -68,7 +81,9 @@ type: digraph
68
81
 
69
82
  def item(name)
70
83
 
71
- Item.new @s, root: @root, name: name
84
+ puts 'inside DepViz::item for ' + name.inspect if @debug
85
+ puts '_@s : ' + @s.inspect if @debug
86
+ Item.new @s, root: @root, name: name, debug: @debug
72
87
 
73
88
  end
74
89
 
@@ -125,4 +140,4 @@ STYLE
125
140
 
126
141
  end
127
142
 
128
- end
143
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: depviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -30,7 +30,7 @@ cert_chain:
30
30
  TCqBEF2WnZz6KeKywr1qQSkgenmZJAIRJf6Yc2GlE/o9rTHz+kWZGg9ZvB3AU6qZ
31
31
  2QY=
32
32
  -----END CERTIFICATE-----
33
- date: 2018-01-24 00:00:00.000000000 Z
33
+ date: 2018-08-18 00:00:00.000000000 Z
34
34
  dependencies:
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: pxgraphviz
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.6.13
122
+ rubygems_version: 2.7.6
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: Generates a complete dependency tree from disparate dependencies to an SVG
metadata.gz.sig CHANGED
Binary file