Ruby libraries
From WhyNotWiki
basclican Extensions/Libraries/Gems/etc. (for Ruby) (including some standard libraries)
See also: Rails plugins and extensions, Applications written in Ruby (for those projects that just refuse to be called a "library")
Ruby libraries edit (Category edit)
[edit] Core support libraries / Language "extensions"
Ruby libraries / Core edit (Category edit)
[edit] ActiveSupport
[Collection (category)]
See ActiveSupport
[edit]
Facets
[Collection (category)]
require "facets/string/margin"
# prior to Facets 2.0 require "facets/core/string/margin"
[edit]
Ruby/Extensions
[Collection (category)]
http://extensions.rubyforge.org/rdoc/index.html
[edit] Object
http://extensions.rubyforge.org/rdoc/classes/Object.html
[edit] in?(enumerable)
Test this object for inclusion in a given collection.45.in? (1...100) => trueThis method is contained in object.rb and enumerable.rb, because it logically belongs in both.
[edit] non_nil?()
The opposite of nil?."hello".non_nil? # -> true nil.non_nil? # -> false
[edit] singleton_class()
Returns the singleton class associated with this object.
[edit] pp_s
Want the output of pp as a string? Well, you're in luck: obj.pp_s does just that!
http://extensions.rubyforge.org/rdoc/classes/Object.html#M000020
Returns a pretty-printed string of the object. Requires libraries pp and stringio from the Ruby standard library.The following code pretty-prints an object (much like p plain-prints an object):
pp objectThe following code captures the pretty-printing in str instead of sending it to STDOUT.
str = object.pp_s
gem install -r extensions require 'extensions/object' puts obj.pp_s
(This is useful in ERb files, where you can't just do a normal pp obj. Instead, do a <%= obj.pp_s %>.)
To do it without pp_s extension:
irb -> s = ''; out = PP.pp({:a => 1}, s)
=> "{:a=>1}\n"
A bit obfuscated.
[edit] Comparison of Facets and Ruby/Extensions
Thomas on Facets-Universal 2007-03-26 19:10 [1]
[...] there is another gem called extensions (http://extensions.rubyforge.org), which is somehow similar to what facets core does. I just discovered it,
Yes, I've known of the project since it's inception. In fact a number of facets come from there. A well done project, but much more conservative than Facets. I've talked to Gavin (the maintainer) on a number of occasions. It's complimented by his project "additions". But development trailed off a couple of years ago.
require 'facets/core/symbol/to_proc'
[edit] (This is the middle)
[edit] assert_has_only_keys / assert_valid_keys
Comparison (shows any name differences; behavior differences will also be noted if any are found)
| Facets | QualitySmith Extensions | Rails ActiveSupport | Comment/Description | |
|---|---|---|---|---|
style="background: #DDFFDD" assert_has_only_keys |
style="background: #FFAF6F" assert_valid_keys |
|||
style="background: #DDFFDD" symbolize_keys(!) |
style="background: #FFAF6F" symbolize_keys(!) |
|||
style="background: #DDFFDD" stringify_keys(!) |
style="background: #FFAF6F" stringify_keys(!) |
|||
style="background: #DDFFDD" reverse_merge(!) |
style="background: #FFAF6F" reverse_merge(!) |
|||
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/hash/keys.rb require 'facets/core/hash/assert_has_only_keys' require 'facets/core/hash/symbolize_keys' require 'facets/core/hash/reverse_merge'
[edit] Kernel#constant / String/Symbol#constantize/
| Facets | QualitySmith Extensions | Rails ActiveSupport | Comment/Description | |
|---|---|---|---|---|
Kernel#constant String#to_const Symbol#to_const |
style="background: #DDFFDD" String#constantize/Symbol#constantize |
String#constantize/Symbol#constantize |
require 'qualitysmith_extensions/symbol/constantize' require 'facets/core/kernel/constant'
Someone had written that Facets Kernel#constant is "not as object oriented as ActiveSupport's; it's like a global method". Well, There's a reason that Facets uses a Kernel method. It makes it easier to get the constant you want since it can search from the "bottom up". By confining the code to a String binding the method can only work from the "top down". Even so, Facets also has String#to_const.
[edit] Module#modspace / Module#nesting / Module#parent(s)
| Facets | QualitySmith Extensions | Rails ActiveSupport | Comment/Description | |
|---|---|---|---|---|
style="background: #DDFFDD" Module#modspace |
style="background: #DDFFDD" Module#namespace |
style="background: #FFAF6F" Module#parent |
Returns the module’s container module. | |
nesting (A::B, B) |
style="background: #DDFFDD" parents |
style="background: #FFAF6F" parents |
||
style="background: #DDFFDD" Module#split ('A', 'B')
|
||||
style="background: #FFBBBB" Module#modspace (Instance method only) |
style="background: #DDFFDD" Module#namespace, Module.namespace_name_of/Module.dirname |
|||
/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/core_ext/module/introspection.rb require 'qualitysmith_extensions/module/namespace' #require 'facets/core/module/modspace' require 'facets/core/module/nesting'
Preferred name? I don't know. I don't really like the sound of modspace. But is "parent" too reminiscent of superclass / ancestry terminology? I'm afraid it might be...
I like how modspace alludes to the fact that it's a namespace created by a module. It's more about containers and nesting than actual ancestry (parent, descendant), so I think it would be good to use one of these words (or some combination):
- nesting
- container/contained_in
- namespace/space
- mod/module
I went with namespace and dirname in 'qualitysmith_extensions/module/namespace'.
Problem with namespace is that it is often used for forms of selector namespaces. Facets has a lib for them, and Rake uses the method for it's own thing. dirname is ok, in Facets that returns a string and Facets has actually had that forever --seeing that I came up with it ;) --Trans.
[edit]
Module#create / Class#create
require 'qualitysmith_extensions/module/create'
Differences from Module creation helper:
# r2964 (Tyler): # * Started from http://svn.pluginaweek.org/trunk/plugins/ruby/module/module_creation_helper/ (Last Changed Rev: 320) # * Renamed :parent option to :namespace. (:parent is still allowed for backwards compatibility) # * Changed examples and tests to pass in the name as a symbol instead of a string. # * Made it so you can pass in the namespace as part of the name if you want: Module.create(:'Foo::Bar') instead of Module.create(:Foo, :parent => Bar) # * Added to the documentation # * Added new tests # * test_with_block_2 # * test_nested_class_with_superclass_with_same_name # * test_referencing_a_namespace_that_isnt_defined # * test_creating_a_class_more_than_once # * test_using_return_value_of_one_create_within_another_create # * Added __FILE__, __LINE__ to class_eval so that error messages would be more helpful.
[edit] ↓ Module creation helper
| Homepage: | http://wiki.pluginaweek.org/Module_creation_helper |
|---|---|
| Source code: | http://svn.pluginaweek.org/trunk/plugins/ruby/module/module_creation_helper/ (no gem)
|
| Description: | module_creation_helper adds a helper method for creating new modules and classes at runtime. |
| Depends on: | ActiveSupport
|
# With a block
>> Module.create('Foo') do
def hello
"hello world"
end
end
=> Foo
>> include Foo
=> Object
>> hello
=> "hello world"
# With a parent
>> Module.create('Bar', :parent => Foo)
=> Foo::Bar
irb -> require 'lib/module_creation_helper.rb'
irb -> Module.create('Foo')
NoMethodError: undefined method `assert_valid_keys' for {}:Hash
from ./lib/module_creation_helper.rb:30:in `create'
from (irb):9
irb -> require 'active_support'
irb -> Module.create('Foo')
=> Foo
irb -> Class.create(:Woddle, :parent => Module.create(:Waddle))
=> Waddle::Woddle
Problems:
- I'd rather it be distributed in a gem, as part of Facets
- I'd rather say:
Class.create(:'Waddle::Woddle') - I'd rather it not depend on ActiveSupport at all
[edit] OrderedHash
| Categories/Tags: | |
|---|---|
| Homepage: | OrderedHash - Hash which preserves items order like PHP array. And other scripts comming soon. |
| Documentation: | http://simplypowerful.rubyforge.org/wiki/wiki.pl
|
| Project/Development: | http://rubyforge.org/projects/simplypowerful/
|
| Authors: | Jan Molič |
| Readiness: | 1.2005.1.1 August 9, 2005
|
[edit] Flexible extend
| Homepage: | http://wiki.pluginaweek.org/Flexible_extend |
|---|---|
| Source code: | http://svn.pluginaweek.org/trunk/plugins/ruby/module/flexible_attributes |
| Project/Development: | http://dev.pluginaweek.org/browser/trunk/plugins/ruby/module/flexible_attributes
|
| Description: | flexible_attributes allows strings and Procs (in addition to modules) to be used for extending objects.
|
class Klass
end
k = Klass.new
k.extend Proc.new {
def hello
"Hello from Proc.\n"
end
}
k.hello # => "Hello from Proc.\n"
[edit] autorequire
http://codeforpeople.com/lib/ruby/autorequire/autorequire-0.0.0/README
- autorequire is sleeker, more aerodynamic, greasier version of autoload.
- like autoload it's primary usage is to speed up the load time of large libraries which themselves do many requires.
autorequire 'Queue', 'thread'
# but we can also specify nested classes. note the alternative hash syntax.
# a list of const => lib pairs may also be given.
autorequire 'CGI::Session' => 'cgi/session'
[edit] QualitySmith Extensions
http://qualitysmithext.rubyforge.org
[edit] Ruby/DLX
| Project/Development: | http://rubyforge.org/projects/ruby-dlx/
|
|---|---|
| Description: | No more ruby-C-extensions needed to use the shared C library of your choice in ruby, now you can do it directly in Ruby itself! Ruby/DLX shows how simple interfacing ruby with c-libraries should be. The next version will no longer be a frontend to DL2.
|
[edit] SecuredRuby
| Project/Development: | http://rubyforge.org/projects/securedruby/
|
|---|---|
| Description: | Tainting objects and the tainting level seems quite primitive. This project aims to create a security manager like the security manager in the Java Virtual machine.
|
| Readiness: | 2 - Pre-Alpha, This Project Has Not Released Any Files 2007-03-23 19:20
|
[edit] Genie
| Documentation: | http://genie.rubyforge.org
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/genie/
|
| Description: | Genie is an implementation of the command pattern. It includes undo/redo functionality, transaction bundling, and load balancing features.
|
[edit] ToadCode
| Homepage: | http://toad.rubyforge.org/ |
|---|---|
| Source code: | http://toad.rubyforge.org/ |
| Project/Development: | http://rubyforge.org/projects/toad/
|
| Description: | [[description := The dusty old archives of the Toady Codey and his dabbles of scripty confection. [Miscellaneous stuff that wasn't ready/useful enough to throw in Facets.]|The dusty old archives of the Toady Codey and his dabbles of scripty confection. [Miscellaneous stuff that wasn't ready/useful enough to throw in Facets.]]]
|
| Authors: | Thomas Sawyer
|
Files: actionplan ballyhoo codepack fermat flashcard indexable mynil openproxy proto rtar texml type world advice benchmarks conditionals fhsmap function knowself namespace ostructable pry scanip tit4tat uri xmlproof annscript capsule crossit! finance harray local2inst once predicate quicktest selfshimmy toplevel vars yip associo closecall datetime fixnum-const implements merge oni prettyxml rerexml service trulyprivate webscriptable
[edit] Unicode Chars
| Project/Development: | http://rubyforge.org/projects/unicodechars/
|
|---|---|
| Description: | This project wraps the Rails unicode support in a gem, and mixes in support for the unicode gem. Its goal is to make the excellent work done by the Rails community seamless in traditional Ruby environments.
|
| Readiness: | 0.0.2 October 30, 2006
|
[edit] Dependencies
[edit] Dependency
| Project/Development: | http://rubyforge.org/projects/dependency/
|
|---|---|
| Description: | Smalltalk-inspired dependency mechanism for Ruby.
|
| Readiness: | 1.0.0 October 20, 2006
|
[edit] Security
[edit] RubyACL
| Categories/Tags: | ACL
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/rubyacl/
|
| Description: | RubyACL provides a basic, easy to extend library for adding ACL's to any program.
|
| Readiness: | 5 - Production/Stable, rubyacl-1.0 September 11, 2005
|
[edit] Testing
[edit] Documentation / syntax highlighting
[edit] Rtags
Rtags : Haven't got it working yet!
[edit]
CodeRay
- CodeRay is a fast syntax highlighting library written completely in Ruby.
[edit] Development / Project maintenance
Ruby development tools edit (Category edit)
[edit] dev-utils
| Homepage: | http://dev-utils.rubyforge.org/ |
|---|---|
| Documentation: | API http://dev-utils.rubyforge.org/DebuggingAids.html
|
| Project/Development: | http://rubyforge.org/projects/dev-utils
|
http://dev-utils.rubyforge.org/
With dev-utils/debug you can:
- Escape to an IRB session from a running program.
breakpoint breakpoint 'Person#name' # Identify it when it happens. breakpoint { @name } # Default return value.
- Access a no-config logfile for debugging.
debug 'Database connection established' # Look in ./debug.log
- Trace expressions in that logfile.
trace 'x + y' trace 'Process.pid' trace 'names', :pp # Pretty-print. trace 'page_structure', :yaml # YAML representation.
[edit]
rcodetools
| Categories/Tags: | [Test-driven development (category)]/[Behavior-driven development (category)]
|
|---|---|
| Source code: | gem install rcodetools |
| Project/Development: | http://rubyforge.org/projects/rcodetools/
|
| Description: | Unit(RSpec) assertion generation, code annotation, 100% accurate code completion, code & doc browsing, obtaining precise method info, meta-prog. aware, etc.
|
| Authors: | Mauricio Fernandez, rubikitch |
| Readiness: | Activity Percentile: 42.68%, 0.5.0 January 28, 2007
|
http://eigenclass.org/hiki.rb?rcodetools
rcodetools is a collection of Ruby code manipulation tools. It includes xmpfilter and editor-independent Ruby development helper tools, as well as emacs and vim interfaces.
Currently, rcodetools comprises:
- xmpfilter: automagic Test::Unit assertions/RSpec expectations and code annotations
- rct-complete: 100% accurate method/class/constant etc. completion
- rct-doc: document browsing and code navigator
- rct-meth-args: precise method info (meta-prog. aware) and TAGS generatio
[edit] The Well Tempered Ruby Application
| Source code: | svn://rubyforge.org/var/svn/hello |
|---|---|
| Project/Development: | http://rubyforge.org/projects/hello/
|
| Description: | This project is meant to be a template application, comprised of all the components a properly packaged ruby program should contain.
|
| Readiness: | 3 - Alpha, initial released September 13, 2006
|
[edit] Rake -- Ruby Make
[edit] Capistrano
Capistrano edit (Category edit)
[edit] Hoe
http://seattlerb.rubyforge.org/hoe/
Hoe is a simple rake/rubygems helper for project Rakefiles. It generates all the usual tasks for projects including rdoc generation, testing, packaging, and deployment.
- announce - Generate email announcement file and post to rubyforge.
- audit - Run ZenTest against the package
- docs - Build the docs HTML Files
- email - Generate email announcement file.
- install - Install the package. Uses PREFIX and RUBYLIB
- install_gem - Install the package as a gem
- multi - Run the test suite using multiruby
- package - Build all the packages
- post_blog - Post announcement to blog.
- post_news - Post announcement to rubyforge.
- publish_docs - Publish RDoc to RubyForge
- release - Package and upload the release to rubyforge.
- test - Run the test suite. Use FILTER to add to the command line.
- test_deps - Show which test files fail when run alone.
- ...
http://seattlerb.rubyforge.org/hoedown.html
- Hoe is used in 6.96% of all gems!
Looks comparable in scope to Ratchets.
[edit] Ratchets
http://ratchets.rubyforge.org/
http://ratchets.rubyforge.org/manual.html Ratchets - User Manual
Announcement: http://groups.google.com/group/nitro-general/browse_thread/thread/a6dd8d62552249ac?hl=en
- Reap is a set of integrated tasks designed to simplify the life of Ruby application developers and project managers. The tasks cover the range of common needs, from setting up a standard project structure to packaging and announcements. Because of the commonality between the tasks, Reap utilizes a central YAML configuration file(s) to harvest project information. This significantly simplifies usage.
- Custom tasks can also be easily created to suit specific project requirements. In this respect Reap is much like Rake. In fact Reap is a nearly 100% compatible replacement for Rake. On the other hand, if you can't pull yourself away from Rake, Reap's tasks can also be used via Rake much like any other set of addon Rake tasks.
[edit] Ratchets / Autorake
> All in all it seems like a really nice rake that finally understands it's > not only about tasks but about tasks for a specific project, i find that > very positive :) That's it exactly, well put.
[edit]
Ratchets / Exacto
ProjectInfo
The ruby extract runner can extract specific comments, in particular
==begin {label} ... ==end comments from a ruby script and run them
as a stand-alone code that depends on the original script. By default
it looks for comments labeled 'test'. So it is very good for running
tests embedded directly into source, but can also be used for other
code snippets.
[edit] setup.rb
http://i.loveruby.net/en/projects/setup/doc/ setup.rb User Manual
- setup.rb is the generic installer for ruby scripts/extentions. You can automate configuration and installation of your program package.
[edit] Dr. Nic's New Gem Generator
http://drnicwilliams.com/2006/10/11/generating-new-gems/
The New Gem Generator is like the rails command for rails applications, but it creates the folders and starting files for a new gem. Itâs called newgem.
Similar to hoe's 'sow' command?
[edit] Development: Debugging/Debuggers
[edit] ruby-breakpoint
| Description: | ruby-breakpoint lets you inspect and modify state, diagnose bugs, patch applications and more all via IRB by simply doing a method call at the place you want to investigate. It is no longer being maintained. Please consider using ruby-debug instead.
|
|---|---|
| Environment: | Console (Text Based) |
| Readiness: | 5 - Production/Stable, but abandoned
|
[edit] ruby-debug
| Documentation: | Faster implementation of the standard debug.rb using a native extension with a new hook Ruby C API .
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/ruby-debug/
|
| Readiness: | 3 - Alpha
|
[edit] Log Debug
http://rubyforge.org/projects/log-debug/
- Logging/Debugging library to allow different levels of Debug-msg verbosity -- i.e. can have multiple logging-objects (therefore output-targets), but an application only has an overall 'level'.
[edit]
Ruby Development Utilities
http://rubyforge.org/projects/dev-utils/
- Collects utilities that aid Ruby development, e.g. testing and debugging. Version 1.0 contains simple debug logging, tracing, and escaping to IRB.
[edit]
debugprint
http://rubyforge.org/projects/debugprint/
- A simple library that provides top-level debug() and info() methods. info() is the same as $stdout.puts() if $VERBOSE is true, debug() is the same as $stderr.puts() if $DEBUG is true.
[edit] Runtime Inspection and Debugging Thread
http://rubyforge.org/projects/rtinspect/
- This is a class that will enable remote access capabilities in a running Ruby process, exposing the ability to enable breakpoints, walk code (e.g. step/next/continue), inspect variables, modify codepaths, and many other debugging actions.
[edit] Mr. Guid
http://rubyforge.org/projects/mr-guid/
- Mitchell's Ruby GUI Debugger (Mr. Guid) is a simple Ruby GUI debugger written in Ruby using Ruby/GTK2 bindings. It is only meant to be a debugger, not an editor or IDE. It has all the functionality of Ruby's bundled debugger.
[edit] rudebug
http://rubyforge.org/projects/rudebug/
- A graphical debugger for Ruby. rudebug is written using Ruby-GNOME2 and Glade. It has support for local and remote debugging with ruby-debug and ruby-breakpoint. For more information have a look at the homepage linked at the bottom of this page.
[edit] ZenDebugger
Part of ZenHacks
[edit] Plugin systems
[edit] GemPlugin: Gem-Based Plugin System
http://mongrel.rubyforge.org/gem_plugin_rdoc/index.html
GemPlugin is a system that lets your users install gems and lets you load them as additional features to use in your software.
GemPlugin works by listing the gems installed, and doing a require_gem on any that have the right dependencies. For example, if a gem depends on "gem_plugin" and "mongrel" then itâll load as a Mongrel plugin. This makes it so that users of the plugins only need to gem install (and maybe config a bit), and plugin authors only need to make gems.
String manipulation / comparison / searching=
| Homepage: | http://amatch.rubyforge.org/ |
|---|---|
| Documentation: | RDoc
|
| Project/Development: | http://rubyforge.org/projects/amatch/
|
| Description: | This is a collection of classes that can be used for approximate matching, searching, and comparing of Strings. They implement algorithms that compute the Levenshtein edit distance, Sellers edit distance, the Hamming distance, the longest common subsequence length, the longest common substring length, and the pair distance metric.
|
| Readiness: | 4 - Beta
|
Example [2]:
m = Sellers.new("pattern")
m.match(["pattren","parent"])
# => [2.0, 4.0]
m.search("abcpattrendef")
# => 2.0
[edit] StringIO
http://www.ruby-doc.org/stdlib/libdoc/stringio/rdoc/index.html stringio
http://beaver.net/slides/ruby/10-easy-pieces.html
- Perform file i/o operations on a string
- Lets you use same code path for manipulating strings and files
[edit] Console application (command line) libraries
[edit] Compression
[edit] zlib
http://www.ruby-doc.org/stdlib/libdoc/zlib/rdoc/index.html
http://beaver.net/slides/ruby/10-easy-pieces.html
- Read and write compressed files or data
- Popular zlib format (gzip, etc)
- Save disk space at the expense of decompressing when you want to read your data
[edit] Data structures
[edit] Rogue
| Project/Development: | http://rubyforge.org/projects/rogue/
|
|---|---|
| Description: | Rogue is an object graph data persistence layer. Objects are stored in a directed graph (tree-like) structure, with nodes and edges. Graphs may exist in memory, in a file, distributed across multiple files, databases, disks, or servers, or combinations.
|
| Readiness: | 2 - Pre-Alpha, 2006-01-18
|
[edit] statemachine
| Project/Development: | http://rubyforge.org/projects/statemachine/
|
|---|---|
| Description: | A simple and powerful Ruby library that allows users to easily build full-featured statemachines within their Ruby projects.
|
[edit] Data structures: Collections
[edit] Collections
| Project/Development: | http://rubyforge.org/projects/collections/
|
|---|---|
| Description: | Gem that provides various collection implementations that are not available in the standard ruby lib (OrderedHash, Bag, LRUMap...).
|
| Readiness: | 1 - Planning, released 0.1.2 March 10, 2007
|
[edit] Data structures: Trie
http://en.wikipedia.org/wiki/Trie
In computer science, a trie, or prefix tree, is an ordered tree data structure that is used to store an associative array where the keys are strings. [...] All the descendants of any one node have a common prefix of the string associated with that node, and the root is associated with the empty string.
The following are the main advantages of tries over binary search trees (BSTs):
- Looking up keys is faster. Looking up a key of length m takes worst case O(m) time. A BST takes O(log n) time, where n is the number of elements in the tree, because lookups depend on the depth of the tree, which is logarithmic in the number of keys.
- ...
[edit] Trie
| Project/Development: | http://rubyforge.org/projects/trie/
|
|---|---|
| Description: | An implementation of a trie data structure, useful for efficiently searching prefixes of strings or of other similar data.
|
| Readiness: | 5 - Production/Stable
|
[edit] Data/File formats
Conversion of, output to, etc.
[edit] JSON library for Ruby
http://rubyforge.org/projects/json/
- This library is for parsing JSON strings and unparsing ruby data structures. It can be easily extended to serialize/deserialize arbitrary ruby objects, and also includes a GTK2 GUI editor for JSON.
[edit] xmlresume2x
http://rubyforge.org/projects/xmlresume2x/
- xmlresume2x can convert CVs written in the XML Resume Library format (http://xmlresume.sourceforge.net) to a number of formats, including LaTeX markup which uses the europecv class and HTML.
[edit] spreadsheet
| Project/Development: | http://rubyforge.org/projects/spreadsheet/
|
|---|---|
| Description: | This package allows you to generate Excel compatible spreadsheets on any platform. No OLE required.
|
| Readiness: | 2 - Pre-Alpha, release February 8, 2007
|
[edit] Data formats: PDF
[edit] Ruby PDF Tools
http://rubyforge.org/projects/ruby-pdf/
Tools written in pure Ruby (no C extensions) for working with PDF documents.
[edit] PDFlib
(not just Ruby)
http://www.pdflib.com/products/pdflib-family/pdflib/
[edit] PDF-Writer
http://ruby-pdf.rubyforge.org/pdf-writer/
[edit] Input / output
[edit] BufferedTokenizer
| Project/Development: | http://rubyforge.org/projects/buftok/
|
|---|---|
| Description: | BufferedTokenizer extracts token delimited entities from a sequence of arbitrary inputs, either taking a delimiter upon instantiation, or acting line-based by default.
|
| Readiness: | released 0.1 December 18, 2006
|
[edit] IOTail
| Documentation: | http://rails-analyzer.rubyforge.org/tools/classes/IOTail.html
|
|---|---|
| Description: | IOTail provides a tail_lines method as a mixin. Jumps to near the end of the IO, then yields each line, waiting for new lines if it reaches eof?
|
# File lib/io_tail.rb, line 12
def tail_lines(&block) # :yields: line
self.seek(-1, IO::SEEK_END)
self.gets
loop do
self.each_line(&block)
if self.eof? then
sleep 0.25
self.pos = self.pos # reset eof?
end
end
end
[edit] Networking
[edit] pscan: Simple TCP/IP port scanner
| Homepage: | http://pscan.rubyforge.org/
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/pscan/
|
| Description: | Simple TCP/IP port scanner: is a high speed port scanner, implemented in pure Ruby (single file source). It may disclose all those ports too which nmap may not show you!
|
| Readiness: | 5 - Production/Stable, 0.0.2 May 14, 2005
|
[edit] Jabber::Simple
http://rubyforge.org/projects/xmpp4r-simple/
- Jabber::Simple takes the strong foundation laid by xmpp4r and hides the relatively high complexity of maintaining a simple instant messenger bot in Ruby.
[edit] RubyTorrent
http://rubyforge.org/projects/rubytorrent/
- RubyTorrent is a pure-Ruby BitTorrent peer library and toolset. You can use it to download or serve files over BitTorrent from any Ruby program.
[edit] net/https
Couldn't find a goood solid curl library for Ruby, so we used this. Seems to work quite nicely.
apt-get install libopenssl-ruby
[edit] Database
[edit] SafeQuery
| Categories/Tags: | |
|---|---|
| Documentation: | http://simplypowerful.rubyforge.org/wiki/wiki.pl
|
| Project/Development: | http://rubyforge.org/projects/simplypowerful/
|
| Description: | SafeQuery - builds safe SQL query using query template and data hash.
|
| Authors: | Jan MoliÄ |
| Readiness: | 1.2005.1.1 August 9, 2005
|
[edit] SQL Generation DSL
| Homepage: | http://rubyforge.org/projects/sqldsl/
|
|---|---|
| Description: | [[description := A framework for creating SQL statements with Ruby code. For example: Select[:column1].from[:table1].where do equal :column2, 10 end|A framework for creating SQL statements with Ruby code. For example: Select[:column1].from[:table1].where do equal :column2, 10 end]]
|
| Readiness: | 3 - Alpha
|
Doesn't look like it provides any practical benefit...
[edit] Database: [Object-relational mapping (category)]
[edit] DrySQL
See ActiveRecord
[edit] Distributed computing / DRb
See Ruby / Distributed Ruby edit
[edit] Graphics: general graphics libraries
[edit] RCairo graphics library
create vector graphics, output as various formats (PNG, PDF, SVG, etc.)
http://cairographics.org/rcairo
[edit] RMagick
[edit] ImageScience
http://seattlerb.rubyforge.org/ImageScience.html
- ImageScience is a clean and happy Ruby library that generates thumbnails -- and kicks the living crap out of RMagick. Oh, and it doesn't leak memo