acts-as-dag 2.5.5 → 2.5.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +8 -0
- data/Gemfile +28 -0
- data/README.rdoc +104 -104
- data/Rakefile +3 -19
- data/acts-as-dag.gemspec +27 -0
- data/init.rb +1 -0
- data/lib/acts-as-dag/version.rb +7 -0
- data/lib/dag/dag.rb +9 -2
- data/lib/dag/edges.rb +2 -2
- data/test/dag_test.rb +17 -0
- metadata +112 -36
- data/test/database.test +0 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem 'bundler'
|
4
|
+
gem 'rails', '3.2.3'
|
5
|
+
gem 'rake'
|
6
|
+
gem 'rack'
|
7
|
+
gem 'jeweler'
|
8
|
+
gem 'sqlite3'
|
9
|
+
|
10
|
+
group :development, :test do
|
11
|
+
gem 'pry'
|
12
|
+
gem 'pry-doc'
|
13
|
+
gem 'pry-rails'
|
14
|
+
end
|
15
|
+
|
16
|
+
group :development do
|
17
|
+
gem 'awesome_print'
|
18
|
+
gem 'wirble'
|
19
|
+
gem 'foreman'
|
20
|
+
gem 'ruby-prof'
|
21
|
+
end
|
22
|
+
|
23
|
+
group :test do
|
24
|
+
gem 'test-unit'
|
25
|
+
gem 'simplecov'
|
26
|
+
gem 'flog'
|
27
|
+
gem 'flay'
|
28
|
+
end
|
data/README.rdoc
CHANGED
@@ -43,13 +43,13 @@ Version 2.x of Acts As Dag uses validate and scope/where and ActiveModel::Valida
|
|
43
43
|
Add to your Gemfile:
|
44
44
|
|
45
45
|
gem 'acts-as-dag'
|
46
|
-
|
46
|
+
|
47
47
|
== Terminology
|
48
48
|
|
49
49
|
- Node: A source or destination of a link or edge in the graph.
|
50
50
|
- Edge: A direct connection between two nodes. These can only be created by your application.
|
51
51
|
- Link: A indirect connection between two nodes. Denotes the existence of a path. These can only be created by the plugin internally.
|
52
|
-
|
52
|
+
|
53
53
|
== Singleton Methods
|
54
54
|
|
55
55
|
This section outlines the two methods that need to be included in your ActiveRecord models. In general this whole plugin can be thought of as one big has_many association.
|
@@ -58,11 +58,11 @@ This section outlines the two methods that need to be included in your ActiveRec
|
|
58
58
|
|
59
59
|
This singleton class method needs to be called in your ActiveRecord model that represents the links for the DAG graph. For non-polymorphic graphs it has a required parameter:
|
60
60
|
|
61
|
-
|
61
|
+
acts_as_dag_links :node_class_name => 'Class Name of the node model'
|
62
62
|
|
63
63
|
If the graph is polymorphic :node_class_name is unnecessary. A polymorphic call would be:
|
64
64
|
|
65
|
-
|
65
|
+
acts_as_dag_links :polymorphic => true
|
66
66
|
|
67
67
|
==== Optional Parameters
|
68
68
|
|
@@ -81,98 +81,98 @@ With polymorphic graphs we also have...
|
|
81
81
|
|
82
82
|
Each of the optional column parameters needs a field in the link table. Hence for non-polymorphic graphs a migration would look like...
|
83
83
|
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
84
|
+
create_table :links, do |t|
|
85
|
+
t.integer :ancestor_id
|
86
|
+
t.integer :descendant_id
|
87
|
+
t.boolean :direct
|
88
|
+
t.integer :count
|
89
|
+
end
|
90
|
+
|
91
91
|
And for polymorphic graphs...
|
92
92
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
93
|
+
create_table :links, do |t|
|
94
|
+
t.integer :ancestor_id
|
95
|
+
t.string :ancestor_type
|
96
|
+
t.integer :descendant_id
|
97
|
+
t.string :descendant_type
|
98
|
+
t.boolean :direct
|
99
|
+
t.integer :count
|
100
|
+
end
|
101
|
+
|
102
102
|
==== Injected Associations
|
103
103
|
|
104
104
|
Calling acts_as_dag_links method in the class definition injects the following associations.
|
105
105
|
|
106
|
-
|
107
|
-
|
108
|
-
|
106
|
+
belongs_to :ancestor
|
107
|
+
belongs_to :descendant
|
108
|
+
|
109
109
|
==== Injected Named Scopes
|
110
110
|
|
111
|
-
The
|
111
|
+
The receives the following named scopes. The following two scopes narrows a query to only links with a certain ancestor or descendant
|
112
112
|
|
113
|
-
|
114
|
-
|
115
|
-
|
113
|
+
named_scope :with_ancestor(ancestor_instance)
|
114
|
+
named_scope :with_descendant(descendant_instance)
|
115
|
+
|
116
116
|
The scopes below narrow queries to direct or indirect links
|
117
117
|
|
118
|
-
|
119
|
-
|
120
|
-
|
118
|
+
named_scope :direct
|
119
|
+
named_scope :indirect
|
120
|
+
|
121
121
|
The scopes below attach the actual ancestor or descendant nodes
|
122
122
|
|
123
|
-
|
124
|
-
|
125
|
-
|
123
|
+
named_scope :ancestor_nodes, :joins => :ancestor
|
124
|
+
named_scope :descendant_nodes, :joins => :descendant
|
125
|
+
|
126
126
|
==== Injected Class Methods
|
127
127
|
|
128
128
|
Several class methods get added to the link model to make it easier to find and create edges, and find links.
|
129
129
|
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
130
|
+
#Finds an edge of returns nil
|
131
|
+
self.find_edge(ancestor,descendant)
|
132
|
+
#Returns true if an edge exists
|
133
|
+
self.edge?(ancestor,descendant)
|
134
|
+
self.direct?(ancestor,descendant)
|
135
|
+
|
136
|
+
#Finds a link or returns nil
|
137
|
+
self.find_link(ancestor,descendant)
|
138
|
+
#Returns true if a link exists
|
139
|
+
self.connected?(ancestor,descendant)
|
140
|
+
|
141
|
+
#Creates an edge between an ancestor and descendant
|
142
|
+
self.create_edge(ancestor,descendant)
|
143
|
+
self.connect(ancestor,descendant)
|
144
|
+
|
145
|
+
#Creates an edge using save! between an ancestor and descendant
|
146
|
+
self.create_edge!(ancestor,descendant)
|
147
|
+
self.connect!(ancestor,descendant)
|
148
|
+
|
149
|
+
#Builds an edge between an ancestor and descendant, returning an unsaved edge
|
150
|
+
self.build_edge(ancestor,descendant)
|
151
|
+
|
152
|
+
#Finds and returns the edge if it exists, or calls build_edge
|
153
|
+
self.find_or_build_edge(ancestor,descendant)
|
154
|
+
|
155
155
|
==== Injected Instance Methods
|
156
156
|
|
157
157
|
Here is a sample of some of the important instance methods that get added to the link model.
|
158
158
|
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
159
|
+
#whether the current edge can be destroyed. If the edge also has a link, ie it can be made indirectly, then it cannot be destroyed.
|
160
|
+
destroyable?()
|
161
|
+
|
162
|
+
#Make the edge indirect. Removes the direct edge but keeps the indirect links
|
163
|
+
make_indirect()
|
164
|
+
|
165
|
+
#Makes the link direct. Adds a direct edge onto a link.
|
166
|
+
make_direct()
|
167
|
+
|
168
|
+
#Number of unique ways to get from the ancestor to the descendant
|
169
|
+
count()
|
170
|
+
|
171
171
|
=== has_dag_links
|
172
172
|
|
173
173
|
This singleton class method can be optionally called from the node ActiveRecord model. If you do not call it you don't get all the nice associations within the node model, yet everything will still work fine. It takes the required parameter:
|
174
174
|
|
175
|
-
|
175
|
+
has_dag_links :link_class_name => 'Class Name of the link model'
|
176
176
|
|
177
177
|
==== Optional Parameters
|
178
178
|
|
@@ -203,32 +203,32 @@ For non-polymorphic graphs you also get the following associations. These find t
|
|
203
203
|
|
204
204
|
For polymorphic graphs where the ancestor_class_names or descendant_class_names includes the specified class names the following associations are also built. For each ancestor_class_name:
|
205
205
|
|
206
|
-
-links_as_descendant_for_#{ancestor_class_name.tableize}
|
207
|
-
-links_as_child_for_#{ancestor_class_name.tableize}
|
208
|
-
-ancestor_#{ancestor_class_name.tableize}
|
209
|
-
-parent_#{ancestor_class_name.tableize}
|
206
|
+
- links_as_descendant_for_#{ancestor_class_name.tableize}
|
207
|
+
- links_as_child_for_#{ancestor_class_name.tableize}
|
208
|
+
- ancestor_#{ancestor_class_name.tableize}
|
209
|
+
- parent_#{ancestor_class_name.tableize}
|
210
210
|
|
211
211
|
For each descendant_class_name
|
212
212
|
|
213
|
-
-links_as_ancestor_for_#{ancestor_class_name.tableize}
|
214
|
-
-links_as_parent_for_#{ancestor_class_name.tableize}
|
215
|
-
-descendant_#{ancestor_class_name.tableize}
|
216
|
-
-child_#{ancestor_class_name.tableize}
|
213
|
+
- links_as_ancestor_for_#{ancestor_class_name.tableize}
|
214
|
+
- links_as_parent_for_#{ancestor_class_name.tableize}
|
215
|
+
- descendant_#{ancestor_class_name.tableize}
|
216
|
+
- child_#{ancestor_class_name.tableize}
|
217
217
|
|
218
218
|
==== Injected Instance Methods
|
219
219
|
|
220
220
|
Along with the above associations a number of instance methods are defined.
|
221
221
|
|
222
|
-
-leaf? , Boolean value as to whether the current node is a leaf (no descendants)
|
223
|
-
-root? , Boolean value as to whether the current node is a root (no ancestors)
|
222
|
+
- leaf? , Boolean value as to whether the current node is a leaf (no descendants)
|
223
|
+
- root? , Boolean value as to whether the current node is a root (no ancestors)
|
224
224
|
|
225
225
|
With polymorphic graphs for each ancestor_class_name another method is defined.
|
226
226
|
|
227
|
-
-root_for_#{ancestor_class_name.tableize}? , Returns true if the node has no ancestors of the represented type.
|
227
|
+
- root_for_#{ancestor_class_name.tableize}? , Returns true if the node has no ancestors of the represented type.
|
228
228
|
|
229
229
|
Likewise for each descendant_class_name.
|
230
230
|
|
231
|
-
-leaf_for_#{descendent_class_name.tableize}? , Returns true if the node has no descendants of the represented type.
|
231
|
+
- leaf_for_#{descendent_class_name.tableize}? , Returns true if the node has no descendants of the represented type.
|
232
232
|
|
233
233
|
== Usage
|
234
234
|
|
@@ -236,27 +236,27 @@ This section goes over some basic usage examples and presents some caveats.
|
|
236
236
|
|
237
237
|
=== Basic Non-polymorphic Graphs.
|
238
238
|
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
239
|
+
class Node < ActiveRecord::Base
|
240
|
+
has_dag_links :link_class_name => 'Link'
|
241
|
+
end
|
242
|
+
|
243
|
+
class Link < ActiveRecord::Base
|
244
|
+
acts_as_dag_links :node_class_name => 'Node'
|
245
|
+
end
|
246
|
+
|
247
|
+
#Adding an edge
|
248
|
+
parent_node = Node.create!
|
249
|
+
child_node = Node.create!
|
250
|
+
parent_node.children << child_node
|
251
|
+
|
252
|
+
#Removing it
|
253
|
+
link = Link.find_link(parent_node,child_node)
|
254
|
+
if link.destroyable?
|
255
|
+
link.destroy
|
256
|
+
else
|
257
|
+
link.make_indirect
|
258
|
+
link.save!
|
259
|
+
end
|
260
260
|
|
261
261
|
=== Caveats for Adding, Updating, Deleting Links
|
262
262
|
|
data/Rakefile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'rake'
|
2
1
|
require 'rake/testtask'
|
3
|
-
require '
|
2
|
+
require 'rdoc/task'
|
3
|
+
require 'bundler/gem_tasks'
|
4
4
|
|
5
5
|
desc 'Default: run unit tests.'
|
6
6
|
task :default => :test
|
@@ -18,22 +18,6 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
18
18
|
rdoc.title = 'ActsAsDag'
|
19
19
|
rdoc.options << '--line-numbers' << '--inline-source'
|
20
20
|
rdoc.rdoc_files.include('README.rdoc')
|
21
|
-
rdoc.rdoc_files.include('lib/
|
21
|
+
rdoc.rdoc_files.include('lib/dag/dag.rb')
|
22
22
|
end
|
23
23
|
|
24
|
-
# setup to build plugin as a gem
|
25
|
-
begin
|
26
|
-
require 'jeweler'
|
27
|
-
Jeweler::Tasks.new do |gemspec|
|
28
|
-
gemspec.name = "acts-as-dag"
|
29
|
-
gemspec.summary = "Acts As DAG Gem"
|
30
|
-
gemspec.description = "Acts As Dag, short for Acts As Directed Acyclic Graph, is a gem which allows you to represent DAG hierarchy using your ActiveRecord models. Versions 1.x were built using Rails 2.x. Versions 2.x were built using Rails 3.x."
|
31
|
-
gemspec.authors = ["Matthew Leventi", "Robert Schmitt"]
|
32
|
-
gemspec.email = "mleventi@gmail.com"
|
33
|
-
gemspec.rubyforge_project = "acts-as-dag"
|
34
|
-
gemspec.homepage = "http://github.com/resgraph/acts-as-dag"
|
35
|
-
gemspec.files = FileList["[A-Z]*", "{lib,test}/**/*"]
|
36
|
-
end
|
37
|
-
rescue
|
38
|
-
puts "Jeweler or one of its dependencies is not installed."
|
39
|
-
end
|
data/acts-as-dag.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "acts-as-dag/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "acts-as-dag"
|
7
|
+
s.version = Acts::As::Dag::VERSION
|
8
|
+
s.authors = ['Matthew Leventi', 'Robert Schmitt']
|
9
|
+
s.email = ["resgraph@cox.net"]
|
10
|
+
s.homepage = 'https://github.com/resgraph/acts-as-dag'
|
11
|
+
s.summary = %q{Directed Acyclic Graph hierarchy for Rail's ActiveRecord}
|
12
|
+
s.description = %q{Directed Acyclic Graph hierarchy for Rail's ActiveRecord}
|
13
|
+
|
14
|
+
s.rubyforge_project = "acts-as-dag"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
# As specified in test/dag_test.rb
|
22
|
+
s.add_development_dependency 'activerecord', '~> 3.0.3'
|
23
|
+
s.add_development_dependency 'rake'
|
24
|
+
s.add_development_dependency 'sqlite3'
|
25
|
+
s.add_runtime_dependency 'activemodel'
|
26
|
+
s.add_runtime_dependency 'activerecord'
|
27
|
+
end
|
data/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "#{File.dirname(__FILE__)}/lib/acts-as-dag"
|
data/lib/dag/dag.rb
CHANGED
@@ -19,8 +19,8 @@ module Dag
|
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
|
23
|
-
|
22
|
+
class_attribute :acts_as_dag_options, :instance_writer => false
|
23
|
+
self.acts_as_dag_options = conf
|
24
24
|
|
25
25
|
extend Columns
|
26
26
|
include Columns
|
@@ -284,6 +284,13 @@ module Dag
|
|
284
284
|
EOL4
|
285
285
|
end
|
286
286
|
self.class_eval <<-EOL5
|
287
|
+
def #{prefix}self_and_ancestors
|
288
|
+
[self] + #{prefix}ancestors
|
289
|
+
end
|
290
|
+
def #{prefix}self_and_descendants
|
291
|
+
[self] + #{prefix}descendants
|
292
|
+
end
|
293
|
+
|
287
294
|
def #{prefix}leaf?
|
288
295
|
self.#{prefix}links_as_ancestor.empty?
|
289
296
|
end
|
data/lib/dag/edges.rb
CHANGED
@@ -20,14 +20,14 @@ module Dag
|
|
20
20
|
def find_edge(ancestor, descendant)
|
21
21
|
source = self::EndPoint.from(ancestor)
|
22
22
|
sink = self::EndPoint.from(descendant)
|
23
|
-
self.
|
23
|
+
self.first :conditions => self.conditions_for(source, sink).merge!({direct_column_name => true})
|
24
24
|
end
|
25
25
|
|
26
26
|
#Finds a link between two points
|
27
27
|
def find_link(ancestor, descendant)
|
28
28
|
source = self::EndPoint.from(ancestor)
|
29
29
|
sink = self::EndPoint.from(descendant)
|
30
|
-
self.
|
30
|
+
self.first :conditions => self.conditions_for(source, sink)
|
31
31
|
end
|
32
32
|
|
33
33
|
#Finds or builds an edge between two points
|
data/test/dag_test.rb
CHANGED
@@ -70,6 +70,7 @@ class DagTest < Test::Unit::TestCase
|
|
70
70
|
|
71
71
|
#Setups up database in memory
|
72
72
|
def setup
|
73
|
+
ActiveRecord::Migration.verbose = false
|
73
74
|
ActiveRecord::Schema.define(:version => 1) do
|
74
75
|
create_table :edges do |t|
|
75
76
|
t.column :ancestor_id, :integer
|
@@ -593,6 +594,14 @@ class DagTest < Test::Unit::TestCase
|
|
593
594
|
assert !e.nil?
|
594
595
|
end
|
595
596
|
|
597
|
+
#Tests self_and_descendants
|
598
|
+
def test_self_and_descendants
|
599
|
+
a = Node.create!(:name => 'a')
|
600
|
+
b = Node.create!(:name => 'b')
|
601
|
+
a.descendants << b
|
602
|
+
assert_equal [a,b], a.self_and_descendants
|
603
|
+
end
|
604
|
+
|
596
605
|
#Tests has_many ancestors
|
597
606
|
def test_has_many_ancestors
|
598
607
|
a = Node.create!
|
@@ -602,6 +611,14 @@ class DagTest < Test::Unit::TestCase
|
|
602
611
|
assert !e.nil?
|
603
612
|
end
|
604
613
|
|
614
|
+
#Tests self_and_ancestors
|
615
|
+
def test_self_and_ancestors
|
616
|
+
a = Node.create!
|
617
|
+
b = Node.create!
|
618
|
+
b.ancestors << a
|
619
|
+
assert_equal [b,a], b.self_and_ancestors
|
620
|
+
end
|
621
|
+
|
605
622
|
#Tests has_many children
|
606
623
|
def test_has_many_children
|
607
624
|
a = Node.create!
|
metadata
CHANGED
@@ -1,34 +1,114 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts-as-dag
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 2.5.7
|
4
5
|
prerelease:
|
5
|
-
version: 2.5.5
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Matthew Leventi
|
9
9
|
- Robert Schmitt
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
date: 2012-05-03 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: activerecord
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
none: false
|
19
|
+
requirements:
|
20
|
+
- - ~>
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 3.0.3
|
23
|
+
type: :development
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
none: false
|
27
|
+
requirements:
|
28
|
+
- - ~>
|
29
|
+
- !ruby/object:Gem::Version
|
30
|
+
version: 3.0.3
|
31
|
+
- !ruby/object:Gem::Dependency
|
32
|
+
name: rake
|
33
|
+
requirement: !ruby/object:Gem::Requirement
|
34
|
+
none: false
|
35
|
+
requirements:
|
36
|
+
- - ! '>='
|
37
|
+
- !ruby/object:Gem::Version
|
38
|
+
version: '0'
|
39
|
+
type: :development
|
40
|
+
prerelease: false
|
41
|
+
version_requirements: !ruby/object:Gem::Requirement
|
42
|
+
none: false
|
43
|
+
requirements:
|
44
|
+
- - ! '>='
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: sqlite3
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
none: false
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
type: :development
|
56
|
+
prerelease: false
|
57
|
+
version_requirements: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: activemodel
|
65
|
+
requirement: !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ! '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
type: :runtime
|
72
|
+
prerelease: false
|
73
|
+
version_requirements: !ruby/object:Gem::Requirement
|
74
|
+
none: false
|
75
|
+
requirements:
|
76
|
+
- - ! '>='
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '0'
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: activerecord
|
81
|
+
requirement: !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ! '>='
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
type: :runtime
|
88
|
+
prerelease: false
|
89
|
+
version_requirements: !ruby/object:Gem::Requirement
|
90
|
+
none: false
|
91
|
+
requirements:
|
92
|
+
- - ! '>='
|
93
|
+
- !ruby/object:Gem::Version
|
94
|
+
version: '0'
|
95
|
+
description: Directed Acyclic Graph hierarchy for Rail's ActiveRecord
|
96
|
+
email:
|
97
|
+
- resgraph@cox.net
|
20
98
|
executables: []
|
21
|
-
|
22
99
|
extensions: []
|
23
|
-
|
24
|
-
|
25
|
-
-
|
26
|
-
|
100
|
+
extra_rdoc_files: []
|
101
|
+
files:
|
102
|
+
- .gitignore
|
103
|
+
- Gemfile
|
27
104
|
- MIT-LICENSE
|
28
105
|
- README.rdoc
|
29
106
|
- Rakefile
|
30
107
|
- VERSION
|
108
|
+
- acts-as-dag.gemspec
|
109
|
+
- init.rb
|
31
110
|
- lib/acts-as-dag.rb
|
111
|
+
- lib/acts-as-dag/version.rb
|
32
112
|
- lib/dag/columns.rb
|
33
113
|
- lib/dag/dag.rb
|
34
114
|
- lib/dag/edges.rb
|
@@ -37,34 +117,30 @@ files:
|
|
37
117
|
- lib/dag/standard.rb
|
38
118
|
- lib/dag/validators.rb
|
39
119
|
- test/dag_test.rb
|
40
|
-
|
41
|
-
has_rdoc: true
|
42
|
-
homepage: http://github.com/resgraph/acts-as-dag
|
120
|
+
homepage: https://github.com/resgraph/acts-as-dag
|
43
121
|
licenses: []
|
44
|
-
|
45
122
|
post_install_message:
|
46
123
|
rdoc_options: []
|
47
|
-
|
48
|
-
require_paths:
|
124
|
+
require_paths:
|
49
125
|
- lib
|
50
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
51
127
|
none: false
|
52
|
-
requirements:
|
53
|
-
- -
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version:
|
56
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
57
133
|
none: false
|
58
|
-
requirements:
|
59
|
-
- -
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version:
|
134
|
+
requirements:
|
135
|
+
- - ! '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
62
138
|
requirements: []
|
63
|
-
|
64
139
|
rubyforge_project: acts-as-dag
|
65
|
-
rubygems_version: 1.
|
140
|
+
rubygems_version: 1.8.24
|
66
141
|
signing_key:
|
67
142
|
specification_version: 3
|
68
|
-
summary:
|
69
|
-
test_files:
|
143
|
+
summary: Directed Acyclic Graph hierarchy for Rail's ActiveRecord
|
144
|
+
test_files:
|
70
145
|
- test/dag_test.rb
|
146
|
+
has_rdoc:
|
data/test/database.test
DELETED
Binary file
|