dagnabit 2.2.4 → 2.2.6

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -4,3 +4,4 @@ coverage
4
4
  rdoc
5
5
  pkg
6
6
  *.log
7
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,15 @@
1
+ # A sample Gemfile
2
+ source :gemcutter
3
+
4
+ gem 'activerecord', '~> 2.3.5'
5
+
6
+ group :development do
7
+ gem 'jeweler'
8
+ gem 'mocha', '0.9.8'
9
+ gem 'pg'
10
+ gem 'shoulda', '2.10.2'
11
+ gem 'sqlite3-ruby'
12
+ gem 'redgreen'
13
+ gem 'rcov'
14
+ gem 'ZenTest'
15
+ end
@@ -0,0 +1,38 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ ZenTest (4.4.0)
5
+ activerecord (2.3.9)
6
+ activesupport (= 2.3.9)
7
+ activesupport (2.3.9)
8
+ gemcutter (0.6.1)
9
+ git (1.2.5)
10
+ jeweler (1.4.0)
11
+ gemcutter (>= 0.1.0)
12
+ git (>= 1.2.5)
13
+ rubyforge (>= 2.0.0)
14
+ json_pure (1.4.6)
15
+ mocha (0.9.8)
16
+ rake
17
+ pg (0.9.0)
18
+ rake (0.8.7)
19
+ rcov (0.9.9)
20
+ redgreen (1.2.2)
21
+ rubyforge (2.0.4)
22
+ json_pure (>= 1.1.7)
23
+ shoulda (2.10.2)
24
+ sqlite3-ruby (1.3.1)
25
+
26
+ PLATFORMS
27
+ ruby
28
+
29
+ DEPENDENCIES
30
+ ZenTest
31
+ activerecord (~> 2.3.5)
32
+ jeweler
33
+ mocha (= 0.9.8)
34
+ pg
35
+ rcov
36
+ redgreen
37
+ shoulda (= 2.10.2)
38
+ sqlite3-ruby
@@ -1,3 +1,17 @@
1
+ == 2.2.6 2010-01-01
2
+
3
+ === Bugfixes
4
+
5
+ * Fixed version requirements.
6
+
7
+ == 2.2.5 2010-10-01
8
+
9
+ === Minor changes
10
+
11
+ * Ported development code to Bundler 1.0.
12
+ * Removed usage of Object#returning, which was deprecated in ActiveSupport
13
+ 2.3.9.
14
+
1
15
  == 2.2.4 2010-03-15
2
16
 
3
17
  === Bugfixes
@@ -1,3 +1,13 @@
1
+ = Read this first
2
+
3
+ dagnabit is shutting down. Errors will be fixed, but no new features will be
4
+ added.
5
+
6
+ If you need fast reachability queries in a Ruby application that uses an SQL
7
+ database, consider using a database that supports recursive common table
8
+ expressions (e.g. PostgreSQL) and Sequel, which has a Ruby interface for
9
+ constructing recursive CTEs.
10
+
1
11
  = dagnabit
2
12
 
3
13
  dagnabit is (yet another) ActiveRecord plugin for directed acyclic graphs. It
@@ -19,6 +29,14 @@ biospecimen heritage.
19
29
  dagnabit was developed at the Northwestern University Biomedical Informatics
20
30
  Center <http://www.nucats.northwestern.edu/centers/nubic/index.html>.
21
31
 
32
+ dagnabit is hosted at Gitorious and Github:
33
+
34
+ http://gitorious.org/dagnabit/dagnabit
35
+ http://github.com/yipdw/dagnabit
36
+
37
+ The Gitorious repository is always updated before the Github repository, and
38
+ should be considered canonical.
39
+
22
40
  == Related work
23
41
 
24
42
  This plugin was inspired by Matthew Leventi's acts-as-dag plugin
data/Rakefile CHANGED
@@ -1,28 +1,18 @@
1
- require 'rubygems'
2
1
  require 'rake'
3
-
4
- gem 'net-ssh', '>= 1.99.1'
5
- require 'net/ssh'
6
- require 'net/scp'
7
2
  require 'yaml'
3
+ require 'bundler'
4
+ Bundler.setup
8
5
 
9
- begin
10
- require 'jeweler'
11
- Jeweler::Tasks.new do |gem|
12
- gem.name = "dagnabit"
13
- gem.summary = %Q{Directed acyclic graph plugin for ActiveRecord}
14
- gem.email = "yipdw@northwestern.edu"
15
- gem.homepage = "http://gitorious.org/dagnabit/dagnabit"
16
- gem.authors = ["David Yip"]
17
- gem.add_dependency 'activerecord', '>= 2.1.0'
18
- gem.add_dependency 'activesupport', '>= 2.3.2'
19
- gem.add_development_dependency 'mocha', '= 0.9.8'
20
- gem.add_development_dependency 'shoulda', '= 2.10.2'
6
+ require 'jeweler'
21
7
 
22
- # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
23
- end
24
- rescue LoadError
25
- puts "Jeweler not available. Install it with: sudo gem install jeweler"
8
+ Jeweler::Tasks.new do |gem|
9
+ gem.name = 'dagnabit'
10
+ gem.summary = %Q{Directed acyclic graph plugin for ActiveRecord}
11
+ gem.email = 'yipdw@northwestern.edu'
12
+ gem.homepage = 'http://gitorious.org/dagnabit/dagnabit'
13
+ gem.authors = ['David Yip']
14
+
15
+ gem.add_bundler_dependencies
26
16
  end
27
17
 
28
18
  task :test => [:test_sqlite3, :test_postgresql]
@@ -36,21 +26,14 @@ require 'rake/testtask'
36
26
  end
37
27
  end
38
28
 
39
- begin
40
- require 'rcov/rcovtask'
41
- Rcov::RcovTask.new do |test|
42
- test.libs << 'test' << 'test/connections/native_sqlite3'
43
- test.pattern = 'test/dagnabit/**/test_*.rb'
44
- test.verbose = true
45
- test.rcov_opts << '--exclude gems/*'
46
- end
47
- rescue LoadError
48
- task :rcov do
49
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
50
- end
29
+ require 'rcov/rcovtask'
30
+ Rcov::RcovTask.new do |test|
31
+ test.libs << 'test' << 'test/connections/native_sqlite3'
32
+ test.pattern = 'test/dagnabit/**/test_*.rb'
33
+ test.verbose = true
34
+ test.rcov_opts << '--exclude gems/*,.bundle/environment.rb'
51
35
  end
52
36
 
53
-
54
37
  task :default => :test
55
38
 
56
39
  require 'rake/rdoctask'
@@ -1,5 +1,5 @@
1
1
  ---
2
2
  :major: 2
3
- :build:
4
3
  :minor: 2
5
- :patch: 4
4
+ :build:
5
+ :patch: 6
@@ -4,25 +4,18 @@
4
4
  # Launches an irb session with an in-memory SQLite3 database and Node and Link
5
5
  # ActiveRecord models.
6
6
  #
7
-
7
+ #
8
8
  require 'rubygems'
9
- require 'active_record'
10
-
11
- src = File.dirname(__FILE__) + '/../lib/dagnabit.rb'
12
- if File.exists?(src)
13
- require src
14
- else
15
- require 'dagnabit'
16
- end
9
+ require 'bundler'
10
+ Bundler.setup
17
11
 
12
+ require 'active_record'
13
+ require 'sqlite3'
18
14
  require 'irb'
19
15
 
20
- begin
21
- require 'sqlite3'
22
- rescue LoadError
23
- gem 'sqlite3-ruby'
24
- require 'sqlite3'
25
- end
16
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), %w(.. lib)))
17
+
18
+ require 'dagnabit'
26
19
 
27
20
  ActiveRecord::Base.logger = Logger.new("#{File.basename(__FILE__)}.log")
28
21
  ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => ':memory:')
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{dagnabit}
8
- s.version = "2.2.4"
8
+ s.version = "2.2.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["David Yip"]
12
- s.date = %q{2010-03-15}
12
+ s.date = %q{2010-10-01}
13
13
  s.default_executable = %q{dagnabit-test}
14
14
  s.email = %q{yipdw@northwestern.edu}
15
15
  s.executables = ["dagnabit-test"]
@@ -21,6 +21,8 @@ Gem::Specification.new do |s|
21
21
  ".autotest",
22
22
  ".document",
23
23
  ".gitignore",
24
+ "Gemfile",
25
+ "Gemfile.lock",
24
26
  "History.txt",
25
27
  "LICENSE",
26
28
  "README.rdoc",
@@ -73,7 +75,7 @@ Gem::Specification.new do |s|
73
75
  s.homepage = %q{http://gitorious.org/dagnabit/dagnabit}
74
76
  s.rdoc_options = ["--charset=UTF-8"]
75
77
  s.require_paths = ["lib"]
76
- s.rubygems_version = %q{1.3.6}
78
+ s.rubygems_version = %q{1.3.7}
77
79
  s.summary = %q{Directed acyclic graph plugin for ActiveRecord}
78
80
  s.test_files = [
79
81
  "test/connections/native_postgresql/connection.rb",
@@ -104,22 +106,37 @@ Gem::Specification.new do |s|
104
106
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
105
107
  s.specification_version = 3
106
108
 
107
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
108
- s.add_runtime_dependency(%q<activerecord>, [">= 2.1.0"])
109
- s.add_runtime_dependency(%q<activesupport>, [">= 2.3.2"])
109
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
110
+ s.add_runtime_dependency(%q<activerecord>, ["~> 2.3.5"])
111
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
110
112
  s.add_development_dependency(%q<mocha>, ["= 0.9.8"])
113
+ s.add_development_dependency(%q<pg>, [">= 0"])
111
114
  s.add_development_dependency(%q<shoulda>, ["= 2.10.2"])
115
+ s.add_development_dependency(%q<sqlite3-ruby>, [">= 0"])
116
+ s.add_development_dependency(%q<redgreen>, [">= 0"])
117
+ s.add_development_dependency(%q<rcov>, [">= 0"])
118
+ s.add_development_dependency(%q<ZenTest>, [">= 0"])
112
119
  else
113
- s.add_dependency(%q<activerecord>, [">= 2.1.0"])
114
- s.add_dependency(%q<activesupport>, [">= 2.3.2"])
120
+ s.add_dependency(%q<activerecord>, ["~> 2.3.5"])
121
+ s.add_dependency(%q<jeweler>, [">= 0"])
115
122
  s.add_dependency(%q<mocha>, ["= 0.9.8"])
123
+ s.add_dependency(%q<pg>, [">= 0"])
116
124
  s.add_dependency(%q<shoulda>, ["= 2.10.2"])
125
+ s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
126
+ s.add_dependency(%q<redgreen>, [">= 0"])
127
+ s.add_dependency(%q<rcov>, [">= 0"])
128
+ s.add_dependency(%q<ZenTest>, [">= 0"])
117
129
  end
118
130
  else
119
- s.add_dependency(%q<activerecord>, [">= 2.1.0"])
120
- s.add_dependency(%q<activesupport>, [">= 2.3.2"])
131
+ s.add_dependency(%q<activerecord>, ["~> 2.3.5"])
132
+ s.add_dependency(%q<jeweler>, [">= 0"])
121
133
  s.add_dependency(%q<mocha>, ["= 0.9.8"])
134
+ s.add_dependency(%q<pg>, [">= 0"])
122
135
  s.add_dependency(%q<shoulda>, ["= 2.10.2"])
136
+ s.add_dependency(%q<sqlite3-ruby>, [">= 0"])
137
+ s.add_dependency(%q<redgreen>, [">= 0"])
138
+ s.add_dependency(%q<rcov>, [">= 0"])
139
+ s.add_dependency(%q<ZenTest>, [">= 0"])
123
140
  end
124
141
  end
125
142
 
@@ -48,7 +48,7 @@ module Dagnabit
48
48
  # </pre>
49
49
  #
50
50
  def subgraph_from(*roots)
51
- returning(OpenStruct.new) do |g|
51
+ OpenStruct.new.tap do |g|
52
52
  g.nodes = all_nodes_of(roots)
53
53
  g.edges = direct_edges_of(roots)
54
54
  end
@@ -1,4 +1,3 @@
1
- require 'rubygems'
2
1
  require 'test/unit'
3
2
  require 'shoulda'
4
3
  require 'mocha'
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dagnabit
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 11
4
5
  prerelease: false
5
6
  segments:
6
7
  - 2
7
8
  - 2
8
- - 4
9
- version: 2.2.4
9
+ - 6
10
+ version: 2.2.6
10
11
  platform: ruby
11
12
  authors:
12
13
  - David Yip
@@ -14,65 +15,141 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-15 00:00:00 -05:00
18
+ date: 2010-10-01 00:00:00 -05:00
18
19
  default_executable: dagnabit-test
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: activerecord
22
+ type: :runtime
22
23
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
+ name: activerecord
25
+ version_requirements: &id001 !ruby/object:Gem::Requirement
26
+ none: false
24
27
  requirements:
25
- - - ">="
28
+ - - ~>
26
29
  - !ruby/object:Gem::Version
30
+ hash: 9
27
31
  segments:
28
32
  - 2
29
- - 1
30
- - 0
31
- version: 2.1.0
32
- type: :runtime
33
- version_requirements: *id001
33
+ - 3
34
+ - 5
35
+ version: 2.3.5
36
+ requirement: *id001
34
37
  - !ruby/object:Gem::Dependency
35
- name: activesupport
38
+ type: :development
36
39
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
40
+ name: jeweler
41
+ version_requirements: &id002 !ruby/object:Gem::Requirement
42
+ none: false
38
43
  requirements:
39
44
  - - ">="
40
45
  - !ruby/object:Gem::Version
46
+ hash: 3
41
47
  segments:
42
- - 2
43
- - 3
44
- - 2
45
- version: 2.3.2
46
- type: :runtime
47
- version_requirements: *id002
48
+ - 0
49
+ version: "0"
50
+ requirement: *id002
48
51
  - !ruby/object:Gem::Dependency
49
- name: mocha
52
+ type: :development
50
53
  prerelease: false
51
- requirement: &id003 !ruby/object:Gem::Requirement
54
+ name: mocha
55
+ version_requirements: &id003 !ruby/object:Gem::Requirement
56
+ none: false
52
57
  requirements:
53
58
  - - "="
54
59
  - !ruby/object:Gem::Version
60
+ hash: 43
55
61
  segments:
56
62
  - 0
57
63
  - 9
58
64
  - 8
59
65
  version: 0.9.8
66
+ requirement: *id003
67
+ - !ruby/object:Gem::Dependency
60
68
  type: :development
61
- version_requirements: *id003
69
+ prerelease: false
70
+ name: pg
71
+ version_requirements: &id004 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ hash: 3
77
+ segments:
78
+ - 0
79
+ version: "0"
80
+ requirement: *id004
62
81
  - !ruby/object:Gem::Dependency
63
- name: shoulda
82
+ type: :development
64
83
  prerelease: false
65
- requirement: &id004 !ruby/object:Gem::Requirement
84
+ name: shoulda
85
+ version_requirements: &id005 !ruby/object:Gem::Requirement
86
+ none: false
66
87
  requirements:
67
88
  - - "="
68
89
  - !ruby/object:Gem::Version
90
+ hash: 35
69
91
  segments:
70
92
  - 2
71
93
  - 10
72
94
  - 2
73
95
  version: 2.10.2
96
+ requirement: *id005
97
+ - !ruby/object:Gem::Dependency
74
98
  type: :development
75
- version_requirements: *id004
99
+ prerelease: false
100
+ name: sqlite3-ruby
101
+ version_requirements: &id006 !ruby/object:Gem::Requirement
102
+ none: false
103
+ requirements:
104
+ - - ">="
105
+ - !ruby/object:Gem::Version
106
+ hash: 3
107
+ segments:
108
+ - 0
109
+ version: "0"
110
+ requirement: *id006
111
+ - !ruby/object:Gem::Dependency
112
+ type: :development
113
+ prerelease: false
114
+ name: redgreen
115
+ version_requirements: &id007 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ requirement: *id007
125
+ - !ruby/object:Gem::Dependency
126
+ type: :development
127
+ prerelease: false
128
+ name: rcov
129
+ version_requirements: &id008 !ruby/object:Gem::Requirement
130
+ none: false
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ hash: 3
135
+ segments:
136
+ - 0
137
+ version: "0"
138
+ requirement: *id008
139
+ - !ruby/object:Gem::Dependency
140
+ type: :development
141
+ prerelease: false
142
+ name: ZenTest
143
+ version_requirements: &id009 !ruby/object:Gem::Requirement
144
+ none: false
145
+ requirements:
146
+ - - ">="
147
+ - !ruby/object:Gem::Version
148
+ hash: 3
149
+ segments:
150
+ - 0
151
+ version: "0"
152
+ requirement: *id009
76
153
  description:
77
154
  email: yipdw@northwestern.edu
78
155
  executables:
@@ -86,6 +163,8 @@ files:
86
163
  - .autotest
87
164
  - .document
88
165
  - .gitignore
166
+ - Gemfile
167
+ - Gemfile.lock
89
168
  - History.txt
90
169
  - LICENSE
91
170
  - README.rdoc
@@ -144,23 +223,27 @@ rdoc_options:
144
223
  require_paths:
145
224
  - lib
146
225
  required_ruby_version: !ruby/object:Gem::Requirement
226
+ none: false
147
227
  requirements:
148
228
  - - ">="
149
229
  - !ruby/object:Gem::Version
230
+ hash: 3
150
231
  segments:
151
232
  - 0
152
233
  version: "0"
153
234
  required_rubygems_version: !ruby/object:Gem::Requirement
235
+ none: false
154
236
  requirements:
155
237
  - - ">="
156
238
  - !ruby/object:Gem::Version
239
+ hash: 3
157
240
  segments:
158
241
  - 0
159
242
  version: "0"
160
243
  requirements: []
161
244
 
162
245
  rubyforge_project:
163
- rubygems_version: 1.3.6
246
+ rubygems_version: 1.3.7
164
247
  signing_key:
165
248
  specification_version: 3
166
249
  summary: Directed acyclic graph plugin for ActiveRecord