dagnabit 2.2.6 → 3.0.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.
- data/History.md +105 -0
- data/LICENSE +1 -1
- data/MIGRATION.md +56 -0
- data/README.md +222 -0
- data/bin/dagnabit-test +11 -31
- data/db/connection.rb +3 -0
- data/{test/connections/native_postgresql → db/connections/postgresql}/connection.rb +6 -5
- data/db/models/edge.rb +6 -0
- data/db/models/other_edge.rb +6 -0
- data/db/models/other_vertex.rb +6 -0
- data/db/models/vertex.rb +6 -0
- data/db/schema.rb +32 -0
- data/lib/dagnabit.rb +6 -19
- data/lib/dagnabit/edge.rb +7 -0
- data/lib/dagnabit/edge/activation.rb +14 -0
- data/lib/dagnabit/edge/associations.rb +10 -0
- data/lib/dagnabit/edge/connectivity.rb +38 -0
- data/lib/dagnabit/graph.rb +143 -0
- data/lib/dagnabit/migration.rb +98 -0
- data/lib/dagnabit/version.rb +3 -0
- data/lib/dagnabit/vertex.rb +10 -0
- data/lib/dagnabit/vertex/activation.rb +19 -0
- data/lib/dagnabit/vertex/associations.rb +24 -0
- data/lib/dagnabit/vertex/bonding.rb +43 -0
- data/lib/dagnabit/vertex/connectivity.rb +130 -0
- data/lib/dagnabit/vertex/neighbors.rb +50 -0
- data/lib/dagnabit/vertex/settings.rb +56 -0
- metadata +94 -143
- data/.autotest +0 -5
- data/.document +0 -5
- data/.gitignore +0 -7
- data/Gemfile +0 -15
- data/Gemfile.lock +0 -38
- data/History.txt +0 -81
- data/README.rdoc +0 -202
- data/Rakefile +0 -52
- data/VERSION.yml +0 -5
- data/dagnabit.gemspec +0 -142
- data/init.rb +0 -1
- data/lib/dagnabit/activation.rb +0 -60
- data/lib/dagnabit/link/associations.rb +0 -18
- data/lib/dagnabit/link/class_methods.rb +0 -43
- data/lib/dagnabit/link/configuration.rb +0 -40
- data/lib/dagnabit/link/cycle_prevention.rb +0 -31
- data/lib/dagnabit/link/named_scopes.rb +0 -65
- data/lib/dagnabit/link/transitive_closure_link_model.rb +0 -86
- data/lib/dagnabit/link/transitive_closure_recalculation.rb +0 -17
- data/lib/dagnabit/link/transitive_closure_recalculation/on_create.rb +0 -104
- data/lib/dagnabit/link/transitive_closure_recalculation/on_destroy.rb +0 -125
- data/lib/dagnabit/link/transitive_closure_recalculation/on_update.rb +0 -17
- data/lib/dagnabit/link/transitive_closure_recalculation/utilities.rb +0 -56
- data/lib/dagnabit/link/validations.rb +0 -26
- data/lib/dagnabit/node/associations.rb +0 -84
- data/lib/dagnabit/node/class_methods.rb +0 -74
- data/lib/dagnabit/node/configuration.rb +0 -26
- data/lib/dagnabit/node/neighbors.rb +0 -73
- data/test/connections/native_sqlite3/connection.rb +0 -24
- data/test/dagnabit/link/test_associations.rb +0 -61
- data/test/dagnabit/link/test_class_methods.rb +0 -102
- data/test/dagnabit/link/test_configuration.rb +0 -38
- data/test/dagnabit/link/test_cycle_prevention.rb +0 -64
- data/test/dagnabit/link/test_named_scopes.rb +0 -32
- data/test/dagnabit/link/test_transitive_closure_link_model.rb +0 -69
- data/test/dagnabit/link/test_transitive_closure_recalculation.rb +0 -178
- data/test/dagnabit/link/test_validations.rb +0 -39
- data/test/dagnabit/node/test_associations.rb +0 -147
- data/test/dagnabit/node/test_class_methods.rb +0 -49
- data/test/dagnabit/node/test_configuration.rb +0 -29
- data/test/dagnabit/node/test_neighbors.rb +0 -91
- data/test/helper.rb +0 -26
- data/test/models/beta_node.rb +0 -3
- data/test/models/custom_data_link.rb +0 -4
- data/test/models/customized_link.rb +0 -7
- data/test/models/customized_link_node.rb +0 -4
- data/test/models/link.rb +0 -4
- data/test/models/node.rb +0 -3
- data/test/schema/schema.rb +0 -51
@@ -0,0 +1,19 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w(.. vertex))
|
2
|
+
|
3
|
+
module Dagnabit::Vertex
|
4
|
+
##
|
5
|
+
# This module provides a method to set up all of the Vertex modules in a
|
6
|
+
# class.
|
7
|
+
module Activation
|
8
|
+
##
|
9
|
+
# Sets up dagnabit's vertex modules in a vertex class.
|
10
|
+
def acts_as_vertex
|
11
|
+
extend Associations
|
12
|
+
extend Connectivity
|
13
|
+
extend Settings
|
14
|
+
|
15
|
+
include Bonding
|
16
|
+
include Neighbors
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w(.. vertex))
|
2
|
+
|
3
|
+
module Dagnabit::Vertex
|
4
|
+
##
|
5
|
+
# Associates a vertex with its edges.
|
6
|
+
module Associations
|
7
|
+
include Settings
|
8
|
+
|
9
|
+
##
|
10
|
+
# An override of {Settings#connected_by} that installs `has_many`
|
11
|
+
# associations named `in_edges` and `out_edges` on a vertex model.
|
12
|
+
#
|
13
|
+
# `in_edges` is the collection of edges that flow _into_ a vertex;
|
14
|
+
# `out_edges` is the collection of edges that flow _out of_ a vertex.
|
15
|
+
#
|
16
|
+
# @return [void]
|
17
|
+
def connected_by(*args)
|
18
|
+
super
|
19
|
+
|
20
|
+
has_many :in_edges, :class_name => edge_model_name, :foreign_key => 'child_id', :dependent => :destroy
|
21
|
+
has_many :out_edges, :class_name => edge_model_name, :foreign_key => 'parent_id', :dependent => :destroy
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w(.. vertex))
|
2
|
+
|
3
|
+
module Dagnabit::Vertex
|
4
|
+
##
|
5
|
+
# Contains methods for bonding a vertex to a graph.
|
6
|
+
module Bonding
|
7
|
+
##
|
8
|
+
# Calculates a bond for this vertex (the method receiver) to all source
|
9
|
+
# vertices of `graph`.
|
10
|
+
#
|
11
|
+
# This method expects the receiver to have been persisted, and will raise
|
12
|
+
# `RuntimeError` if that is not the case.
|
13
|
+
#
|
14
|
+
# Persisted edges that already connect the receiver vertex to source
|
15
|
+
# vertices in `graph` will not be duplicated. Unpersisted edges connecting
|
16
|
+
# the receiver to a source in `graph` _will_ be duplicated, so it is
|
17
|
+
# advised that you ensure that all vertices and edges in `graph` have been
|
18
|
+
# persisted before using {#bond_for}.
|
19
|
+
#
|
20
|
+
# This method requires the existence of an edge model; see
|
21
|
+
# {Settings#edge_model} and {Settings#edge_model_name=}. If an edge model
|
22
|
+
# has not been set, this method raises `RuntimeError`.
|
23
|
+
#
|
24
|
+
# Edges instantiated by `bond_for` are not automatically saved.
|
25
|
+
#
|
26
|
+
# @param [Dagnabit::Graph] graph the graph to bond
|
27
|
+
# @return [Array<edge_model>] a list of edges that, when saved, will bond the
|
28
|
+
# vertex to `graph`
|
29
|
+
# @raise [RuntimeError] if an edge model has not been set
|
30
|
+
def bond_for(graph)
|
31
|
+
edge = self.class.edge_model
|
32
|
+
|
33
|
+
raise 'edge_model must be set' unless edge
|
34
|
+
raise "#{self} must be persisted before invoking bond_for" if new_record?
|
35
|
+
|
36
|
+
sources = graph.sources
|
37
|
+
existing = edge.all(:conditions => { :parent_id => id, :child_id => sources.map(&:id) }).map { |e| [e.parent_id, e.child_id] }
|
38
|
+
new = sources.inject([]) { |es, s| es << [id, s.id] }
|
39
|
+
|
40
|
+
(new - existing).map { |p, c| edge.new(:parent_id => p, :child_id => c) }
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,130 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w(.. vertex))
|
2
|
+
|
3
|
+
module Dagnabit::Vertex
|
4
|
+
##
|
5
|
+
# Methods for checking connectivity between vertices.
|
6
|
+
#
|
7
|
+
# This module is meant to be used by ActiveRecord::Base subclasses.
|
8
|
+
module Connectivity
|
9
|
+
include Settings
|
10
|
+
|
11
|
+
##
|
12
|
+
# Finds all source vertices of the given `vertices`. A source vertex is a
|
13
|
+
# vertex that has an indegree of zero.
|
14
|
+
#
|
15
|
+
# The result is the set union of all source vertices of the vertices in
|
16
|
+
# `vertices`. The ordering of the result is unspecified.
|
17
|
+
#
|
18
|
+
# @param [Array<ActiveRecord::Base>] vertices a list of vertices
|
19
|
+
# @return [Array<ActiveRecord::Base>] a list of source vertices
|
20
|
+
def roots_of(*vertices)
|
21
|
+
ids = vertices.map(&:id)
|
22
|
+
|
23
|
+
find_by_sql([%Q{
|
24
|
+
WITH RECURSIVE roots(id) AS (
|
25
|
+
SELECT #{edge_table}.parent_id FROM #{table_name} INNER JOIN #{edge_table} ON #{edge_table}.child_id = #{table_name}.id WHERE #{table_name}.id IN (?)
|
26
|
+
UNION
|
27
|
+
SELECT #{edge_table}.parent_id FROM roots INNER JOIN #{edge_table} ON #{edge_table}.child_id = roots.id
|
28
|
+
)
|
29
|
+
SELECT
|
30
|
+
*
|
31
|
+
FROM
|
32
|
+
#{table_name}
|
33
|
+
WHERE
|
34
|
+
#{table_name}.id IN (SELECT
|
35
|
+
roots.id
|
36
|
+
FROM
|
37
|
+
roots
|
38
|
+
LEFT JOIN
|
39
|
+
#{edge_table} ON roots.id = #{edge_table}.child_id
|
40
|
+
WHERE #{edge_table}.child_id IS NULL)
|
41
|
+
}, ids])
|
42
|
+
end
|
43
|
+
|
44
|
+
##
|
45
|
+
# Find all ancestors of the given `vertices`.
|
46
|
+
#
|
47
|
+
# The result is the set union of all ancestors of the vertices in
|
48
|
+
# `vertices`. The ordering of the result is unspecified.
|
49
|
+
#
|
50
|
+
# @param [Array<ActiveRecord::Base>] vertices a list of vertices
|
51
|
+
# @return [Array<ActiveRecord::Base>] a list of ancestor vertices
|
52
|
+
def ancestors_of(*vertices)
|
53
|
+
ids = vertices.map(&:id)
|
54
|
+
|
55
|
+
find_by_sql([%Q{
|
56
|
+
WITH RECURSIVE ancestors(id) AS (
|
57
|
+
SELECT #{edge_table}.parent_id FROM #{table_name} INNER JOIN #{edge_table} ON #{edge_table}.child_id = #{table_name}.id WHERE #{table_name}.id IN (?)
|
58
|
+
UNION
|
59
|
+
SELECT #{edge_table}.parent_id FROM ancestors INNER JOIN #{edge_table} ON #{edge_table}.child_id = ancestors.id
|
60
|
+
)
|
61
|
+
SELECT * FROM #{table_name} WHERE #{table_name}.id IN (SELECT id FROM ancestors)
|
62
|
+
}, ids])
|
63
|
+
end
|
64
|
+
|
65
|
+
##
|
66
|
+
# Finds all immediate parents of `vertices`.
|
67
|
+
#
|
68
|
+
# The result is the set union of all immediate parents of the vertices in
|
69
|
+
# `vertices`. The ordering of the result is unspecified.
|
70
|
+
#
|
71
|
+
# @param [Array<ActiveRecord::Base>] vertices a list of vertices
|
72
|
+
# @return [Array<ActiveRecord::Base>] a list of parent vertices
|
73
|
+
def parents_of(*vertices)
|
74
|
+
ids = vertices.map(&:id)
|
75
|
+
|
76
|
+
find_by_sql([%Q{
|
77
|
+
SELECT
|
78
|
+
*
|
79
|
+
FROM
|
80
|
+
#{table_name}
|
81
|
+
WHERE
|
82
|
+
#{table_name}.id IN
|
83
|
+
(SELECT parent_id FROM #{edge_table} WHERE child_id IN (?))
|
84
|
+
}, ids])
|
85
|
+
end
|
86
|
+
|
87
|
+
##
|
88
|
+
# Finds all immediate children of `vertices`.
|
89
|
+
#
|
90
|
+
# The result is the set union of all immediate children of the vertices in
|
91
|
+
# `vertices`. The ordering of the result is unspecified.
|
92
|
+
#
|
93
|
+
# @param [Array<ActiveRecord::Base>] vertices a list of vertices
|
94
|
+
# @return [Array<ActiveRecord::Base>] a list of child vertices
|
95
|
+
def children_of(*vertices)
|
96
|
+
ids = vertices.map(&:id)
|
97
|
+
|
98
|
+
find_by_sql([%Q{
|
99
|
+
SELECT
|
100
|
+
*
|
101
|
+
FROM
|
102
|
+
#{table_name}
|
103
|
+
WHERE
|
104
|
+
#{table_name}.id IN
|
105
|
+
(SELECT child_id FROM #{edge_table} WHERE parent_id IN (?))
|
106
|
+
}, ids])
|
107
|
+
end
|
108
|
+
|
109
|
+
##
|
110
|
+
# Find all descendants of the given `vertices`.
|
111
|
+
#
|
112
|
+
# The result is the set union of all descendants of the vertices in
|
113
|
+
# `vertices`. The ordering of the result is unspecified.
|
114
|
+
#
|
115
|
+
# @param [Array<ActiveRecord::Base>] vertices a list of vertices
|
116
|
+
# @return [Array<ActiveRecord::Base>] a list of descendant vertices
|
117
|
+
def descendants_of(*vertices)
|
118
|
+
ids = vertices.map(&:id)
|
119
|
+
|
120
|
+
find_by_sql([%Q{
|
121
|
+
WITH RECURSIVE descendants(id) AS (
|
122
|
+
SELECT #{edge_table}.child_id FROM #{table_name} INNER JOIN #{edge_table} ON #{edge_table}.parent_id = #{table_name}.id WHERE #{table_name}.id IN (?)
|
123
|
+
UNION
|
124
|
+
SELECT #{edge_table}.child_id FROM descendants INNER JOIN #{edge_table} ON #{edge_table}.parent_id = descendants.id
|
125
|
+
)
|
126
|
+
SELECT * FROM #{table_name} WHERE #{table_name}.id IN (SELECT id FROM descendants)
|
127
|
+
}, ids])
|
128
|
+
end
|
129
|
+
end
|
130
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w(.. vertex))
|
2
|
+
|
3
|
+
module Dagnabit::Vertex
|
4
|
+
##
|
5
|
+
# Provides per-vertex connectivity queries.
|
6
|
+
#
|
7
|
+
# This module should be included into a class that has been extended by
|
8
|
+
# {Dagnabit::Vertex::Connectivity}. See this module's spec for example usage.
|
9
|
+
module Neighbors
|
10
|
+
##
|
11
|
+
# Finds all source vertices of the receiver object.
|
12
|
+
#
|
13
|
+
# @return [Array<ActiveRecord::Base>] a list of source vertices
|
14
|
+
def roots
|
15
|
+
self.class.roots_of(self)
|
16
|
+
end
|
17
|
+
|
18
|
+
##
|
19
|
+
# Finds all ancestors of the receiver object.
|
20
|
+
#
|
21
|
+
# @return [Array<ActiveRecord::Base>] a list of ancestor vertices
|
22
|
+
def ancestors
|
23
|
+
self.class.ancestors_of(self)
|
24
|
+
end
|
25
|
+
|
26
|
+
##
|
27
|
+
# Finds all parents of the receiver object.
|
28
|
+
#
|
29
|
+
# @return [Array<ActiveRecord::Base>] a list of parent vertices
|
30
|
+
def parents
|
31
|
+
self.class.parents_of(self)
|
32
|
+
end
|
33
|
+
|
34
|
+
##
|
35
|
+
# Finds all children of the receiver object.
|
36
|
+
#
|
37
|
+
# @return [Array<ActiveRecord::Base>] a list of child vertices
|
38
|
+
def children
|
39
|
+
self.class.children_of(self)
|
40
|
+
end
|
41
|
+
|
42
|
+
##
|
43
|
+
# Finds all descendants of the receiver object.
|
44
|
+
#
|
45
|
+
# @return [Array<ActiveRecord::Base>] a list of descendant vertices
|
46
|
+
def descendants
|
47
|
+
self.class.descendants_of(self)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require File.join(File.dirname(__FILE__), %w(.. vertex))
|
2
|
+
|
3
|
+
module Dagnabit::Vertex
|
4
|
+
##
|
5
|
+
# Contains parameters that can be customized on a per-vertex-model basis.
|
6
|
+
module Settings
|
7
|
+
##
|
8
|
+
# The name of this vertex's edge model.
|
9
|
+
#
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :edge_model_name
|
12
|
+
|
13
|
+
##
|
14
|
+
# The edge model associated with a vertex model.
|
15
|
+
#
|
16
|
+
# @return [Class] the edge model
|
17
|
+
def edge_model
|
18
|
+
edge_model_name.constantize
|
19
|
+
end
|
20
|
+
|
21
|
+
##
|
22
|
+
# The edge table used by connectivity queries. Equivalent to
|
23
|
+
#
|
24
|
+
# edge_model.table_name
|
25
|
+
#
|
26
|
+
# @return [String] the name of the edge table
|
27
|
+
def edge_table
|
28
|
+
edge_model.table_name
|
29
|
+
end
|
30
|
+
|
31
|
+
##
|
32
|
+
# Sets the name of the edge model associated with a vertex.
|
33
|
+
#
|
34
|
+
# {#edge_model} uses ActiveSupport's `constantize` method to look up the
|
35
|
+
# model from `edge_model_name`.
|
36
|
+
#
|
37
|
+
# @param [String] edge_model_name the name of the edge model to use
|
38
|
+
# @return [void]
|
39
|
+
def connected_by(edge_model_name)
|
40
|
+
self.edge_model_name = edge_model_name
|
41
|
+
end
|
42
|
+
|
43
|
+
##
|
44
|
+
# This callback ensures that whenever a class that extends Settings is
|
45
|
+
# inherited, the settings for the superclass are passed to the subclass.
|
46
|
+
#
|
47
|
+
# This callback executes any previously-defined definitions of `inherited`
|
48
|
+
# beforee executing its own code.
|
49
|
+
#
|
50
|
+
# @param [Class] subclass the descendant class
|
51
|
+
def inherited(subclass)
|
52
|
+
super
|
53
|
+
subclass.connected_by(edge_model_name)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dagnabit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
|
-
-
|
8
|
-
-
|
9
|
-
-
|
10
|
-
version:
|
7
|
+
- 3
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 3.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Yip
|
@@ -15,30 +15,29 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2011-01-10 00:00:00 -06:00
|
19
|
+
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
type: :runtime
|
23
|
-
prerelease: false
|
24
22
|
name: activerecord
|
25
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
26
25
|
none: false
|
27
26
|
requirements:
|
28
27
|
- - ~>
|
29
28
|
- !ruby/object:Gem::Version
|
30
|
-
hash:
|
29
|
+
hash: 3
|
31
30
|
segments:
|
32
31
|
- 2
|
33
32
|
- 3
|
34
|
-
-
|
35
|
-
version: 2.3.
|
36
|
-
|
33
|
+
- 0
|
34
|
+
version: 2.3.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
37
|
- !ruby/object:Gem::Dependency
|
38
|
-
|
38
|
+
name: autotest
|
39
39
|
prerelease: false
|
40
|
-
|
41
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
42
41
|
none: false
|
43
42
|
requirements:
|
44
43
|
- - ">="
|
@@ -47,28 +46,26 @@ dependencies:
|
|
47
46
|
segments:
|
48
47
|
- 0
|
49
48
|
version: "0"
|
50
|
-
requirement: *id002
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
49
|
type: :development
|
50
|
+
version_requirements: *id002
|
51
|
+
- !ruby/object:Gem::Dependency
|
52
|
+
name: bluecloth
|
53
53
|
prerelease: false
|
54
|
-
|
55
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
56
55
|
none: false
|
57
56
|
requirements:
|
58
|
-
- - "
|
57
|
+
- - ">="
|
59
58
|
- !ruby/object:Gem::Version
|
60
|
-
hash:
|
59
|
+
hash: 3
|
61
60
|
segments:
|
62
61
|
- 0
|
63
|
-
|
64
|
-
- 8
|
65
|
-
version: 0.9.8
|
66
|
-
requirement: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
62
|
+
version: "0"
|
68
63
|
type: :development
|
64
|
+
version_requirements: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
name: cucumber
|
69
67
|
prerelease: false
|
70
|
-
|
71
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
72
69
|
none: false
|
73
70
|
requirements:
|
74
71
|
- - ">="
|
@@ -77,28 +74,26 @@ dependencies:
|
|
77
74
|
segments:
|
78
75
|
- 0
|
79
76
|
version: "0"
|
80
|
-
requirement: *id004
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
77
|
type: :development
|
78
|
+
version_requirements: *id004
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: rake
|
83
81
|
prerelease: false
|
84
|
-
|
85
|
-
version_requirements: &id005 !ruby/object:Gem::Requirement
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
86
83
|
none: false
|
87
84
|
requirements:
|
88
|
-
- - "
|
85
|
+
- - ">="
|
89
86
|
- !ruby/object:Gem::Version
|
90
|
-
hash:
|
87
|
+
hash: 3
|
91
88
|
segments:
|
92
|
-
-
|
93
|
-
|
94
|
-
- 2
|
95
|
-
version: 2.10.2
|
96
|
-
requirement: *id005
|
97
|
-
- !ruby/object:Gem::Dependency
|
89
|
+
- 0
|
90
|
+
version: "0"
|
98
91
|
type: :development
|
92
|
+
version_requirements: *id005
|
93
|
+
- !ruby/object:Gem::Dependency
|
94
|
+
name: rcov
|
99
95
|
prerelease: false
|
100
|
-
|
101
|
-
version_requirements: &id006 !ruby/object:Gem::Requirement
|
96
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
102
97
|
none: false
|
103
98
|
requirements:
|
104
99
|
- - ">="
|
@@ -107,26 +102,28 @@ dependencies:
|
|
107
102
|
segments:
|
108
103
|
- 0
|
109
104
|
version: "0"
|
110
|
-
requirement: *id006
|
111
|
-
- !ruby/object:Gem::Dependency
|
112
105
|
type: :development
|
106
|
+
version_requirements: *id006
|
107
|
+
- !ruby/object:Gem::Dependency
|
108
|
+
name: rspec
|
113
109
|
prerelease: false
|
114
|
-
|
115
|
-
version_requirements: &id007 !ruby/object:Gem::Requirement
|
110
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
116
111
|
none: false
|
117
112
|
requirements:
|
118
|
-
- -
|
113
|
+
- - ~>
|
119
114
|
- !ruby/object:Gem::Version
|
120
|
-
hash:
|
115
|
+
hash: 15
|
121
116
|
segments:
|
117
|
+
- 2
|
122
118
|
- 0
|
123
|
-
|
124
|
-
|
125
|
-
- !ruby/object:Gem::Dependency
|
119
|
+
- 0
|
120
|
+
version: 2.0.0
|
126
121
|
type: :development
|
122
|
+
version_requirements: *id007
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: pg
|
127
125
|
prerelease: false
|
128
|
-
|
129
|
-
version_requirements: &id008 !ruby/object:Gem::Requirement
|
126
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
130
127
|
none: false
|
131
128
|
requirements:
|
132
129
|
- - ">="
|
@@ -135,12 +132,12 @@ dependencies:
|
|
135
132
|
segments:
|
136
133
|
- 0
|
137
134
|
version: "0"
|
138
|
-
requirement: *id008
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
135
|
type: :development
|
136
|
+
version_requirements: *id008
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: yard
|
141
139
|
prerelease: false
|
142
|
-
|
143
|
-
version_requirements: &id009 !ruby/object:Gem::Requirement
|
140
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
144
141
|
none: false
|
145
142
|
requirements:
|
146
143
|
- - ">="
|
@@ -149,77 +146,52 @@ dependencies:
|
|
149
146
|
segments:
|
150
147
|
- 0
|
151
148
|
version: "0"
|
152
|
-
|
153
|
-
|
154
|
-
|
149
|
+
type: :development
|
150
|
+
version_requirements: *id009
|
151
|
+
description: Directed acyclic graph support library for applications using ActiveRecord on top of PostgreSQL.
|
152
|
+
email:
|
153
|
+
- yipdw@member.fsf.org
|
155
154
|
executables:
|
156
155
|
- dagnabit-test
|
157
156
|
extensions: []
|
158
157
|
|
159
|
-
extra_rdoc_files:
|
160
|
-
|
161
|
-
- README.rdoc
|
158
|
+
extra_rdoc_files: []
|
159
|
+
|
162
160
|
files:
|
163
|
-
- .
|
164
|
-
- .
|
165
|
-
- .
|
166
|
-
- Gemfile
|
167
|
-
- Gemfile.lock
|
168
|
-
- History.txt
|
161
|
+
- History.md
|
162
|
+
- MIGRATION.md
|
163
|
+
- README.md
|
169
164
|
- LICENSE
|
170
|
-
-
|
171
|
-
-
|
172
|
-
-
|
173
|
-
-
|
174
|
-
- dagnabit.
|
175
|
-
-
|
165
|
+
- lib/dagnabit/edge/activation.rb
|
166
|
+
- lib/dagnabit/edge/associations.rb
|
167
|
+
- lib/dagnabit/edge/connectivity.rb
|
168
|
+
- lib/dagnabit/edge.rb
|
169
|
+
- lib/dagnabit/graph.rb
|
170
|
+
- lib/dagnabit/migration.rb
|
171
|
+
- lib/dagnabit/version.rb
|
172
|
+
- lib/dagnabit/vertex/activation.rb
|
173
|
+
- lib/dagnabit/vertex/associations.rb
|
174
|
+
- lib/dagnabit/vertex/bonding.rb
|
175
|
+
- lib/dagnabit/vertex/connectivity.rb
|
176
|
+
- lib/dagnabit/vertex/neighbors.rb
|
177
|
+
- lib/dagnabit/vertex/settings.rb
|
178
|
+
- lib/dagnabit/vertex.rb
|
176
179
|
- lib/dagnabit.rb
|
177
|
-
-
|
178
|
-
-
|
179
|
-
-
|
180
|
-
-
|
181
|
-
-
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
185
|
-
- lib/dagnabit/link/transitive_closure_recalculation/on_create.rb
|
186
|
-
- lib/dagnabit/link/transitive_closure_recalculation/on_destroy.rb
|
187
|
-
- lib/dagnabit/link/transitive_closure_recalculation/on_update.rb
|
188
|
-
- lib/dagnabit/link/transitive_closure_recalculation/utilities.rb
|
189
|
-
- lib/dagnabit/link/validations.rb
|
190
|
-
- lib/dagnabit/node/associations.rb
|
191
|
-
- lib/dagnabit/node/class_methods.rb
|
192
|
-
- lib/dagnabit/node/configuration.rb
|
193
|
-
- lib/dagnabit/node/neighbors.rb
|
194
|
-
- test/connections/native_postgresql/connection.rb
|
195
|
-
- test/connections/native_sqlite3/connection.rb
|
196
|
-
- test/dagnabit/link/test_associations.rb
|
197
|
-
- test/dagnabit/link/test_class_methods.rb
|
198
|
-
- test/dagnabit/link/test_configuration.rb
|
199
|
-
- test/dagnabit/link/test_cycle_prevention.rb
|
200
|
-
- test/dagnabit/link/test_named_scopes.rb
|
201
|
-
- test/dagnabit/link/test_transitive_closure_link_model.rb
|
202
|
-
- test/dagnabit/link/test_transitive_closure_recalculation.rb
|
203
|
-
- test/dagnabit/link/test_validations.rb
|
204
|
-
- test/dagnabit/node/test_associations.rb
|
205
|
-
- test/dagnabit/node/test_class_methods.rb
|
206
|
-
- test/dagnabit/node/test_configuration.rb
|
207
|
-
- test/dagnabit/node/test_neighbors.rb
|
208
|
-
- test/helper.rb
|
209
|
-
- test/models/beta_node.rb
|
210
|
-
- test/models/custom_data_link.rb
|
211
|
-
- test/models/customized_link.rb
|
212
|
-
- test/models/customized_link_node.rb
|
213
|
-
- test/models/link.rb
|
214
|
-
- test/models/node.rb
|
215
|
-
- test/schema/schema.rb
|
180
|
+
- bin/dagnabit-test
|
181
|
+
- db/connection.rb
|
182
|
+
- db/connections/postgresql/connection.rb
|
183
|
+
- db/models/edge.rb
|
184
|
+
- db/models/other_edge.rb
|
185
|
+
- db/models/other_vertex.rb
|
186
|
+
- db/models/vertex.rb
|
187
|
+
- db/schema.rb
|
216
188
|
has_rdoc: true
|
217
|
-
homepage: http://
|
189
|
+
homepage: http://rubygems.org/gems/dagnabit
|
218
190
|
licenses: []
|
219
191
|
|
220
192
|
post_install_message:
|
221
|
-
rdoc_options:
|
222
|
-
|
193
|
+
rdoc_options: []
|
194
|
+
|
223
195
|
require_paths:
|
224
196
|
- lib
|
225
197
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -246,27 +218,6 @@ rubyforge_project:
|
|
246
218
|
rubygems_version: 1.3.7
|
247
219
|
signing_key:
|
248
220
|
specification_version: 3
|
249
|
-
summary: Directed acyclic graph plugin for ActiveRecord
|
250
|
-
test_files:
|
251
|
-
|
252
|
-
- test/connections/native_sqlite3/connection.rb
|
253
|
-
- test/dagnabit/link/test_associations.rb
|
254
|
-
- test/dagnabit/link/test_class_methods.rb
|
255
|
-
- test/dagnabit/link/test_configuration.rb
|
256
|
-
- test/dagnabit/link/test_cycle_prevention.rb
|
257
|
-
- test/dagnabit/link/test_named_scopes.rb
|
258
|
-
- test/dagnabit/link/test_transitive_closure_link_model.rb
|
259
|
-
- test/dagnabit/link/test_transitive_closure_recalculation.rb
|
260
|
-
- test/dagnabit/link/test_validations.rb
|
261
|
-
- test/dagnabit/node/test_associations.rb
|
262
|
-
- test/dagnabit/node/test_class_methods.rb
|
263
|
-
- test/dagnabit/node/test_configuration.rb
|
264
|
-
- test/dagnabit/node/test_neighbors.rb
|
265
|
-
- test/helper.rb
|
266
|
-
- test/models/beta_node.rb
|
267
|
-
- test/models/custom_data_link.rb
|
268
|
-
- test/models/customized_link.rb
|
269
|
-
- test/models/customized_link_node.rb
|
270
|
-
- test/models/link.rb
|
271
|
-
- test/models/node.rb
|
272
|
-
- test/schema/schema.rb
|
221
|
+
summary: Directed acyclic graph plugin for ActiveRecord/PostgreSQL
|
222
|
+
test_files: []
|
223
|
+
|