gv 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +4 -3
- data/gv.gemspec +13 -11
- data/lib/gv/version.rb +1 -1
- data/lib/gv.rb +69 -64
- data/spec/graph_spec.rb +44 -41
- data/spec/render.png +0 -0
- data/spec/spec_helper.rb +4 -1
- metadata +48 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 92d208286b90fddbf8c5c1660c0ef7a9c571c4de2c798f2329456cda47b1b375
|
4
|
+
data.tar.gz: 247302d77d98a3709826893687b518e78bbb4c59bd7e187ab46f91c8bdbe77e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 153040bdbaed5d91e3438cb2354203b1c1dd8ba0fe9e328d7b23fb3101f7160f5cea7277f23d27ff58b434e9b175044e203a5b517316400835e9b9bf4c75d584
|
7
|
+
data.tar.gz: 34b4de2d1454cfdd059ee0fac8f989820fc39322dd3e27eb4607363f8c4966a60886e3fd52fc45442d4168bf887e2efa6122c16b97930e7ef813560bf9eb1693
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
[![Gem Version](https://badge.fury.io/rb/gv.svg)](https://badge.fury.io/rb/gv)
|
2
|
-
[![
|
2
|
+
[![Inline docs](http://inch-ci.org/github/furunkel/gv.svg?branch=master)](http://inch-ci.org/github/furunkel/gv)
|
3
3
|
[![Build Status](https://travis-ci.org/furunkel/gv.svg?branch=master)](https://travis-ci.org/furunkel/gv)
|
4
4
|
|
5
|
-
#
|
5
|
+
# Graphviz FFI
|
6
6
|
|
7
|
-
Ruby bindings for libgvc (Graphviz) using FFI.
|
7
|
+
Ruby bindings for libcgraph and libgvc (Graphviz) using FFI.
|
8
8
|
|
9
9
|
## Installation
|
10
10
|
|
@@ -49,6 +49,7 @@ graph = GV::Graph.load File.open('g.dot')
|
|
49
49
|
# render graph
|
50
50
|
graph.render
|
51
51
|
```
|
52
|
+
See the [documentation](http://www.rubydoc.info/gems/gv) for details.
|
52
53
|
|
53
54
|
## Contributing
|
54
55
|
|
data/gv.gemspec
CHANGED
@@ -4,23 +4,25 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'gv/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'gv'
|
8
8
|
spec.version = GV::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['furunkel']
|
10
|
+
spec.email = ['furunkel@polyadic.com']
|
11
11
|
spec.summary = %q{Graphviz for Ruby, using libgvc via FFI}
|
12
|
-
spec.homepage =
|
13
|
-
spec.license =
|
12
|
+
spec.homepage = 'https://github.com/furunkel/gv'
|
13
|
+
spec.license = 'MIT'
|
14
14
|
|
15
15
|
spec.files = `git ls-files -z`.split("\x0")
|
16
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
|
-
spec.require_paths = [
|
18
|
+
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.
|
21
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
22
|
-
spec.add_development_dependency "minitest"
|
23
|
-
spec.add_development_dependency "yard"
|
20
|
+
spec.add_dependency 'ffi', '>= 1.11'
|
24
21
|
|
25
|
-
spec.
|
22
|
+
spec.add_development_dependency 'bundler', '>= 2'
|
23
|
+
spec.add_development_dependency 'rake', '>= 10.0'
|
24
|
+
spec.add_development_dependency 'yard', '>= 0.9'
|
25
|
+
spec.add_development_dependency 'minitest', '>= 5.8'
|
26
|
+
spec.add_development_dependency 'minitest-reporters', '> 1.1'
|
27
|
+
spec.add_development_dependency 'rubocop', '>= 0.41'
|
26
28
|
end
|
data/lib/gv/version.rb
CHANGED
data/lib/gv.rb
CHANGED
@@ -2,25 +2,22 @@ require 'gv/version'
|
|
2
2
|
require 'ffi'
|
3
3
|
|
4
4
|
module GV
|
5
|
-
|
6
|
-
module LibCGraph
|
5
|
+
module Libcgraph
|
7
6
|
extend FFI::Library
|
8
7
|
|
9
8
|
ffi_lib 'cgraph'
|
10
9
|
|
11
10
|
class AGraph < FFI::AutoPointer
|
12
11
|
def self.release(ptr)
|
13
|
-
|
12
|
+
Libcgraph.agclose(ptr) unless ptr.null?
|
14
13
|
end
|
15
14
|
end
|
16
15
|
|
17
|
-
|
18
16
|
typedef :pointer, :ag_node
|
19
17
|
typedef :pointer, :ag_edge
|
20
18
|
|
21
|
-
|
22
19
|
attach_function :agmemread, [:string], AGraph
|
23
|
-
attach_function :agopen, [
|
20
|
+
attach_function :agopen, %i[string long pointer], AGraph
|
24
21
|
attach_function :agclose, [AGraph], :int
|
25
22
|
|
26
23
|
attach_variable :Agundirected, :long
|
@@ -37,36 +34,37 @@ module GV
|
|
37
34
|
|
38
35
|
attach_function :agtail, [:ag_edge], :ag_node
|
39
36
|
attach_function :aghead, [:ag_edge], :ag_node
|
40
|
-
attach_function :agget, [
|
37
|
+
attach_function :agget, %i[pointer string], :string
|
41
38
|
|
42
|
-
attach_function :agsafeset, [
|
39
|
+
attach_function :agsafeset, %i[pointer string string string], :pointer
|
43
40
|
attach_function :agstrdup_html, [AGraph, :string], :pointer
|
44
41
|
attach_function :agstrfree, [AGraph, :pointer], :int
|
45
42
|
|
46
43
|
attach_function :agisdirected, [AGraph], :int
|
47
44
|
attach_function :agisstrict, [AGraph], :int
|
48
45
|
end
|
49
|
-
private_constant :
|
46
|
+
private_constant :Libcgraph
|
50
47
|
|
51
|
-
module
|
48
|
+
module Libgvc
|
52
49
|
extend FFI::Library
|
53
50
|
ffi_lib 'gvc'
|
54
51
|
|
55
52
|
typedef :pointer, :gvc
|
56
53
|
|
57
54
|
attach_function :gvContext, [], :pointer
|
58
|
-
attach_function :gvFreeLayout, [:gvc,
|
59
|
-
attach_function :gvLayout, [:gvc,
|
55
|
+
attach_function :gvFreeLayout, [:gvc, Libcgraph::AGraph], :int
|
56
|
+
attach_function :gvLayout, [:gvc, Libcgraph::AGraph, :string], :int
|
60
57
|
|
61
|
-
attach_function :gvRenderFilename, [:gvc,
|
62
|
-
attach_function :gvRenderData, [:gvc,
|
58
|
+
attach_function :gvRenderFilename, [:gvc, Libcgraph::AGraph, :string, :string], :int
|
59
|
+
attach_function :gvRenderData, [:gvc, Libcgraph::AGraph, :string, :pointer, :pointer], :int
|
63
60
|
attach_function :gvFreeRenderData, [:pointer], :void
|
64
61
|
end
|
65
|
-
private_constant :
|
62
|
+
private_constant :Libgvc
|
66
63
|
|
64
|
+
# Common super-class for edges, nodes and graphs
|
67
65
|
class Component
|
68
66
|
# @!visibility private
|
69
|
-
@@gvc =
|
67
|
+
@@gvc = Libgvc.gvContext
|
70
68
|
|
71
69
|
# @return [Graph, SubGraph] the graph this component belongs to
|
72
70
|
attr_reader :graph
|
@@ -75,9 +73,9 @@ module GV
|
|
75
73
|
# @param string [String] the HTML to parse
|
76
74
|
# @return [Object] a HTML label
|
77
75
|
def html(string)
|
78
|
-
ptr =
|
76
|
+
ptr = Libcgraph.agstrdup_html(graph.ptr, string)
|
79
77
|
string = ptr.read_string
|
80
|
-
|
78
|
+
Libcgraph.agstrfree graph.ptr, ptr
|
81
79
|
|
82
80
|
string
|
83
81
|
end
|
@@ -90,11 +88,11 @@ module GV
|
|
90
88
|
other.is_a?(Component) && ptr == other.ptr
|
91
89
|
end
|
92
90
|
|
93
|
-
alias
|
91
|
+
alias eql? ==
|
94
92
|
|
95
93
|
# @return [String] the component's name
|
96
94
|
def name
|
97
|
-
|
95
|
+
Libcgraph.agnameof ptr
|
98
96
|
end
|
99
97
|
|
100
98
|
# Sets an attribute
|
@@ -102,7 +100,7 @@ module GV
|
|
102
100
|
# @see http://www.graphviz.org/doc/info/attrs.html Node, Edge and Graph Attributes
|
103
101
|
# @param value [Object] attribute value
|
104
102
|
def []=(attr, value)
|
105
|
-
|
103
|
+
Libcgraph.agsafeset(ptr, attr.to_s, value.to_s, '')
|
106
104
|
end
|
107
105
|
|
108
106
|
# Retrieves the value of an attribute
|
@@ -110,48 +108,52 @@ module GV
|
|
110
108
|
# @see http://www.graphviz.org/doc/info/attrs.html Node, Edge and Graph Attributes
|
111
109
|
# @return [Object] the attribute value
|
112
110
|
def [](attr)
|
113
|
-
|
111
|
+
Libcgraph.agget(ptr, attr.to_s)
|
114
112
|
end
|
115
113
|
|
116
114
|
protected
|
115
|
+
|
117
116
|
attr_reader :ptr
|
118
117
|
end
|
119
118
|
|
119
|
+
# Represents a node in the graph
|
120
120
|
class Node < Component
|
121
121
|
def initialize(graph, name_or_ptr)
|
122
122
|
@graph = graph
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
123
|
+
@ptr =
|
124
|
+
case name_or_ptr
|
125
|
+
when String
|
126
|
+
Libcgraph.agnode(graph.ptr, name_or_ptr, 1)
|
127
|
+
else
|
128
|
+
name_or_ptr
|
129
|
+
end
|
129
130
|
end
|
130
131
|
end
|
131
132
|
|
133
|
+
# Represents a connection between nodes
|
132
134
|
class Edge < Component
|
133
135
|
def initialize(graph, name, tail, head)
|
134
136
|
@graph = graph
|
135
137
|
|
136
|
-
@ptr =
|
138
|
+
@ptr = Libcgraph.agedge(graph.ptr, tail.ptr, head.ptr, name, 1)
|
137
139
|
end
|
138
140
|
|
139
141
|
# @return [Node] the head node of the edge
|
140
142
|
def head
|
141
|
-
Node.new @graph,
|
143
|
+
Node.new @graph, Libcgraph.aghead(ptr)
|
142
144
|
end
|
143
145
|
|
144
146
|
# @return [Node] the tail node of the edge
|
145
147
|
def tail
|
146
|
-
Node.new @graph,
|
148
|
+
Node.new @graph, Libcgraph.agtail(ptr)
|
147
149
|
end
|
148
150
|
end
|
149
151
|
|
152
|
+
# Common super-class for graphs and sub-graphs
|
150
153
|
class BaseGraph < Component
|
151
|
-
|
152
154
|
# Creates a new node
|
153
155
|
# @param name [String] the name (identifier) of the node
|
154
|
-
# @param attrs [Hash{String, Symbol => Object}] the attributes
|
156
|
+
# @param attrs [Hash{String, Symbol => Object}] the attributes
|
155
157
|
# to associate with this node
|
156
158
|
# @see http://www.graphviz.org/doc/info/attrs.html Node, Edge and Graph Attributes
|
157
159
|
# @return [Node] the newly created node
|
@@ -186,15 +188,16 @@ module GV
|
|
186
188
|
|
187
189
|
# @return whether this graph is directed
|
188
190
|
def directed?
|
189
|
-
|
191
|
+
Libcgraph.agisdirected(ptr) == 1
|
190
192
|
end
|
191
193
|
|
192
194
|
# @return whether this graph is strict
|
193
195
|
def strict?
|
194
|
-
|
196
|
+
Libcgraph.agisstrict(ptr) == 1
|
195
197
|
end
|
196
198
|
|
197
199
|
private
|
200
|
+
|
198
201
|
def component(klass, args, attrs = {})
|
199
202
|
comp = klass.new self, *args
|
200
203
|
|
@@ -204,18 +207,18 @@ module GV
|
|
204
207
|
|
205
208
|
comp
|
206
209
|
end
|
207
|
-
|
208
210
|
end
|
209
211
|
|
212
|
+
# Represents a sub-graph
|
210
213
|
class SubGraph < BaseGraph
|
211
214
|
def initialize(graph, name)
|
212
215
|
@graph = graph
|
213
|
-
@ptr =
|
216
|
+
@ptr = Libcgraph.agsubg(graph.ptr, name, 1)
|
214
217
|
end
|
215
218
|
end
|
216
219
|
|
220
|
+
# Represents a toplevel graph
|
217
221
|
class Graph < BaseGraph
|
218
|
-
|
219
222
|
class << self
|
220
223
|
private :new
|
221
224
|
|
@@ -227,19 +230,21 @@ module GV
|
|
227
230
|
# @return [Graph] the newly created graph
|
228
231
|
def open(name, type = :directed, strictness = :normal)
|
229
232
|
ag_type = case [type, strictness]
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
233
|
+
when %i[directed normal]
|
234
|
+
Libcgraph.Agdirected
|
235
|
+
when %i[undirected normal]
|
236
|
+
Libcgraph.Agundirected
|
237
|
+
when %i[directed strict]
|
238
|
+
Libcgraph.Agstrictdirected
|
239
|
+
when %i[undirected strict]
|
240
|
+
Libcgraph.Agstrictundirected
|
241
|
+
else
|
242
|
+
raise ArgumentError, "invalid graph type #{[type, strictness]}"
|
243
|
+
end
|
244
|
+
|
245
|
+
graph = new(Libcgraph.agopen(name, ag_type, FFI::Pointer::NULL))
|
246
|
+
|
247
|
+
yield graph if block_given?
|
243
248
|
|
244
249
|
graph
|
245
250
|
end
|
@@ -249,11 +254,11 @@ module GV
|
|
249
254
|
# @return the newly loaded graph
|
250
255
|
def load(io)
|
251
256
|
data = if io.is_a? String
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
new
|
257
|
+
io
|
258
|
+
else
|
259
|
+
io.read
|
260
|
+
end
|
261
|
+
new Libcgraph.agmemread(data)
|
257
262
|
end
|
258
263
|
end
|
259
264
|
|
@@ -271,9 +276,9 @@ module GV
|
|
271
276
|
# @param layout [String] the layout to use, e.g. 'dot' or 'neato' etc.
|
272
277
|
# @return [nil]
|
273
278
|
def save(filename, format = 'png', layout = 'dot')
|
274
|
-
|
275
|
-
|
276
|
-
|
279
|
+
Libgvc.gvLayout(@@gvc, ptr, layout.to_s)
|
280
|
+
Libgvc.gvRenderFilename(@@gvc, ptr, format.to_s, filename)
|
281
|
+
Libgvc.gvFreeLayout(@@gvc, ptr)
|
277
282
|
|
278
283
|
nil
|
279
284
|
end
|
@@ -283,19 +288,19 @@ module GV
|
|
283
288
|
# @param layout [String] the layout to use, e.g. 'dot' or 'neato' etc.
|
284
289
|
# @return [String] the rendered graph in the given format
|
285
290
|
def render(format = 'png', layout = 'dot')
|
286
|
-
|
291
|
+
Libgvc.gvLayout(@@gvc, ptr, layout.to_s)
|
287
292
|
|
288
293
|
data_ptr = FFI::MemoryPointer.new(:pointer, 1)
|
289
294
|
len_ptr = FFI::MemoryPointer.new(:int, 1)
|
290
295
|
|
291
|
-
|
296
|
+
Libgvc.gvRenderData(@@gvc, ptr, format.to_s, data_ptr, len_ptr)
|
292
297
|
len = len_ptr.read_uint
|
293
298
|
data_ptr = data_ptr.read_pointer
|
294
|
-
|
299
|
+
|
295
300
|
data = data_ptr.read_string len
|
296
301
|
|
297
|
-
|
298
|
-
|
302
|
+
Libgvc.gvFreeRenderData(data_ptr)
|
303
|
+
Libgvc.gvFreeLayout(@@gvc, ptr)
|
299
304
|
|
300
305
|
data
|
301
306
|
end
|
data/spec/graph_spec.rb
CHANGED
@@ -1,36 +1,37 @@
|
|
1
1
|
require_relative 'spec_helper'
|
2
|
+
require 'tmpdir'
|
2
3
|
|
3
4
|
include GV
|
4
5
|
|
5
6
|
describe Graph do
|
6
7
|
describe :open do
|
7
|
-
it
|
8
|
+
it 'creates a new graph' do
|
8
9
|
graph = Graph.open 'test'
|
9
|
-
graph.directed
|
10
|
-
graph.strict
|
10
|
+
assert graph.directed?
|
11
|
+
refute graph.strict?
|
11
12
|
|
12
13
|
graph = Graph.open 'test', :directed, :strict
|
13
|
-
graph.strict
|
14
|
-
graph.directed
|
14
|
+
assert graph.strict?
|
15
|
+
assert graph.directed?
|
15
16
|
end
|
16
17
|
|
17
|
-
it
|
18
|
+
it 'takes a block' do
|
18
19
|
Graph.open 'test' do |g|
|
19
|
-
g.directed
|
20
|
-
g.strict
|
20
|
+
assert g.directed?
|
21
|
+
refute g.strict?
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
24
25
|
|
25
26
|
describe :load do
|
26
|
-
it
|
27
|
+
it 'loads graph from file' do
|
27
28
|
f = lambda do |filename|
|
28
29
|
graph = Graph.load filename
|
29
|
-
graph.directed
|
30
|
-
graph.strict
|
31
|
-
|
30
|
+
assert graph.directed?
|
31
|
+
refute graph.strict?
|
32
|
+
assert_equal 'g', graph.name
|
32
33
|
end
|
33
|
-
|
34
|
+
|
34
35
|
filename = File.join(__dir__, 'simple_graph.dot')
|
35
36
|
file = File.open filename
|
36
37
|
f.call file
|
@@ -45,12 +46,12 @@ describe Graph do
|
|
45
46
|
@graph = Graph.open 'test'
|
46
47
|
end
|
47
48
|
|
48
|
-
it
|
49
|
-
@graph.node('test')
|
49
|
+
it 'creates a new node' do
|
50
|
+
assert_kind_of Node, @graph.node('test')
|
50
51
|
end
|
51
52
|
|
52
|
-
it
|
53
|
-
@graph.node('test', color: 'green')[:color]
|
53
|
+
it 'sets given attributes' do
|
54
|
+
assert_equal 'green', @graph.node('test', color: 'green')[:color]
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
@@ -59,23 +60,22 @@ describe Graph do
|
|
59
60
|
@graph = Graph.open 'test'
|
60
61
|
end
|
61
62
|
|
62
|
-
it
|
63
|
-
@graph.sub_graph('test')
|
63
|
+
it 'creates a new sub graph' do
|
64
|
+
assert_kind_of SubGraph, @graph.sub_graph('test')
|
64
65
|
end
|
65
66
|
|
66
|
-
it
|
67
|
-
@graph.sub_graph('test', color: 'green')[:color]
|
67
|
+
it 'sets given attributes' do
|
68
|
+
assert_equal 'green', @graph.sub_graph('test', color: 'green')[:color]
|
68
69
|
end
|
69
70
|
|
70
|
-
it
|
71
|
+
it 'takes a block' do
|
71
72
|
graph = @graph.sub_graph('test') do |g|
|
72
73
|
g[:color] = 'green'
|
73
74
|
end
|
74
|
-
graph[:color]
|
75
|
+
assert_equal 'green', graph[:color]
|
75
76
|
end
|
76
77
|
end
|
77
78
|
|
78
|
-
|
79
79
|
describe :edge do
|
80
80
|
before do
|
81
81
|
@graph = Graph.open 'test'
|
@@ -83,35 +83,38 @@ describe Graph do
|
|
83
83
|
@tail = @graph.node 'tail'
|
84
84
|
end
|
85
85
|
|
86
|
-
it
|
87
|
-
@graph.edge('test', @tail, @head)
|
86
|
+
it 'creates a new edge' do
|
87
|
+
assert_kind_of Edge, @graph.edge('test', @tail, @head)
|
88
88
|
end
|
89
89
|
|
90
|
-
it
|
91
|
-
@graph.edge('test', @tail, @head, color: 'green')[:color]
|
90
|
+
it 'sets given attributes' do
|
91
|
+
assert_equal 'green', @graph.edge('test', @tail, @head, color: 'green')[:color]
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
95
95
|
describe :save do
|
96
|
-
it
|
96
|
+
it 'renders the graph to the given filename' do
|
97
97
|
graph = Graph.open 'test'
|
98
98
|
graph.edge 'e', graph.node('A'), graph.node('B')
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
99
|
+
Tempfile.create(%w(gv_test .png)) do |file|
|
100
|
+
graph.save file.path
|
101
|
+
assert_equal true, File.file?(file.path)
|
102
|
+
end
|
103
103
|
end
|
104
104
|
end
|
105
105
|
|
106
106
|
describe :render do
|
107
|
-
it
|
107
|
+
it 'renders the graph to a string' do
|
108
108
|
graph = Graph.open 'test'
|
109
|
-
graph.edge 'e', graph.node('A'),
|
109
|
+
graph.edge 'e', graph.node('A'),
|
110
|
+
graph.node('B', shape: 'polygon',
|
111
|
+
label: graph.html('<b>bold</b>'))
|
112
|
+
|
110
113
|
data = graph.render
|
111
114
|
|
112
115
|
graph = nil
|
113
116
|
GC.start
|
114
|
-
|
117
|
+
assert_kind_of String, data
|
115
118
|
|
116
119
|
File.write 'spec/render.png', data
|
117
120
|
end
|
@@ -127,17 +130,17 @@ describe Edge do
|
|
127
130
|
end
|
128
131
|
|
129
132
|
it 'gives access to head and tail' do
|
130
|
-
@
|
131
|
-
@
|
133
|
+
assert_equal @head, @edge.head
|
134
|
+
assert_equal @tail, @edge.tail
|
132
135
|
end
|
133
136
|
|
134
137
|
it 'gives access to name' do
|
135
|
-
@edge.name
|
138
|
+
assert_equal 'test', @edge.name
|
136
139
|
end
|
137
140
|
|
138
141
|
it 'gives access to attributes' do
|
139
|
-
@edge[:color]
|
142
|
+
assert_nil @edge[:color]
|
140
143
|
@edge[:color] = 'green'
|
141
|
-
@edge[:color]
|
144
|
+
assert_equal 'green', @edge[:color]
|
142
145
|
end
|
143
146
|
end
|
data/spec/render.png
CHANGED
Binary file
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,88 +1,116 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- furunkel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ffi
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.11'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.11'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - "
|
31
|
+
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
33
|
+
version: '2'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- - "
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
40
|
+
version: '2'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
|
-
- - "
|
45
|
+
- - ">="
|
32
46
|
- !ruby/object:Gem::Version
|
33
47
|
version: '10.0'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
|
-
- - "
|
52
|
+
- - ">="
|
39
53
|
- !ruby/object:Gem::Version
|
40
54
|
version: '10.0'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
56
|
+
name: yard
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
44
58
|
requirements:
|
45
59
|
- - ">="
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
61
|
+
version: '0.9'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - ">="
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
68
|
+
version: '0.9'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
70
|
+
name: minitest
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
75
|
+
version: '5.8'
|
62
76
|
type: :development
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
66
80
|
- - ">="
|
67
81
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
82
|
+
version: '5.8'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: minitest-reporters
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '1.1'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '1.1'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop
|
71
99
|
requirement: !ruby/object:Gem::Requirement
|
72
100
|
requirements:
|
73
101
|
- - ">="
|
74
102
|
- !ruby/object:Gem::Version
|
75
|
-
version: '0'
|
76
|
-
type: :
|
103
|
+
version: '0.41'
|
104
|
+
type: :development
|
77
105
|
prerelease: false
|
78
106
|
version_requirements: !ruby/object:Gem::Requirement
|
79
107
|
requirements:
|
80
108
|
- - ">="
|
81
109
|
- !ruby/object:Gem::Version
|
82
|
-
version: '0'
|
110
|
+
version: '0.41'
|
83
111
|
description:
|
84
112
|
email:
|
85
|
-
-
|
113
|
+
- furunkel@polyadic.com
|
86
114
|
executables: []
|
87
115
|
extensions: []
|
88
116
|
extra_rdoc_files: []
|
@@ -120,8 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
120
148
|
- !ruby/object:Gem::Version
|
121
149
|
version: '0'
|
122
150
|
requirements: []
|
123
|
-
|
124
|
-
rubygems_version: 2.5.1
|
151
|
+
rubygems_version: 3.3.3
|
125
152
|
signing_key:
|
126
153
|
specification_version: 4
|
127
154
|
summary: Graphviz for Ruby, using libgvc via FFI
|
@@ -130,4 +157,3 @@ test_files:
|
|
130
157
|
- spec/render.png
|
131
158
|
- spec/simple_graph.dot
|
132
159
|
- spec/spec_helper.rb
|
133
|
-
has_rdoc:
|