graphshaper 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/.travis.yml +1 -0
- data/bin/graphshaper +46 -21
- data/graphshaper.gemspec +2 -1
- data/lib/graphshaper.rb +1 -0
- data/lib/graphshaper/adapters/avocadodb_adapter.rb +7 -4
- data/lib/graphshaper/adapters/dot_adapter.rb +5 -4
- data/lib/graphshaper/adapters/logging_adapter.rb +5 -0
- data/lib/graphshaper/adapters/sql_adapter.rb +41 -0
- data/lib/graphshaper/undirected_graph.rb +10 -19
- data/lib/graphshaper/version.rb +1 -1
- data/spec/adapters/avocadodb_adapter_spec.rb +46 -0
- data/spec/adapters/dot_adapter_spec.rb +2 -0
- data/spec/adapters/logging_adapter_spec.rb +1 -0
- data/spec/adapters/sql_adapter_spec.rb +56 -0
- data/spec/spec_helper.rb +2 -1
- data/spec/undirected_graph_spec.rb +3 -12
- data/templates/schema.sql +20 -0
- metadata +28 -11
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/bin/graphshaper
CHANGED
@@ -3,6 +3,8 @@
|
|
3
3
|
require 'graphshaper'
|
4
4
|
require 'optparse'
|
5
5
|
|
6
|
+
start_time = Time.now
|
7
|
+
|
6
8
|
options = {}
|
7
9
|
|
8
10
|
optparse = OptionParser.new do |opts|
|
@@ -20,6 +22,10 @@ optparse = OptionParser.new do |opts|
|
|
20
22
|
options[:dot] = dot
|
21
23
|
end
|
22
24
|
|
25
|
+
opts.on("-s", "--sql", "Store the graph in sql format") do |sql|
|
26
|
+
options[:sql] = sql
|
27
|
+
end
|
28
|
+
|
23
29
|
opts.on("-p", "--png", "Export the graph as a PNG (graphviz must be installed)") do |png|
|
24
30
|
options[:dot] = png
|
25
31
|
options[:png] = png
|
@@ -38,18 +44,28 @@ if ARGV.length == 0
|
|
38
44
|
exit
|
39
45
|
end
|
40
46
|
|
41
|
-
|
42
|
-
|
43
|
-
|
47
|
+
# check for installed components: graphviz
|
48
|
+
if options[:png] and `which circo` == ""
|
49
|
+
puts "graphviz is not installed, can't export to png. Please install graphviz or run without --png option."
|
50
|
+
exit
|
51
|
+
end
|
52
|
+
|
53
|
+
# check for running component: AvocadoDB
|
54
|
+
if options[:avocado]
|
55
|
+
begin
|
56
|
+
HTTParty.get 'http://localhost:8529'
|
57
|
+
rescue Errno::ECONNREFUSED, Errno::EHOSTUNREACH
|
58
|
+
puts "No AvocadoDB instance is running on port 8529. Please start AvocadoDB or run without --avocado option."
|
59
|
+
exit
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
44
63
|
adapters = []
|
45
|
-
open_files = []
|
46
64
|
|
47
65
|
if options[:log]
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
open_files << edge_output_file
|
52
|
-
adapters << Graphshaper::LoggingAdapter.new(vertex_output_file, edge_output_file)
|
66
|
+
generated_vertices_csv_file = File.new("generated_vertices.csv", "w")
|
67
|
+
generated_edges_csv_file = File.new("generated_edges.csv", "w")
|
68
|
+
adapters << Graphshaper::LoggingAdapter.new(generated_vertices_csv_file, generated_edges_csv_file)
|
53
69
|
end
|
54
70
|
|
55
71
|
if options[:avocado]
|
@@ -57,35 +73,44 @@ if options[:avocado]
|
|
57
73
|
end
|
58
74
|
|
59
75
|
if options[:dot]
|
60
|
-
|
61
|
-
|
62
|
-
dot_adapter = Graphshaper::DotAdapter.new(dot_output_file)
|
63
|
-
adapters << dot_adapter
|
76
|
+
generated_graph_dot_file = File.new("generated_graph.dot", "w")
|
77
|
+
adapters << Graphshaper::DotAdapter.new(generated_graph_dot_file)
|
64
78
|
end
|
65
79
|
|
66
|
-
|
80
|
+
if options[:sql]
|
81
|
+
generated_graph_sql_file = File.new("generated_graph.sql", "w")
|
82
|
+
generated_vertices_sql_file = File.new("generated_vertices.sql", "w")
|
83
|
+
generated_edges_sql_file = File.new("generated_edges.sql", "w")
|
84
|
+
|
85
|
+
adapters << Graphshaper::SqlAdapter.new(generated_graph_sql_file, generated_vertices_sql_file, generated_edges_sql_file)
|
86
|
+
end
|
87
|
+
|
88
|
+
inner_vertices = 20
|
89
|
+
outer_vertices = ARGV.first.to_i - inner_vertices
|
90
|
+
|
91
|
+
graph = Graphshaper::UndirectedGraph.new inner_vertices, adapters: adapters
|
67
92
|
|
68
|
-
graph
|
69
|
-
|
93
|
+
graph.connect_all_vertices
|
94
|
+
|
95
|
+
outer_vertices.times do
|
70
96
|
graph.add_vertex { |preferential_attachment| preferential_attachment > rand }
|
71
97
|
end
|
72
98
|
|
73
|
-
|
74
|
-
|
75
|
-
ellapsed_time = Time.now - start_time
|
99
|
+
adapters.each { |adapter| adapter.close }
|
76
100
|
|
77
101
|
print "#{graph.order} vertices and #{graph.size} edges generated"
|
78
102
|
|
79
103
|
print " and saved into AvocadoDB" if options[:avocado]
|
80
104
|
print " and logged" if options[:log]
|
81
105
|
print " and generated as a dot" if options[:dot]
|
82
|
-
|
83
|
-
open_files.each { |file| file.close }
|
106
|
+
print " and saved in sql format" if options[:sql]
|
84
107
|
|
85
108
|
if options[:png]
|
86
109
|
system('circo -Tpng generated_graph.dot -o generated_graph.png')
|
87
110
|
end
|
88
111
|
|
112
|
+
ellapsed_time = Time.now - start_time
|
113
|
+
|
89
114
|
if ellapsed_time < 2
|
90
115
|
puts " in about one second"
|
91
116
|
elsif ellapsed_time < 60
|
data/graphshaper.gemspec
CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
|
|
6
6
|
gem.email = ["me@moonglum.net"]
|
7
7
|
gem.description = %q{Generate realistic graphs}
|
8
8
|
gem.summary = %q{Graphshaper can generate realistic, scale-free graphs of any size.}
|
9
|
-
gem.homepage = "http://github.com/
|
9
|
+
gem.homepage = "http://moonglum.github.com/graphshaper"
|
10
10
|
|
11
11
|
gem.files = `git ls-files`.split($\)
|
12
12
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
@@ -19,4 +19,5 @@ Gem::Specification.new do |gem|
|
|
19
19
|
gem.add_development_dependency "rake", "~> 0.9.2.2"
|
20
20
|
gem.add_development_dependency "rspec", "~> 2.9.0"
|
21
21
|
gem.add_development_dependency "yard", "~> 0.7.5"
|
22
|
+
gem.add_development_dependency "webmock", "~> 1.8.6"
|
22
23
|
end
|
data/lib/graphshaper.rb
CHANGED
@@ -16,7 +16,6 @@ module Graphshaper
|
|
16
16
|
[@vertex_collection_name, @edge_collection_name].each { |collection| drop_and_create_collection collection}
|
17
17
|
end
|
18
18
|
|
19
|
-
# @return [String] id in the database
|
20
19
|
def add_vertex(id)
|
21
20
|
cmd = "/document?collection=#{@vertex_collection_name}"
|
22
21
|
body = "{ \"id\" : \"#{id}\" }"
|
@@ -34,11 +33,15 @@ module Graphshaper
|
|
34
33
|
@edge_matching[edge_id] = response.parsed_response["_id"]
|
35
34
|
end
|
36
35
|
|
36
|
+
def close
|
37
|
+
|
38
|
+
end
|
39
|
+
|
37
40
|
private
|
38
41
|
|
39
42
|
def drop_and_create_collection(name)
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
+
self.class.delete "/_api/collection/#{name}"
|
44
|
+
self.class.post "/_api/collection", body: "{ \"name\" : \"#{name}\"}"
|
45
|
+
end
|
43
46
|
end
|
44
47
|
end
|
@@ -5,10 +5,6 @@ module Graphshaper
|
|
5
5
|
@output_file << "digraph genereated_graph { \n rankdir=LR;\n node [shape = circle];\n edge [dir=none];\n"
|
6
6
|
end
|
7
7
|
|
8
|
-
def close
|
9
|
-
@output_file << "}"
|
10
|
-
end
|
11
|
-
|
12
8
|
def add_edge(edge_id, in_id, out_id)
|
13
9
|
@output_file << " #{in_id} -> #{out_id} [ label = \"#{edge_id}\" ];\n"
|
14
10
|
end
|
@@ -16,5 +12,10 @@ module Graphshaper
|
|
16
12
|
def add_vertex(vertex_id)
|
17
13
|
@output_file << " #{vertex_id};\n"
|
18
14
|
end
|
15
|
+
|
16
|
+
def close
|
17
|
+
@output_file << "}"
|
18
|
+
@output_file.close
|
19
|
+
end
|
19
20
|
end
|
20
21
|
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
module Graphshaper
|
2
|
+
class SqlAdapter
|
3
|
+
def initialize(schema_file, vertex_file, edge_file)
|
4
|
+
@schema_file = schema_file
|
5
|
+
@vertex_file = vertex_file
|
6
|
+
@edge_file = edge_file
|
7
|
+
|
8
|
+
File.readlines("templates/schema.sql").each do |schema_line|
|
9
|
+
@schema_file << schema_line
|
10
|
+
end
|
11
|
+
|
12
|
+
@vertex_file << "LOCK TABLES `vertices` WRITE;\n"
|
13
|
+
@vertex_file << "INSERT INTO `vertices` (`id`, `vertex_id`)\n"
|
14
|
+
@vertex_file << "VALUES\n\t"
|
15
|
+
|
16
|
+
@edge_file << "LOCK TABLES `edges` WRITE;\n"
|
17
|
+
@edge_file << "INSERT INTO `edges` (`id`, `edge_id`, `from_id`, `to_id`)\n"
|
18
|
+
@edge_file << "VALUES\n\t"
|
19
|
+
|
20
|
+
@first_vertex = true
|
21
|
+
@first_edge = true
|
22
|
+
end
|
23
|
+
|
24
|
+
def add_vertex(vertex_id)
|
25
|
+
@vertex_file << ",\n\t" unless @first_vertex
|
26
|
+
@vertex_file << "(#{vertex_id + 1},#{vertex_id})"
|
27
|
+
@first_vertex = false
|
28
|
+
end
|
29
|
+
|
30
|
+
def add_edge(edge_id, from_id, to_id)
|
31
|
+
@edge_file << ",\n\t" unless @first_edge
|
32
|
+
@edge_file << "(#{edge_id + 1},#{edge_id},#{from_id + 1},#{to_id + 1})"
|
33
|
+
@first_edge = false
|
34
|
+
end
|
35
|
+
|
36
|
+
def close
|
37
|
+
[@vertex_file, @edge_file].each { |file| file << ";\nUNLOCK TABLES;"}
|
38
|
+
[@schema_file, @vertex_file, @edge_file].each { |file| file.close }
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -20,25 +20,6 @@ module Graphshaper
|
|
20
20
|
@edges = Set.new
|
21
21
|
end
|
22
22
|
|
23
|
-
# Create a graph with a given number of vertices. Then it adds random edges until the graph doesn't contain any orphans (vertices without edges).
|
24
|
-
#
|
25
|
-
# @param [Integer] number_of_vertices The number of vertices that the generated graph should have
|
26
|
-
# @param [Hash] options_hash The options to create an undirected graph
|
27
|
-
# @option options_hash [Array<Object>] :adapters An array of adapters you want to use
|
28
|
-
# @return [UndirectedGraph] The generated graph.
|
29
|
-
def UndirectedGraph.without_orphans_with_order_of(number_of_vertices, options_hash = {})
|
30
|
-
graph = self.new number_of_vertices, options_hash
|
31
|
-
|
32
|
-
while graph.number_of_orphans > 0
|
33
|
-
vertex_orphan = graph.orphans.shuffle.first
|
34
|
-
while vertex_orphan == (random_vertex = rand(graph.order)); end
|
35
|
-
|
36
|
-
graph.add_edge vertex_orphan, random_vertex
|
37
|
-
end
|
38
|
-
|
39
|
-
return graph
|
40
|
-
end
|
41
|
-
|
42
23
|
# The number of vertices.
|
43
24
|
#
|
44
25
|
# @return [Integer] Number of vertices.
|
@@ -53,6 +34,16 @@ module Graphshaper
|
|
53
34
|
@edges.length
|
54
35
|
end
|
55
36
|
|
37
|
+
# Connect all orphans with existing nodes
|
38
|
+
def connect_all_vertices
|
39
|
+
while number_of_orphans > 0
|
40
|
+
vertex_orphan = orphans.shuffle.first
|
41
|
+
while vertex_orphan == (random_vertex = rand(order)); end
|
42
|
+
|
43
|
+
add_edge vertex_orphan, random_vertex
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
56
47
|
# Add a new vertex to the graph.
|
57
48
|
# If you call it with a block {|preferential_attachment| ... }, the block will be called for every existing vertex: An edge from the new vertex to this vertex will be created if and only if the block returns true.
|
58
49
|
# @yield [preferential_attachment] The block that tests if the edge should be added.
|
data/lib/graphshaper/version.rb
CHANGED
@@ -0,0 +1,46 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "graphshaper/adapters/avocadodb_adapter"
|
3
|
+
|
4
|
+
describe Graphshaper::AvocadoDbAdapter do
|
5
|
+
before :each do
|
6
|
+
stub_request(:delete, "http://localhost:8529/_api/collection/vertices").to_return(:status => 200, :body => "", :headers => {})
|
7
|
+
stub_request(:post, "http://localhost:8529/_api/collection").with(:body => "{ \"name\" : \"vertices\"}")
|
8
|
+
stub_request(:delete, "http://localhost:8529/_api/collection/edges").to_return(:status => 200, :body => "", :headers => {})
|
9
|
+
stub_request(:post, "http://localhost:8529/_api/collection").with(:body => "{ \"name\" : \"edges\"}")
|
10
|
+
stub_request(:post, "http://localhost:8529/document?collection=vertices")
|
11
|
+
.with(:body => "{ \"id\" : \"1\" }")
|
12
|
+
.to_return(:body => "{ \"_rev\": 26445614, \"_id\": \"73482/26445614\", \"error\": false }", :status => 200 )
|
13
|
+
stub_request(:post, "http://localhost:8529/document?collection=vertices")
|
14
|
+
.with(:body => "{ \"id\" : \"2\" }")
|
15
|
+
.to_return(:body => "{ \"_rev\": 26445614, \"_id\": \"73482/26445615\", \"error\": false }", :status => 200 )
|
16
|
+
stub_request(:post, "http://localhost:8529/edge?collection=edges&from=73482/26445614&to=73482/26445615")
|
17
|
+
.with(:body => "{ \"id\" : \"7\" }")
|
18
|
+
.to_return(:body => "{ \"_rev\": 9683012, \"_id\": \"7848004/9683012\", \"error\": false }", :status => 200)
|
19
|
+
|
20
|
+
@avocado_adapter = Graphshaper::AvocadoDbAdapter.new "vertices", "edges"
|
21
|
+
end
|
22
|
+
|
23
|
+
it "should drop the collections on startup" do
|
24
|
+
WebMock.should have_requested(:delete, "http://localhost:8529/_api/collection/vertices")
|
25
|
+
WebMock.should have_requested(:delete, "http://localhost:8529/_api/collection/edges")
|
26
|
+
end
|
27
|
+
|
28
|
+
it "should create the collections on startup" do
|
29
|
+
WebMock.should have_requested(:post, "http://localhost:8529/_api/collection").with(:body => "{ \"name\" : \"vertices\"}")
|
30
|
+
WebMock.should have_requested(:post, "http://localhost:8529/_api/collection").with(:body => "{ \"name\" : \"edges\"}")
|
31
|
+
end
|
32
|
+
|
33
|
+
it "should add a vertex" do
|
34
|
+
@avocado_adapter.add_vertex 1
|
35
|
+
|
36
|
+
WebMock.should have_requested(:post, "http://localhost:8529/document?collection=vertices").with(:body => "{ \"id\" : \"1\" }")
|
37
|
+
end
|
38
|
+
|
39
|
+
it "should add an edge with the correct vertex ids" do
|
40
|
+
@avocado_adapter.add_vertex 1
|
41
|
+
@avocado_adapter.add_vertex 2
|
42
|
+
@avocado_adapter.add_edge 7, 1, 2
|
43
|
+
|
44
|
+
WebMock.should have_requested(:post, "http://localhost:8529/edge?collection=edges&from=73482/26445614&to=73482/26445615").with(:body => "{ \"id\" : \"7\" }")
|
45
|
+
end
|
46
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require "spec_helper"
|
2
|
+
require "graphshaper/adapters/dot_adapter.rb"
|
2
3
|
|
3
4
|
describe Graphshaper::DotAdapter do
|
4
5
|
before :each do
|
@@ -18,6 +19,7 @@ describe Graphshaper::DotAdapter do
|
|
18
19
|
|
19
20
|
it "should be closeable" do
|
20
21
|
@output_file.should_receive(:<<).with("}")
|
22
|
+
@output_file.should_receive(:close)
|
21
23
|
@dot_adapter.close
|
22
24
|
end
|
23
25
|
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'stringio'
|
2
|
+
require "spec_helper"
|
3
|
+
require "graphshaper/adapters/sql_adapter"
|
4
|
+
|
5
|
+
describe Graphshaper::SqlAdapter do
|
6
|
+
before :each do
|
7
|
+
@schema_file = StringIO.new
|
8
|
+
@vertex_file = StringIO.new
|
9
|
+
@edge_file = StringIO.new
|
10
|
+
end
|
11
|
+
|
12
|
+
describe "generated files" do
|
13
|
+
before :each do
|
14
|
+
@sql_adapter = Graphshaper::SqlAdapter.new @schema_file, @vertex_file, @edge_file
|
15
|
+
end
|
16
|
+
|
17
|
+
it "should write the schema to the file" do
|
18
|
+
schema_string = @schema_file.string
|
19
|
+
|
20
|
+
File.readlines("templates/schema.sql").each do |schema_line|
|
21
|
+
schema_string.should include(schema_line)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
it "should write the vertices to the file" do
|
26
|
+
@sql_adapter.add_vertex(0)
|
27
|
+
@sql_adapter.add_vertex(1)
|
28
|
+
@sql_adapter.close
|
29
|
+
|
30
|
+
vertex_string = @vertex_file.string
|
31
|
+
|
32
|
+
vertex_string.should include(" (1,0),\n")
|
33
|
+
vertex_string.should include(" (2,1);\n")
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should write the vertices to the file" do
|
37
|
+
@sql_adapter.add_edge(0,5,6)
|
38
|
+
@sql_adapter.add_edge(1,7,8)
|
39
|
+
@sql_adapter.close
|
40
|
+
|
41
|
+
edge_string = @edge_file.string
|
42
|
+
|
43
|
+
edge_string.should include(" (1,0,6,7),\n")
|
44
|
+
edge_string.should include(" (2,1,8,9);\n")
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
it "should close the three files" do
|
49
|
+
@schema_file.should_receive(:close)
|
50
|
+
@edge_file.should_receive(:close)
|
51
|
+
@vertex_file.should_receive(:close)
|
52
|
+
|
53
|
+
sql_adapter = Graphshaper::SqlAdapter.new @schema_file, @vertex_file, @edge_file
|
54
|
+
sql_adapter.close
|
55
|
+
end
|
56
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "spec_helper"
|
2
|
+
require "graphshaper/undirected_graph"
|
2
3
|
|
3
4
|
describe Graphshaper::UndirectedGraph do
|
4
5
|
it "should create a graph with a given number of vertices and no edges" do
|
@@ -68,19 +69,9 @@ describe Graphshaper::UndirectedGraph do
|
|
68
69
|
@graph.add_edge 1,2
|
69
70
|
@graph.degree_distribution.should ==[2,2,1]
|
70
71
|
end
|
71
|
-
end
|
72
|
-
|
73
|
-
describe "random generated graph without orphans" do
|
74
|
-
before :each do
|
75
|
-
@graph = Graphshaper::UndirectedGraph.without_orphans_with_order_of 15
|
76
|
-
end
|
77
|
-
|
78
|
-
it "should have the correct order" do
|
79
|
-
@graph.order.should ==(15)
|
80
|
-
end
|
81
72
|
|
82
|
-
it "should
|
83
|
-
@graph.number_of_orphans.
|
73
|
+
it "should be able to connect all vertices" do
|
74
|
+
expect { @graph.connect_all_vertices }.to change{ @graph.number_of_orphans }.by(-5)
|
84
75
|
end
|
85
76
|
end
|
86
77
|
|
@@ -0,0 +1,20 @@
|
|
1
|
+
DROP TABLE IF EXISTS `edges`;
|
2
|
+
DROP TABLE IF EXISTS `vertices`;
|
3
|
+
|
4
|
+
CREATE TABLE `vertices` (
|
5
|
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
6
|
+
`vertex_id` int(11) unsigned NOT NULL,
|
7
|
+
PRIMARY KEY (`id`)
|
8
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
9
|
+
|
10
|
+
CREATE TABLE `edges` (
|
11
|
+
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
|
12
|
+
`edge_id` int(11) unsigned NOT NULL,
|
13
|
+
`from_id` int(11) unsigned NOT NULL,
|
14
|
+
`to_id` int(11) unsigned NOT NULL,
|
15
|
+
PRIMARY KEY (`id`),
|
16
|
+
KEY `from_id` (`from_id`),
|
17
|
+
KEY `to_id` (`to_id`),
|
18
|
+
CONSTRAINT `edges_ibfk_2` FOREIGN KEY (`to_id`) REFERENCES `vertices` (`id`),
|
19
|
+
CONSTRAINT `edges_ibfk_1` FOREIGN KEY (`from_id`) REFERENCES `vertices` (`id`)
|
20
|
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphshaper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-10 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|
16
|
-
requirement: &
|
16
|
+
requirement: &70105889221160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.8.1
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70105889221160
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rake
|
27
|
-
requirement: &
|
27
|
+
requirement: &70105889192700 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 0.9.2.2
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70105889192700
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70105889192240 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.9.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70105889192240
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: yard
|
49
|
-
requirement: &
|
49
|
+
requirement: &70105889191740 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,18 @@ dependencies:
|
|
54
54
|
version: 0.7.5
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70105889191740
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: webmock
|
60
|
+
requirement: &70105889191160 !ruby/object:Gem::Requirement
|
61
|
+
none: false
|
62
|
+
requirements:
|
63
|
+
- - ~>
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: 1.8.6
|
66
|
+
type: :development
|
67
|
+
prerelease: false
|
68
|
+
version_requirements: *70105889191160
|
58
69
|
description: Generate realistic graphs
|
59
70
|
email:
|
60
71
|
- me@moonglum.net
|
@@ -75,13 +86,17 @@ files:
|
|
75
86
|
- lib/graphshaper/adapters/avocadodb_adapter.rb
|
76
87
|
- lib/graphshaper/adapters/dot_adapter.rb
|
77
88
|
- lib/graphshaper/adapters/logging_adapter.rb
|
89
|
+
- lib/graphshaper/adapters/sql_adapter.rb
|
78
90
|
- lib/graphshaper/undirected_graph.rb
|
79
91
|
- lib/graphshaper/version.rb
|
92
|
+
- spec/adapters/avocadodb_adapter_spec.rb
|
80
93
|
- spec/adapters/dot_adapter_spec.rb
|
81
94
|
- spec/adapters/logging_adapter_spec.rb
|
95
|
+
- spec/adapters/sql_adapter_spec.rb
|
82
96
|
- spec/spec_helper.rb
|
83
97
|
- spec/undirected_graph_spec.rb
|
84
|
-
|
98
|
+
- templates/schema.sql
|
99
|
+
homepage: http://moonglum.github.com/graphshaper
|
85
100
|
licenses: []
|
86
101
|
post_install_message:
|
87
102
|
rdoc_options: []
|
@@ -106,8 +121,10 @@ signing_key:
|
|
106
121
|
specification_version: 3
|
107
122
|
summary: Graphshaper can generate realistic, scale-free graphs of any size.
|
108
123
|
test_files:
|
124
|
+
- spec/adapters/avocadodb_adapter_spec.rb
|
109
125
|
- spec/adapters/dot_adapter_spec.rb
|
110
126
|
- spec/adapters/logging_adapter_spec.rb
|
127
|
+
- spec/adapters/sql_adapter_spec.rb
|
111
128
|
- spec/spec_helper.rb
|
112
129
|
- spec/undirected_graph_spec.rb
|
113
130
|
has_rdoc:
|