dagnabit 3.0.1 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/History.md CHANGED
@@ -1,3 +1,22 @@
1
+ 3.1.1 (2011-08-31)
2
+ ==================
3
+
4
+ Bugfixes
5
+ --------
6
+
7
+ * Dagnabit <= 3.1.1 is not compatible with ActiveRecord 3.1, so tweaked its
8
+ gemspec to reflect this. To use dagnabit with ActiveRecord >= 3.1, use the
9
+ code in the activerecord-edge branch, which will likely become dagnabit
10
+ 4.0.0.
11
+
12
+ 3.1.0 (2011-07-28)
13
+ ==================
14
+
15
+ Minor enhancements
16
+ ------------------
17
+
18
+ * Added Dagnabit::Graph#sinks, a method to find sinks in a directed graph.
19
+
1
20
  3.0.1 (2011-04-30)
2
21
  ==================
3
22
 
@@ -144,5 +144,24 @@ module Dagnabit
144
144
 
145
145
  ids.reject { |k, _| children[k] }.map { |_, v| v }
146
146
  end
147
+
148
+ ##
149
+ # Returns the sink vertices in the graph. Sinks are not returned in any
150
+ # particular order.
151
+ #
152
+ # If this method is run on a subgraph of a larger graph, then the source
153
+ # determination is done relative to the subgraph.
154
+ #
155
+ # This method expects all vertices and edges to have been persisted, and
156
+ # will return incorrect results if there exist unpersisted vertices of edges
157
+ # in the graph.
158
+ #
159
+ # @return [Array<vertex_model>] an array of sinks
160
+ def sinks
161
+ ids = vertices.inject({}) { |r, v| r.update(v.id => v) }
162
+ edge_source_ids = edges.inject({}) { |r, e| r.update(e.parent_id => true) }
163
+
164
+ ids.reject { |k, _| edge_source_ids[k] }.map { |_, v| v }
165
+ end
147
166
  end
148
167
  end
@@ -1,3 +1,3 @@
1
1
  module Dagnabit
2
- VERSION = '3.0.1'
2
+ VERSION = '3.1.1'
3
3
  end
metadata CHANGED
@@ -1,116 +1,116 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dagnabit
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.1.1
4
5
  prerelease:
5
- version: 3.0.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - David Yip
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-04-30 00:00:00 -05:00
14
- default_executable:
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
12
+ date: 2011-08-31 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
17
15
  name: activerecord
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &2157320440 !ruby/object:Gem::Requirement
20
17
  none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
24
21
  version: 2.3.0
22
+ - - <
23
+ - !ruby/object:Gem::Version
24
+ version: '3.1'
25
25
  type: :runtime
26
- version_requirements: *id001
27
- - !ruby/object:Gem::Dependency
28
- name: autotest
29
26
  prerelease: false
30
- requirement: &id002 !ruby/object:Gem::Requirement
27
+ version_requirements: *2157320440
28
+ - !ruby/object:Gem::Dependency
29
+ name: autotest
30
+ requirement: &2157319140 !ruby/object:Gem::Requirement
31
31
  none: false
32
- requirements:
33
- - - ">="
34
- - !ruby/object:Gem::Version
35
- version: "0"
32
+ requirements:
33
+ - - ! '>='
34
+ - !ruby/object:Gem::Version
35
+ version: '0'
36
36
  type: :development
37
- version_requirements: *id002
38
- - !ruby/object:Gem::Dependency
39
- name: bluecloth
40
37
  prerelease: false
41
- requirement: &id003 !ruby/object:Gem::Requirement
38
+ version_requirements: *2157319140
39
+ - !ruby/object:Gem::Dependency
40
+ name: bluecloth
41
+ requirement: &2157318580 !ruby/object:Gem::Requirement
42
42
  none: false
43
- requirements:
44
- - - ">="
45
- - !ruby/object:Gem::Version
46
- version: "0"
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
47
  type: :development
48
- version_requirements: *id003
49
- - !ruby/object:Gem::Dependency
50
- name: cucumber
51
48
  prerelease: false
52
- requirement: &id004 !ruby/object:Gem::Requirement
49
+ version_requirements: *2157318580
50
+ - !ruby/object:Gem::Dependency
51
+ name: cucumber
52
+ requirement: &2157318020 !ruby/object:Gem::Requirement
53
53
  none: false
54
- requirements:
55
- - - ">="
56
- - !ruby/object:Gem::Version
57
- version: "0"
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
58
  type: :development
59
- version_requirements: *id004
60
- - !ruby/object:Gem::Dependency
61
- name: rake
62
59
  prerelease: false
63
- requirement: &id005 !ruby/object:Gem::Requirement
60
+ version_requirements: *2157318020
61
+ - !ruby/object:Gem::Dependency
62
+ name: rake
63
+ requirement: &2157317500 !ruby/object:Gem::Requirement
64
64
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: "0"
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
69
  type: :development
70
- version_requirements: *id005
71
- - !ruby/object:Gem::Dependency
72
- name: rspec
73
70
  prerelease: false
74
- requirement: &id006 !ruby/object:Gem::Requirement
71
+ version_requirements: *2157317500
72
+ - !ruby/object:Gem::Dependency
73
+ name: rspec
74
+ requirement: &2157316940 !ruby/object:Gem::Requirement
75
75
  none: false
76
- requirements:
76
+ requirements:
77
77
  - - ~>
78
- - !ruby/object:Gem::Version
79
- version: "2.0"
78
+ - !ruby/object:Gem::Version
79
+ version: '2.0'
80
80
  type: :development
81
- version_requirements: *id006
82
- - !ruby/object:Gem::Dependency
83
- name: pg
84
81
  prerelease: false
85
- requirement: &id007 !ruby/object:Gem::Requirement
82
+ version_requirements: *2157316940
83
+ - !ruby/object:Gem::Dependency
84
+ name: pg
85
+ requirement: &2157316280 !ruby/object:Gem::Requirement
86
86
  none: false
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: "0"
87
+ requirements:
88
+ - - ! '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
91
  type: :development
92
- version_requirements: *id007
93
- - !ruby/object:Gem::Dependency
94
- name: yard
95
92
  prerelease: false
96
- requirement: &id008 !ruby/object:Gem::Requirement
93
+ version_requirements: *2157316280
94
+ - !ruby/object:Gem::Dependency
95
+ name: yard
96
+ requirement: &2157315700 !ruby/object:Gem::Requirement
97
97
  none: false
98
- requirements:
99
- - - ">="
100
- - !ruby/object:Gem::Version
101
- version: "0"
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
102
  type: :development
103
- version_requirements: *id008
104
- description: Directed acyclic graph support library for applications using ActiveRecord on top of PostgreSQL.
105
- email:
103
+ prerelease: false
104
+ version_requirements: *2157315700
105
+ description: Directed acyclic graph support library for applications using ActiveRecord
106
+ on top of PostgreSQL.
107
+ email:
106
108
  - yipdw@member.fsf.org
107
- executables:
109
+ executables:
108
110
  - dagnabit-test
109
111
  extensions: []
110
-
111
112
  extra_rdoc_files: []
112
-
113
- files:
113
+ files:
114
114
  - History.md
115
115
  - MIGRATION.md
116
116
  - README.md
@@ -138,33 +138,28 @@ files:
138
138
  - db/models/other_vertex.rb
139
139
  - db/models/vertex.rb
140
140
  - db/schema.rb
141
- has_rdoc: true
142
141
  homepage: http://rubygems.org/gems/dagnabit
143
142
  licenses: []
144
-
145
143
  post_install_message:
146
144
  rdoc_options: []
147
-
148
- require_paths:
145
+ require_paths:
149
146
  - lib
150
- required_ruby_version: !ruby/object:Gem::Requirement
147
+ required_ruby_version: !ruby/object:Gem::Requirement
151
148
  none: false
152
- requirements:
153
- - - ">="
154
- - !ruby/object:Gem::Version
155
- version: "0"
156
- required_rubygems_version: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ required_rubygems_version: !ruby/object:Gem::Requirement
157
154
  none: false
158
- requirements:
159
- - - ">="
160
- - !ruby/object:Gem::Version
161
- version: "0"
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
162
159
  requirements: []
163
-
164
160
  rubyforge_project:
165
- rubygems_version: 1.5.3
161
+ rubygems_version: 1.8.6
166
162
  signing_key:
167
163
  specification_version: 3
168
164
  summary: Directed acyclic graph plugin for ActiveRecord/PostgreSQL
169
165
  test_files: []
170
-