rubytree 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/API-CHANGES +42 -0
- data/COPYING +14 -0
- data/History.txt +21 -0
- data/Manifest.txt +1 -1
- data/README +63 -8
- data/Rakefile +12 -6
- data/TODO +45 -17
- data/lib/tree.rb +376 -115
- data/lib/tree/binarytree.rb +41 -8
- data/test/test_binarytree.rb +13 -2
- data/test/test_tree.rb +204 -50
- metadata +52 -30
- data/ChangeLog +0 -235
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubytree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 7
|
8
|
+
- 0
|
9
|
+
version: 0.7.0
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Anupam Sengupta
|
@@ -9,39 +14,51 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-05-04 00:00:00 +05:30
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: rubyforge
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
25
|
-
-
|
26
|
-
|
27
|
+
segments:
|
28
|
+
- 2
|
29
|
+
- 0
|
30
|
+
- 4
|
31
|
+
version: 2.0.4
|
27
32
|
type: :development
|
28
|
-
|
29
|
-
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: hoe-yard
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
33
|
-
|
34
|
-
|
41
|
+
segments:
|
42
|
+
- 0
|
43
|
+
- 1
|
44
|
+
- 2
|
45
|
+
version: 0.1.2
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
35
48
|
- !ruby/object:Gem::Dependency
|
36
49
|
name: hoe
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
52
|
requirements:
|
41
53
|
- - ">="
|
42
54
|
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
|
55
|
+
segments:
|
56
|
+
- 2
|
57
|
+
- 6
|
58
|
+
- 0
|
59
|
+
version: 2.6.0
|
60
|
+
type: :development
|
61
|
+
version_requirements: *id003
|
45
62
|
description: |-
|
46
63
|
RubyTree is a Ruby implementation of the generic tree data structure. It provides a node-based model to store keyed
|
47
64
|
node-elements in the tree and simple APIs to access, modify and traverse the structure. RubyTree is node-centric, where
|
@@ -57,15 +74,14 @@ extensions: []
|
|
57
74
|
extra_rdoc_files:
|
58
75
|
- History.txt
|
59
76
|
- Manifest.txt
|
60
|
-
- README
|
61
77
|
- COPYING
|
62
|
-
-
|
78
|
+
- API-CHANGES
|
63
79
|
files:
|
64
80
|
- COPYING
|
65
|
-
- ChangeLog
|
66
81
|
- History.txt
|
67
82
|
- Manifest.txt
|
68
83
|
- README
|
84
|
+
- API-CHANGES
|
69
85
|
- Rakefile
|
70
86
|
- TODO
|
71
87
|
- lib/tree.rb
|
@@ -73,44 +89,50 @@ files:
|
|
73
89
|
- setup.rb
|
74
90
|
- test/test_binarytree.rb
|
75
91
|
- test/test_tree.rb
|
76
|
-
has_rdoc:
|
92
|
+
has_rdoc: yard
|
77
93
|
homepage: http://rubytree.rubyforge.org
|
78
94
|
licenses: []
|
79
95
|
|
80
96
|
post_install_message: |
|
81
97
|
========================================================================
|
82
98
|
|
83
|
-
Thank you for installing
|
99
|
+
Thank you for installing rubytree.
|
84
100
|
|
85
|
-
Please note that a few APIs have been deprecated since Version 0.6.1
|
101
|
+
Please note that a few APIs have been deprecated since Version 0.6.1.
|
86
102
|
|
87
103
|
Specifically, the 'Tree::TreeNode#depth' method is now deprecated, and
|
88
104
|
a new nodeDepth() method has been introduced.
|
89
105
|
|
106
|
+
Details of the API changes are documented in the API-CHANGES file.
|
107
|
+
|
90
108
|
========================================================================
|
91
109
|
|
92
110
|
rdoc_options:
|
93
|
-
- --
|
94
|
-
-
|
95
|
-
- --
|
111
|
+
- --files
|
112
|
+
- COPYING,API-CHANGES
|
113
|
+
- --title
|
114
|
+
- Rubytree Documentation
|
115
|
+
- --quiet
|
96
116
|
require_paths:
|
97
117
|
- lib
|
98
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
99
119
|
requirements:
|
100
120
|
- - ">="
|
101
121
|
- !ruby/object:Gem::Version
|
122
|
+
segments:
|
123
|
+
- 0
|
102
124
|
version: "0"
|
103
|
-
version:
|
104
125
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
126
|
requirements:
|
106
127
|
- - ">="
|
107
128
|
- !ruby/object:Gem::Version
|
129
|
+
segments:
|
130
|
+
- 0
|
108
131
|
version: "0"
|
109
|
-
version:
|
110
132
|
requirements: []
|
111
133
|
|
112
134
|
rubyforge_project: rubytree
|
113
|
-
rubygems_version: 1.3.
|
135
|
+
rubygems_version: 1.3.6
|
114
136
|
signing_key:
|
115
137
|
specification_version: 3
|
116
138
|
summary: RubyTree is a Ruby implementation of the generic tree data structure
|
data/ChangeLog
DELETED
@@ -1,235 +0,0 @@
|
|
1
|
-
2010-01-30 Anupam Sengupta <anupamsg@gmail.com>
|
2
|
-
|
3
|
-
* lib/tree.rb (Tree): Update the example code to use Ruby
|
4
|
-
conventions for the variable names.
|
5
|
-
(Tree): updated the documentation.
|
6
|
-
|
7
|
-
* README: Updated the example to use Ruby conventions for the
|
8
|
-
variable names.
|
9
|
-
|
10
|
-
2010-01-28 Anupam Sengupta <anupamsg@gmail.com>
|
11
|
-
|
12
|
-
* Rakefile: Minor documentation change.
|
13
|
-
|
14
|
-
* README (DOCUMENTATION): Added comments to the example code.
|
15
|
-
|
16
|
-
* test/test_tree.rb: Documentation clean up.
|
17
|
-
|
18
|
-
* test/test_binarytree.rb: Documentation clean up.
|
19
|
-
|
20
|
-
* lib/tree.rb (Tree): Cleaned up documentation. Also some minor
|
21
|
-
code refactoring done.
|
22
|
-
|
23
|
-
* lib/tree/binarytree.rb (Tree): Cleaned up documentation. Minor
|
24
|
-
readability improvement in the isLeftChild? and isRightChild? methods.
|
25
|
-
|
26
|
-
2010-01-05 Anupam Sengupta <anupamsg@gmail.com>
|
27
|
-
|
28
|
-
* README: Updated the requirements section.
|
29
|
-
|
30
|
-
* Rakefile: Removed the hard run-time dependency on
|
31
|
-
'structured_warnings' gem. The library will still be used if
|
32
|
-
available on the user's system.
|
33
|
-
|
34
|
-
* test/test_tree.rb: Changed the tests to sync with the
|
35
|
-
soft-dependency on 'structured_warnings'.
|
36
|
-
|
37
|
-
* lib/tree.rb (Tree::TreeNode#depth): Removed the hard
|
38
|
-
dependency on 'structured_warnings' RubyGem. Changed to a soft
|
39
|
-
dependency that degrades well to a standard warning mechanism if
|
40
|
-
the Gem is not available.
|
41
|
-
|
42
|
-
2010-01-03 Anupam Sengupta <anupamsg@gmail.com>
|
43
|
-
|
44
|
-
* lib/tree.rb (Tree::TreeNode#nodeDepth): Added the nodeDepth and
|
45
|
-
nodeHeight methods. Deprecated the depth method. This is the
|
46
|
-
bug-fix for bug # 22535.
|
47
|
-
|
48
|
-
* Rakefile: Added run-time dependency on the 'structured_warnings' gem.
|
49
|
-
|
50
|
-
* test/test_tree.rb: Added new test cases for the new nodeDepth
|
51
|
-
and nodeHeight methods.
|
52
|
-
|
53
|
-
2010-01-01 Anupam Sengupta <anupamsg@gmail.com>
|
54
|
-
|
55
|
-
* Rakefile: Have migrated 100% to usage of Hoe for the rake
|
56
|
-
tasks. Have removed all legacy GemSpec and custom task definitions.
|
57
|
-
|
58
|
-
* .cvsignore: Added the coverage.info file to the excluded list.
|
59
|
-
|
60
|
-
* TODO: More TODO items. Changed the file mode to use org-mode.
|
61
|
-
|
62
|
-
* History.txt: Added the change log summary.
|
63
|
-
|
64
|
-
* README: Updated the content to match the Hoe sections. Minor
|
65
|
-
formatting performed. Changed the line endings to Unix.
|
66
|
-
|
67
|
-
* COPYING: Minor formatting changes.
|
68
|
-
|
69
|
-
* lib/tree.rb (Tree): Updated the release version number.
|
70
|
-
|
71
|
-
2007-12-21 Anupam Sengupta <anupamsg@gmail.com>
|
72
|
-
|
73
|
-
* Rakefile: Added the rcov option to exclude rcov itself from
|
74
|
-
coverage reports.
|
75
|
-
|
76
|
-
* lib/tree.rb: Minor comment changes.
|
77
|
-
|
78
|
-
* test/test_tree.rb: Added the TestTree enclosing module, and
|
79
|
-
renamed tests to meet ZenTest requirements. Also added a few
|
80
|
-
missing test cases.
|
81
|
-
|
82
|
-
* test/test_binarytree.rb: Added the TestTree enclosing Module,
|
83
|
-
and renamed the tests to meet ZenTest requirements.
|
84
|
-
|
85
|
-
2007-12-19 Anupam Sengupta <anupamsg@gmail.com>
|
86
|
-
|
87
|
-
* README (Module): Modified the install instructions from source.
|
88
|
-
|
89
|
-
* lib/tree.rb (Tree::TreeNode::initialize): Removed the
|
90
|
-
unnecessary self_initialize method.
|
91
|
-
(Tree::TreeNode): Removed the spurious self_initialize from the
|
92
|
-
protected list.
|
93
|
-
(Module): Updated the minor version number.
|
94
|
-
|
95
|
-
* Rakefile: Fixed a problem with reading the Tree::VERSION for the
|
96
|
-
gem packaging, if any prior version of the gem is already installed.
|
97
|
-
|
98
|
-
2007-12-18 Anupam Sengupta <anupamsg@gmail.com>
|
99
|
-
|
100
|
-
* lib/tree.rb: Updated the marshalling logic to correctly handle
|
101
|
-
non-string content.
|
102
|
-
(Tree::TreeNode::createDumpRep): Minor code change to use symbols
|
103
|
-
instead of string key names.
|
104
|
-
(Tree): Version number change to 0.5.0
|
105
|
-
(Tree::TreeNode::hasContent): Minor fix to the comments.
|
106
|
-
|
107
|
-
* test/test_tree.rb (TC_TreeTest::test_breadth_each): Updated test
|
108
|
-
cases for the marshalling logic.
|
109
|
-
|
110
|
-
2007-11-12 Anupam Sengupta <anupamsg@gmail.com>
|
111
|
-
|
112
|
-
* test/test_binarytree.rb: Minor documentation correction.
|
113
|
-
|
114
|
-
* lib/tree/binarytree.rb (Tree::BinaryTreeNode::isRightChild):
|
115
|
-
Minor documentation change.
|
116
|
-
|
117
|
-
2007-10-10 Anupam Sengupta <anupamsg@gmail.com>
|
118
|
-
|
119
|
-
* README: Restructured the format.
|
120
|
-
|
121
|
-
* Rakefile: Added Hoe related logic. If not present, the Rakefile
|
122
|
-
will default to old behavior.
|
123
|
-
|
124
|
-
2007-10-09 Anupam Sengupta <anupamsg@gmail.com>
|
125
|
-
|
126
|
-
* Rakefile: Added setup.rb related tasks. Also added the setup.rb in the PKG_FILES list.
|
127
|
-
|
128
|
-
2007-10-01 Anupam Sengupta <anupamsg@gmail.com>
|
129
|
-
|
130
|
-
* Rakefile: Added an optional task for rcov code coverage.
|
131
|
-
Added a dependency for rake in the Gem Specification.
|
132
|
-
|
133
|
-
* test/test_binarytree.rb: Removed the unnecessary dependency on "Person" class.
|
134
|
-
|
135
|
-
* test/test_tree.rb: Removed dependency on the redundant "Person" class.
|
136
|
-
(TC_TreeTest::test_comparator): Added a new test for the spaceship operator.
|
137
|
-
(TC_TreeTest::test_hasContent): Added tests for hasContent? and length methods.
|
138
|
-
|
139
|
-
2007-08-30 Anupam Sengupta <anupamsg@gmail.com>
|
140
|
-
|
141
|
-
* test/test_tree.rb (TC_TreeTest::test_preordered_each, TC_TreeTest::test_breadth_each, TC_TreeTest::test_detached_copy):
|
142
|
-
Added new tests for the new functions added to tree.rb.
|
143
|
-
|
144
|
-
* lib/tree.rb (Tree::TreeNode::detached_copy, Tree::TreeNode::preordered_each, Tree::TreeNode::breadth_each):
|
145
|
-
Added new functions for returning a detached copy of the node and
|
146
|
-
for performing breadth first traversal. Also added the pre-ordered
|
147
|
-
traversal function which is an alias of the existing 'each' method.
|
148
|
-
|
149
|
-
* test/test_binarytree.rb (TC_BinaryTreeTest::test_swap_children):
|
150
|
-
Added a test case for the children swap function.
|
151
|
-
|
152
|
-
* lib/tree/binarytree.rb (Tree::BinaryTreeNode::swap_children):
|
153
|
-
Added new function to swap the children. Other minor changes in
|
154
|
-
comments and code.
|
155
|
-
|
156
|
-
2007-07-18 Anupam Sengupta <anupamsg@gmail.com>
|
157
|
-
|
158
|
-
* lib/tree/binarytree.rb (Tree::BinaryTreeNode::leftChild /
|
159
|
-
rightChild): Minor cosmetic change on the parameter name.
|
160
|
-
|
161
|
-
* test/testbinarytree.rb (TC_BinaryTreeTest::test_isLeftChild):
|
162
|
-
Minor syntax correction.
|
163
|
-
|
164
|
-
* lib/tree.rb (Tree::TreeNode::depth): Added a tree depth
|
165
|
-
computation method.
|
166
|
-
(Tree::TreeNode::breadth): Added a tree breadth method.
|
167
|
-
|
168
|
-
* test/testtree.rb (TC_TreeTest::test_depth/test_breadth): Added a
|
169
|
-
test for the depth and breadth method.
|
170
|
-
|
171
|
-
* lib/tree/binarytree.rb (Tree::BinaryTreeNode::is*Child):
|
172
|
-
Added tests for determining whether a node is a left or right
|
173
|
-
child.
|
174
|
-
|
175
|
-
* test/testbinarytree.rb: Added the test cases for the binary tree
|
176
|
-
implementation.
|
177
|
-
(TC_BinaryTreeTest::test_is*Child): Added tests for right or left
|
178
|
-
childs.
|
179
|
-
|
180
|
-
* lib/tree/binarytree.rb: Added the binary tree implementation.
|
181
|
-
|
182
|
-
2007-07-17 Anupam Sengupta <anupamsg@gmail.com>
|
183
|
-
|
184
|
-
* lib/tree.rb (Tree::TreeNode::parentage): Renamed 'ancestors'
|
185
|
-
method to 'parentage' to avoid clobbering Module.ancestors
|
186
|
-
|
187
|
-
2007-07-16 Anupam Sengupta <anupamsg@gmail.com>
|
188
|
-
|
189
|
-
* Rakefile: Added an optional rtags task to generate TAGS file for
|
190
|
-
Emacs.
|
191
|
-
|
192
|
-
* lib/tree.rb (Tree::TreeNode): Added navigation methods for
|
193
|
-
siblings and children. Also added some convenience methods.
|
194
|
-
|
195
|
-
2007-07-08 Anupam Sengupta <anupamsg@gmail.com>
|
196
|
-
|
197
|
-
* Rakefile: Added a developer target for generating rdoc for the
|
198
|
-
website.
|
199
|
-
|
200
|
-
2007-06-24 Anupam Sengupta <anupamsg@gmail.com>
|
201
|
-
|
202
|
-
* test/testtree.rb, lib/tree.rb: Added the each_leaf traversal method.
|
203
|
-
|
204
|
-
* README: Replaced all occurrances of LICENSE with COPYING
|
205
|
-
and lowercased all instances of the word 'RubyTree'.
|
206
|
-
|
207
|
-
* Rakefile: Replaced all occurrances of LICENSE with COPYING
|
208
|
-
|
209
|
-
2007-06-23 Anupam Sengupta <anupamsg@gmail.com>
|
210
|
-
|
211
|
-
* lib/tree.rb (Tree::TreeNode::isLeaf): Added a isLeaf? method.
|
212
|
-
|
213
|
-
* test/testtree.rb (TC_TreeTest::test_removeFromParent): Added
|
214
|
-
test for isLeaf? method
|
215
|
-
|
216
|
-
* Rakefile: Added the LICENSE and ChangeLog to the extra RDoc files.
|
217
|
-
|
218
|
-
* lib/tree.rb: Minor updates to the comments.
|
219
|
-
|
220
|
-
* test/testtree.rb: Added the Copyright and License header.
|
221
|
-
|
222
|
-
* test/person.rb: Added the Copyright and License header.
|
223
|
-
|
224
|
-
* lib/tree.rb: Added the Copyright and License header.
|
225
|
-
|
226
|
-
* Rakefile: Added the LICENSE and Changelog to be part of the RDoc task.
|
227
|
-
|
228
|
-
* README: Added documentation in the README, including install
|
229
|
-
instructions and an example.
|
230
|
-
|
231
|
-
* LICENSE: Added the BSD LICENSE file.
|
232
|
-
|
233
|
-
* Changelog: Added the Changelog file.
|
234
|
-
|
235
|
-
$Id$
|