graphviz 1.1.0 → 1.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6123888d6233c036411f7c2a69ab27d2bb338a0edf0d3bd51c8d8a7a0d9f24be
4
- data.tar.gz: 483ef5ae45dd35142417f9209d723ba08a40d124039fe2ccd358752c655b26cd
3
+ metadata.gz: e82beddf000e7e1bfd1fd5e9a3eeb026e02fdba7aceda468b5ec12c26e474bbf
4
+ data.tar.gz: c7da9110ff71e4b9ffb02370e9a280baf43edeba0e7aa45bb61e66343a0e70ce
5
5
  SHA512:
6
- metadata.gz: 6818b3d608768b623161dd9040590a0d5e1f5f75c3ae91905565a7b47d882a2bf46efb58191e5675f62a9a959e84cf58e8b458ae2c752393b4abdf79f7b99f37
7
- data.tar.gz: 2e4a0707d00ed505fb4b099a58126f83b8b9f2f7ecbe679797e6adff32ee576fb235e6ea55ed712baf32676bd45d16e791bf9d123fa7fbaa07a330218bcacf63
6
+ metadata.gz: 5849efcc73015c689cfe3ac51b0e6df16900688b2b843e94a23f9fd9cf064f5d58512aa46e66c77b023958145bf360287819f7ced932c3c7c6ce00e7e46ccda5
7
+ data.tar.gz: de31e3956f41ab68056af940fcfb032c7669caa59e8eaaf61f003cc3e1f5fd2d29e5bbcfa18201629f17ceacef2c0c890a4890f8b907c35dc0cfd581bd1afa6f
@@ -46,7 +46,7 @@ module Graphviz
46
46
  def add_node(name = nil, **attributes)
47
47
  name ||= "#{@name}N#{@nodes.count}"
48
48
 
49
- Node.new(name, self, attributes)
49
+ Node.new(name, self, **attributes)
50
50
  end
51
51
 
52
52
  # Add a subgraph with a given name and attributes.
@@ -131,7 +131,7 @@ module Graphviz
131
131
  node.dump_graph(buffer, indent + "\t", options)
132
132
  end
133
133
 
134
- dump_edges(buffer, indent + "\t", options)
134
+ dump_edges(buffer, indent + "\t", **options)
135
135
 
136
136
  buffer.puts "#{indent}}"
137
137
  end
@@ -19,5 +19,5 @@
19
19
  # THE SOFTWARE.
20
20
 
21
21
  module Graphviz
22
- VERSION = "1.1.0"
22
+ VERSION = "1.2.0"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphviz
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-21 00:00:00.000000000 Z
11
+ date: 2020-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: process-pipeline
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: yard
28
+ name: bake-bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,35 +39,35 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: bundler
42
+ name: bake-modernize
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '1.3'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - "~>"
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '1.3'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '3.6'
61
+ version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - "~>"
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
- version: '3.6'
68
+ version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rake
70
+ name: covered
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -80,36 +80,37 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: "\t\tGraphviz is a graph visualisation system. This gem is a lightweight
84
- interface for generating graphs with Graphviz.\n"
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.6'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.6'
97
+ description:
85
98
  email:
86
- - samuel.williams@oriontransfer.co.nz
87
99
  executables: []
88
100
  extensions: []
89
101
  extra_rdoc_files: []
90
102
  files:
91
- - ".gitignore"
92
- - ".rspec"
93
- - ".travis.yml"
94
- - Gemfile
95
- - Guardfile
96
- - README.md
97
- - Rakefile
98
- - examples/demo.rb
99
- - graphviz.gemspec
100
103
  - lib/graphviz.rb
101
104
  - lib/graphviz/edge.rb
102
105
  - lib/graphviz/graph.rb
103
106
  - lib/graphviz/node.rb
104
107
  - lib/graphviz/version.rb
105
- - spec/graphviz/edge_spec.rb
106
- - spec/graphviz/graph_spec.rb
107
- - spec/spec_helper.rb
108
108
  homepage: https://github.com/ioquatix/graphviz
109
109
  licenses:
110
110
  - MIT
111
- metadata: {}
112
- post_install_message:
111
+ metadata:
112
+ funding_uri: https://github.com/sponsors/ioquatix/
113
+ post_install_message:
113
114
  rdoc_options: []
114
115
  require_paths:
115
116
  - lib
@@ -124,12 +125,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
125
  - !ruby/object:Gem::Version
125
126
  version: '0'
126
127
  requirements: []
127
- rubyforge_project:
128
- rubygems_version: 2.7.6
129
- signing_key:
128
+ rubygems_version: 3.1.2
129
+ signing_key:
130
130
  specification_version: 4
131
131
  summary: A lightweight interface for generating graphs with Graphviz.
132
- test_files:
133
- - spec/graphviz/edge_spec.rb
134
- - spec/graphviz/graph_spec.rb
135
- - spec/spec_helper.rb
132
+ test_files: []
data/.gitignore DELETED
@@ -1,17 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
data/.rspec DELETED
@@ -1,3 +0,0 @@
1
- --format documentation
2
- --require spec_helper
3
- --warnings
@@ -1,13 +0,0 @@
1
- language: ruby
2
-
3
- addons:
4
- apt:
5
- packages:
6
- - graphviz
7
-
8
- rvm:
9
- - 2.3
10
- - 2.4
11
- - 2.5
12
- - 2.6
13
- - ruby-head
data/Gemfile DELETED
@@ -1,13 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in graphviz.gemspec
4
- gemspec
5
-
6
- group :development do
7
- gem "guard-rspec"
8
- end
9
-
10
- group :test do
11
- gem 'simplecov'
12
- gem 'coveralls', require: false
13
- end
data/Guardfile DELETED
@@ -1,12 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- directories %w(lib spec)
4
- clearing :on
5
-
6
- ENV['COVERAGE'] = 'y'
7
-
8
- guard :rspec, cmd: "bundle exec rspec" do
9
- watch(%r{^spec/.+_spec\.rb$})
10
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
11
- watch("spec/spec_helper.rb") { "spec" }
12
- end
data/README.md DELETED
@@ -1,72 +0,0 @@
1
- # Graphviz
2
-
3
- Graphviz is a graph visualisation system. This gem is a lightweight interface for generating graphs with Graphviz.
4
-
5
- [![Build Status](https://travis-ci.org/ioquatix/graphviz.svg)](https://travis-ci.org/ioquatix/graphviz)
6
- [![Coverage Status](https://coveralls.io/repos/ioquatix/graphviz/badge.svg)](https://coveralls.io/r/ioquatix/graphviz)
7
-
8
- ## Installation
9
-
10
- Add this line to your application's Gemfile:
11
-
12
- gem 'graphviz'
13
-
14
- And then execute:
15
-
16
- $ bundle
17
-
18
- Or install it yourself as:
19
-
20
- $ gem install graphviz
21
-
22
- ## Usage
23
-
24
- Some example code:
25
-
26
- require 'graphviz';
27
-
28
- g = Graphviz::Graph.new
29
-
30
- foo = g.add_node("Foo")
31
- foo.add_node("Bar")
32
-
33
- foo.attributes[:shape] = 'box3d'
34
- foo.attributes[:color] = 'red'
35
-
36
- # Dup the dot data:
37
- puts g.to_dot
38
-
39
- # Process the graph to output:
40
- Graphviz::output(g, :path => "test.pdf")
41
-
42
- ## Contributing
43
-
44
- 1. Fork it
45
- 2. Create your feature branch (`git checkout -b my-new-feature`)
46
- 3. Commit your changes (`git commit -am 'Add some feature'`)
47
- 4. Push to the branch (`git push origin my-new-feature`)
48
- 5. Create new Pull Request
49
-
50
- ## License
51
-
52
- Released under the MIT license.
53
-
54
- Copyright, 2013, by [Samuel G. D. Williams](http://www.codeotaku.com/samuel-williams).
55
-
56
- Permission is hereby granted, free of charge, to any person obtaining a copy
57
- of this software and associated documentation files (the "Software"), to deal
58
- in the Software without restriction, including without limitation the rights
59
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
60
- copies of the Software, and to permit persons to whom the Software is
61
- furnished to do so, subject to the following conditions:
62
-
63
- The above copyright notice and this permission notice shall be included in
64
- all copies or substantial portions of the Software.
65
-
66
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
67
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
68
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
69
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
70
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
71
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
72
- THE SOFTWARE.
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
@@ -1,37 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative '../lib/graphviz'
4
-
5
- # Hello
6
- # |
7
- # People
8
-
9
- hello = Graphviz::Graph.new("Hello")
10
- keywords = []
11
- keywords[0] = hello.add_node("Hello")
12
- keywords[1] = hello.add_node("People")
13
-
14
- # We link Hello to People
15
- hello_people = keywords[0].connect(keywords[1])
16
-
17
- # People
18
- # / | \
19
- # Bob Jim Kev
20
-
21
- people = Graphviz::Graph.new("People")
22
- persons = []
23
- persons[0] = people.add_node("Bob")
24
- persons[1] = people.add_node("Jim")
25
- persons[2] = people.add_node("Kev")
26
-
27
- # We link people (People = {Bob, Jim, Kev})
28
- people_bob = keywords[1].connect(persons[0])
29
- people_jim = keywords[1].connect(persons[1])
30
- people_kev = keywords[1].connect(persons[2])
31
-
32
- # Attributes for "Hello"
33
- keywords[0].attributes[:shape] = 'box3d'
34
- keywords[0].attributes[:color] = 'red'
35
-
36
- # Generate the Graph (pdf format)
37
- Graphviz::output(hello, :path => "test.pdf")
@@ -1,29 +0,0 @@
1
-
2
- require_relative 'lib/graphviz/version'
3
-
4
- Gem::Specification.new do |spec|
5
- spec.name = "graphviz"
6
- spec.version = Graphviz::VERSION
7
- spec.authors = ["Samuel Williams"]
8
- spec.email = ["samuel.williams@oriontransfer.co.nz"]
9
- spec.description = <<-EOF
10
- Graphviz is a graph visualisation system. This gem is a lightweight interface for generating graphs with Graphviz.
11
- EOF
12
- spec.summary = "A lightweight interface for generating graphs with Graphviz."
13
- spec.homepage = "https://github.com/ioquatix/graphviz"
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files`.split($/)
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.has_rdoc = 'yard'
22
-
23
- spec.add_dependency 'process-pipeline'
24
-
25
- spec.add_development_dependency "yard"
26
- spec.add_development_dependency "bundler", "~> 1.3"
27
- spec.add_development_dependency "rspec", "~> 3.6"
28
- spec.add_development_dependency "rake"
29
- end
@@ -1,15 +0,0 @@
1
-
2
- RSpec.describe Graphviz::Edge do
3
- let(:graph) {Graphviz::Graph.new}
4
-
5
- let(:a) {Graphviz::Node.new(:a, graph)}
6
- let(:b) {Graphviz::Node.new(:b, graph)}
7
-
8
- describe '#to_s' do
9
- subject{a.connect(b)}
10
-
11
- it 'should generate edge string' do
12
- expect(subject.to_s).to be == 'a -> b'
13
- end
14
- end
15
- end
@@ -1,73 +0,0 @@
1
- # Copyright, 2014, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
20
-
21
- require 'graphviz'
22
-
23
- RSpec.describe Graphviz::Graph do
24
- let(:sample_graph_dot) do
25
- <<~EOF
26
- digraph "G" {
27
- "Foo"[shape="box3d", color="red"];
28
- "Bar";
29
- "Foo" -> "Bar";
30
- }
31
- EOF
32
- end
33
-
34
- it "should construct a simple graph" do
35
- foo = subject.add_node("Foo")
36
- foo.add_node("Bar")
37
-
38
- foo.attributes[:shape] = 'box3d'
39
- foo.attributes[:color] = 'red'
40
-
41
- expect(subject.to_dot).to be == sample_graph_dot
42
-
43
- # Process the graph to output:
44
- Graphviz::output(subject, :path => "test.pdf")
45
-
46
- expect(File.exist? "test.pdf").to be true
47
- end
48
-
49
- it "gets a node" do
50
- foo = subject.add_node('Foo')
51
- bar = subject.add_node('Bar')
52
- bar.add_node('Baz')
53
- expect(subject.get_node('Baz')).to be_an(Array)
54
- expect(subject.get_node('Baz').size).to eq 1
55
- expect(subject.get_node('Foo').first).to be_a(Graphviz::Node)
56
- expect(subject.get_node('Nothing')).to be_an(Array)
57
- expect(subject.get_node('Nothing').size).to eq 0
58
- end
59
-
60
- it "checks if a node exists" do
61
- foo = subject.add_node('Foo')
62
- bar = subject.add_node('Bar')
63
- bar.add_node('Baz')
64
- expect(subject.node_exists?('Baz')).to be true
65
- expect(subject.node_exists?('Nothing')).to be false
66
- end
67
-
68
- it 'should raise an error the executable is installed' do
69
- expect do
70
- Graphviz.output(subject, :dot => 'foobarbaz')
71
- end.to raise_error(Errno::ENOENT, 'No such file or directory - foobarbaz')
72
- end
73
- end
@@ -1,31 +0,0 @@
1
-
2
- if ENV['COVERAGE'] || ENV['TRAVIS']
3
- begin
4
- require 'simplecov'
5
-
6
- SimpleCov.start do
7
- add_filter "/spec/"
8
- end
9
-
10
- if ENV['TRAVIS']
11
- require 'coveralls'
12
- Coveralls.wear!
13
- end
14
- rescue LoadError
15
- warn "Could not load simplecov: #{$!}"
16
- end
17
- end
18
-
19
- require "bundler/setup"
20
- require "graphviz"
21
-
22
- Thread.abort_on_exception = true
23
-
24
- RSpec.configure do |config|
25
- # Enable flags like --only-failures and --next-failure
26
- config.example_status_persistence_file_path = ".rspec_status"
27
-
28
- config.expect_with :rspec do |c|
29
- c.syntax = :expect
30
- end
31
- end