gv 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +28 -3
  3. data/gv.gemspec +1 -1
  4. data/lib/gv/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fdabad8208f3857d6f16f16b5db3d7e005def7a2
4
- data.tar.gz: 5e9d9f1993de38f9e43b80ac61e3f8d75e37c9c4
3
+ metadata.gz: 3ab9a6ec4d306435db96592402c93d4e2746815d
4
+ data.tar.gz: 141d01be0f201f81285c758d217df94d0d34d17e
5
5
  SHA512:
6
- metadata.gz: 8f74f1b224cf335ad1f9328379b1de48d176c169d82499faabe0fe9a2661791b62576dc7540d40719d1e79f4f474c2afbbf99a89263f6e8264b78609cecefaa8
7
- data.tar.gz: 680ecfbd1bd2dd1269aaa43706eaa1f7513c1c9249c234e85bbabdeae61b426d05d2c428aba36043aaeb810c3f4f7049c3bc446e304cf810f8465b162f545ca1
6
+ metadata.gz: 8d1128773dee3e2b1d7a7ea29d1201247cb74ed8bc65e2f75cfbe2eedc00939aa4becd1041061718e171fa0b693689fb7ae331e0d7b5eee83471b8bdca83f8c8
7
+ data.tar.gz: d891316e6792c0be6f6821f81c6b1d3e05bc63fca2b5e897641efb7087ed17af5cb94e326d2f593f8d75826024b3bd3131d3f90d0abe3e9d93c5e2402f2955be
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # GV
2
2
 
3
- TODO: Write a gem description
3
+ Ruby bindings for libgvc (Graphviz) using FFI.
4
4
 
5
5
  ## Installation
6
6
 
@@ -20,11 +20,36 @@ Or install it yourself as:
20
20
 
21
21
  ## Usage
22
22
 
23
- TODO: Write usage instructions here
23
+ ### Create new graph:
24
+ ```ruby
25
+ require 'gv'
26
+
27
+ graph = GV::Graph.open 'g'
28
+ graph.edge 'e', graph.node('A'), graph.node('B', shape: 'polygon')
29
+
30
+ # render to string
31
+ graph.render 'png'
32
+
33
+ # or to a file
34
+ graph.write 'result.png'
35
+ ```
36
+
37
+ #### Result
38
+ ![resilt](/spec/render.png)
39
+
40
+ ### Load existing graph from `.dot` file:
41
+ ```ruby
42
+ require 'gv'
43
+
44
+ graph = GV::Graph.load File.open('g.dot')
45
+
46
+ # render graph
47
+ graph.render
48
+ ```
24
49
 
25
50
  ## Contributing
26
51
 
27
- 1. Fork it ( https://github.com/[my-github-username]/gv/fork )
52
+ 1. Fork it ( https://github.com/furunkel/gv/fork )
28
53
  2. Create your feature branch (`git checkout -b my-new-feature`)
29
54
  3. Commit your changes (`git commit -am 'Add some feature'`)
30
55
  4. Push to the branch (`git push origin my-new-feature`)
data/gv.gemspec CHANGED
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.version = GV::VERSION
9
9
  spec.authors = ["furunkel"]
10
10
  spec.email = ["julian@linux4you.it"]
11
- spec.summary = %q{Graphviz for Ruby, using libgvc directly via FFI}
11
+ spec.summary = %q{Graphviz for Ruby, using libgvc via FFI}
12
12
  spec.homepage = "https://github.com/furunkel/gv"
13
13
  spec.license = "MIT"
14
14
 
@@ -1,3 +1,3 @@
1
1
  module GV
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - furunkel
@@ -108,7 +108,7 @@ rubyforge_project:
108
108
  rubygems_version: 2.4.5
109
109
  signing_key:
110
110
  specification_version: 4
111
- summary: Graphviz for Ruby, using libgvc directly via FFI
111
+ summary: Graphviz for Ruby, using libgvc via FFI
112
112
  test_files:
113
113
  - spec/graph_spec.rb
114
114
  - spec/render.png