
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Project is moved to new gem tree.rb (https://rubygems.org/gems/tree.rb/stats) and new repository (https://github.com/tokiro/tree.rb)
tree.rb is a 'clone' of tree unix command. It is based on tree visitor library. Tree visitor is an implementation of visitor design pattern.
$ tree.rb lib lib |-- tree_visitor.rb |-- treevisitor.rb |-- treevisitor_cli.rb `-- treevisitor |-- abs_node.rb |-- dir_processor.rb |-- dir_tree_walker.rb |-- leaf_node.rb |-- tree_node.rb |-- tree_node_visitor.rb |-- cli | `-- cli_tree.rb `-- visitors |-- block_tree_node_visitor.rb |-- build_dir_tree_visitor.rb |-- callback_tree_node_visitor2.rb |-- clone_tree_node_visitor.rb |-- depth_tree_node_visitor.rb |-- flat_print_tree_node_visitors.rb |-- print_dir_tree_visitor.rb `-- print_tree_node_visitor.rb
The tree.rb can generate json structure suitable to be visualized with protovis javascript library. See the examples directory.
$ ruby bin/tree.rb --format json lib { "lib": { "tree_visitor.rb": 45, "treevisitor": { "abs_node.rb": 2858, "basic_tree_node_visitor.rb": 578, "cli": { "cli_tree.rb": 2929 }, "directory_walker.rb": 5049, "leaf_node.rb": 526, "tree_node.rb": 5665, "tree_node_visitor.rb": 1263, "util": { "dir_processor.rb": 928 }, "visitors": { "block_tree_node_visitor.rb": 386, "build_dir_tree_visitor.rb": 1167, "callback_tree_node_visitor2.rb": 1652, "clone_tree_node_visitor.rb": 837, "depth_tree_node_visitor.rb": 427, "directory_to_hash_visitor.rb": 639, "flat_print_tree_node_visitors.rb": 341, "print_dir_tree_visitor.rb": 387, "print_tree_node_visitor.rb": 707 } }, "treevisitor.rb": 976, "treevisitor_cli.rb": 87 }
The json structure can be transformed into image:
http://rubydoc.info/gems/treevisitor
Try tree.rb -h to get help on command line. See examples directory to use treevisitor in your code.
sudo gem install treevisitor
Everybody is welcome to contribute to this project by commenting the source code, suggesting modifications or new ideas, reporting bugs, writing some documentation and, of course, you're also welcome to contribute with patches as well!
This gem have been tested on MRI 1.9.2.
Copyright (c) 2009-2011 tokiro.oyama@gmail.com. See LICENSE for details.
FAQs
Unknown package
We found that treevisitor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.