rubytree 1.0.0 → 1.0.2
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.
- checksums.yaml +5 -5
- data/Gemfile +0 -7
- data/Gemfile.lock +69 -40
- data/LICENSE.md +1 -2
- data/README.md +1 -2
- data/Rakefile +18 -22
- data/examples/example_basic.rb +1 -1
- data/lib/rubytree.rb +1 -1
- data/lib/tree/binarytree.rb +7 -11
- data/lib/tree/utils/camel_case_method_handler.rb +7 -10
- data/lib/tree/utils/hash_converter.rb +60 -64
- data/lib/tree/utils/json_converter.rb +10 -15
- data/lib/tree/utils/metrics_methods.rb +8 -7
- data/lib/tree/utils/path_methods.rb +3 -7
- data/lib/tree/utils/tree_merge_handler.rb +5 -7
- data/lib/tree/utils/utils.rb +2 -4
- data/lib/tree/version.rb +2 -3
- data/lib/tree.rb +99 -85
- data/rubytree.gemspec +90 -0
- data/setup.rb +1565 -0
- data/spec/tree_spec.rb +0 -2
- data/test/test_binarytree.rb +21 -22
- data/test/test_rubytree_require.rb +0 -2
- data/test/test_subclassed_node.rb +0 -4
- data/test/test_thread_and_fiber.rb +7 -10
- data/test/test_tree.rb +201 -203
- metadata +86 -29
data/rubytree.gemspec
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
#
|
2
|
+
# gemspec for the rubytree gem.
|
3
|
+
#
|
4
|
+
# Author:: Anupam Sengupta (anupamsg@gmail.com)
|
5
|
+
#
|
6
|
+
# Copyright (c) 2012, 2013, 2014, 2015, 2017, 2020, 2021 Anupam Sengupta
|
7
|
+
# All rights reserved.
|
8
|
+
|
9
|
+
require './lib/tree/version'
|
10
|
+
|
11
|
+
Gem::Specification.new do |s|
|
12
|
+
s.name = 'rubytree'
|
13
|
+
s.date = '2021-12-29'
|
14
|
+
s.version = Tree::VERSION
|
15
|
+
s.license = 'BSD-3-Clause-Clear'
|
16
|
+
|
17
|
+
s.platform = Gem::Platform::RUBY
|
18
|
+
s.author = 'Anupam Sengupta'
|
19
|
+
s.email = 'anupamsg@gmail.com'
|
20
|
+
s.homepage = 'http://rubytree.anupamsg.me'
|
21
|
+
|
22
|
+
s.required_ruby_version = '>=2.7'
|
23
|
+
|
24
|
+
s.summary = 'A generic tree data structure.'
|
25
|
+
s.description = <<-END_OF_TEXT
|
26
|
+
|
27
|
+
RubyTree is a pure Ruby implementation of the generic tree data structure. It
|
28
|
+
provides a node-based model to store named nodes in the tree, and provides
|
29
|
+
simple APIs to access, modify and traverse the structure.
|
30
|
+
|
31
|
+
The implementation is node-centric, where individual nodes in the tree are the
|
32
|
+
primary structural elements. All common tree-traversal methods (pre-order,
|
33
|
+
post-order, and breadth-first) are supported.
|
34
|
+
|
35
|
+
The library mixes in the Enumerable and Comparable modules to allow access to
|
36
|
+
the tree as a standard collection (iteration, comparison, etc.).
|
37
|
+
|
38
|
+
A Binary tree is also provided, which provides the in-order traversal in
|
39
|
+
addition to the other methods.
|
40
|
+
|
41
|
+
RubyTree supports importing from, and exporting to JSON, and also supports the
|
42
|
+
Ruby's standard object marshaling.
|
43
|
+
|
44
|
+
This is a BSD licensed open source project, and is hosted at
|
45
|
+
http://github.com/evolve75/RubyTree, and is available as a standard gem from
|
46
|
+
http://rubygems.org/gems/rubytree.
|
47
|
+
|
48
|
+
The home page for RubyTree is at http://rubytree.anupamsg.me.
|
49
|
+
|
50
|
+
END_OF_TEXT
|
51
|
+
|
52
|
+
s.files = Dir['lib/**/*.rb'] # The actual code
|
53
|
+
s.files += Dir['[A-Z]*'] # Various documentation files
|
54
|
+
s.files += Dir['test/**/*.rb'] # Test cases
|
55
|
+
s.files += Dir['spec/**/*.rb'] # Rspec Test cases
|
56
|
+
s.files += Dir['examples/**/*.rb'] # Examples
|
57
|
+
|
58
|
+
s.files += ['.gemtest'] # Support for gem-test
|
59
|
+
|
60
|
+
s.require_paths = ['lib']
|
61
|
+
|
62
|
+
s.test_files = Dir.glob('test/**/test_*.rb')
|
63
|
+
|
64
|
+
s.extra_rdoc_files = %w[README.md LICENSE.md API-CHANGES.rdoc History.rdoc]
|
65
|
+
s.rdoc_options = ['--title', 'Rubytree Documentation', '--quiet']
|
66
|
+
|
67
|
+
s.add_runtime_dependency 'json', '~> 2.6.1'
|
68
|
+
s.add_runtime_dependency 'structured_warnings', '~> 0.4.0'
|
69
|
+
|
70
|
+
# Development dependencies.
|
71
|
+
s.add_development_dependency 'bundler', '~> 2.3.4'
|
72
|
+
s.add_development_dependency 'coveralls', '>= 0.8.23'
|
73
|
+
s.add_development_dependency 'rake', '>= 13.0.6'
|
74
|
+
s.add_development_dependency 'rdoc', '>= 6.4.0'
|
75
|
+
s.add_development_dependency 'rspec', '~> 3.10.0'
|
76
|
+
s.add_development_dependency 'rtagstask', '~> 0.0.4'
|
77
|
+
s.add_development_dependency 'rubocop', '>= 1.24.0'
|
78
|
+
s.add_development_dependency 'test-unit', '>= 3.5.3'
|
79
|
+
s.add_development_dependency 'yard', '~> 0.9.27'
|
80
|
+
|
81
|
+
s.post_install_message = <<-END_OF_TEXT
|
82
|
+
========================================================================
|
83
|
+
Thank you for installing RubyTree.
|
84
|
+
|
85
|
+
Note:: As of 1.0.1, RubyTree can only support MRI Ruby >= 2.7.x
|
86
|
+
|
87
|
+
Details of the API changes are documented in the API-CHANGES file.
|
88
|
+
========================================================================
|
89
|
+
END_OF_TEXT
|
90
|
+
end
|