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)
Ruby libraries / Core edit (Category edit)
[Collection (category)]
See ActiveSupport
Facets[Collection (category)]
require "facets/string/margin"
# prior to Facets 2.0 require "facets/core/string/margin"
Ruby/Extensions[Collection (category)]
http://extensions.rubyforge.org/rdoc/index.html
Objecthttp://extensions.rubyforge.org/rdoc/classes/Object.html
in?(enumerable)
Test this object for inclusion in a given collection. 45.in? (1...100) => true This method is contained in object.rb and enumerable.rb, because it logically belongs in both.
non_nil?()
The opposite of nil?. "hello".non_nil? # -> true nil.non_nil? # -> false
singleton_class()Returns the singleton class associated with this object.
pp_sWant 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 object The 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.
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'
assert_has_only_keys / assert_valid_keysComparison (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'
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.
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):
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.
Module#create / Class#createrequire '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.
| 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:
Class.create(:'Waddle::Woddle')| 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
|
| 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"
http://codeforpeople.com/lib/ruby/autorequire/autorequire-0.0.0/README
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'
http://qualitysmithext.rubyforge.org
| 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.
|
| 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
|
| 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.
|
| 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
| 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
|
| Project/Development: | http://rubyforge.org/projects/dependency/
|
|---|---|
| Description: | Smalltalk-inspired dependency mechanism for Ruby.
|
| Readiness: | 1.0.0 October 20, 2006
|
| 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
|
Rtags : Haven't got it working yet!
CodeRayRuby development tools edit (Category edit)
| 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:breakpoint breakpoint 'Person#name' # Identify it when it happens. breakpoint { @name } # Default return value.
- Escape to an IRB session from a running program.
debug 'Database connection established' # Look in ./debug.log
- Access a no-config logfile for debugging.
trace 'x + y' trace 'Process.pid' trace 'names', :pp # Pretty-print. trace 'page_structure', :yaml # YAML representation.
- Trace expressions in that logfile.
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
| 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
|
Capistrano edit (Category edit)
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
Looks comparable in scope to 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
> 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.
Ratchets / ExactoProjectInfo
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.
http://i.loveruby.net/en/projects/setup/doc/ setup.rb User Manual
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?
| 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
|
| 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
|
http://rubyforge.org/projects/log-debug/
Ruby Development Utilitieshttp://rubyforge.org/projects/dev-utils/
debugprinthttp://rubyforge.org/projects/debugprint/
http://rubyforge.org/projects/rtinspect/
http://rubyforge.org/projects/mr-guid/
http://rubyforge.org/projects/rudebug/
Part of ZenHacks
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
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
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
| 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
|
| 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.
|
| 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
|
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.
- ...
| 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
|
Conversion of, output to, etc.
http://rubyforge.org/projects/json/
http://rubyforge.org/projects/xmlresume2x/
| 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
|
http://rubyforge.org/projects/ruby-pdf/
Tools written in pure Ruby (no C extensions) for working with PDF documents.
(not just Ruby)
http://www.pdflib.com/products/pdflib-family/pdflib/
http://ruby-pdf.rubyforge.org/pdf-writer/
| 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
|
| 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
| 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
|
http://rubyforge.org/projects/xmpp4r-simple/
http://rubyforge.org/projects/rubytorrent/
Couldn't find a goood solid curl library for Ruby, so we used this. Seems to work quite nicely.
apt-get install libopenssl-ruby
| 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
|
| 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...
See ActiveRecord
See Ruby / Distributed Ruby edit
create vector graphics, output as various formats (PNG, PDF, SVG, etc.)
http://cairographics.org/rcairo
http://seattlerb.rubyforge.org/ImageScience.html
http://rubyforge.org/projects/semacode/
http://rubyforge.org/projects/barcode/
| Homepage: | http://rgplot.rubyforge.org/
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/rgplot/
|
| Description: | Module providing useful methods for interfacing with a Gnuplot process. The homepage provides the details of its use.
|
| Readiness: | 5 - Production/Stable, Version 2.2 November 14, 2005
|
[Condensation (category)]
Gnuplot.open do |gp| Gnuplot::Plot.new( gp ) do |plot| plot.xrange "[-10:10]" plot.title "Sin Wave Example" plot.ylabel "x" plot.xlabel "sin(x)" plot.data << Gnuplot::DataSet.new( "sin(x)" ) do |ds| ds.with = "lines" ds.linewidth = 4 end end end Gnuplot.open do |gp| Gnuplot::Plot.new( gp ) do |plot| plot.title "Array Plot Example" plot.ylabel "x" plot.xlabel "x^2" x = (0..50).collect { |v| v.to_f } y = x.collect { |v| v ** 2 } plot.data << Gnuplot::DataSet.new( [x, y] ) do |ds| ds.with = "linespoints" ds.notitle end end end
http://nubyonrails.com/pages/gruff
| Homepage: | http://scruffy.rubyforge.org/
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/scruffy/
|
| Description: | Graph, make it super simple and extensible, and you've got Scruffy.
|
Scruffy's key features include:
- Built on SVG Scruffy uses SVG internally for rendering graphs. This allows Scruffy to render your graph identically at almost any size.
- Mix-n-Match Graphs A Scruffy graph isn't limited to a single graph type (line, bar, area, etc). You can specify a different type for every data set.
- Snapshot Rendering You can render a Scruffy graph as many times as you want, and change any settings between renders. Data, colors, even the graph size and image type can all be changed for the next render.
- Easily Extendable Scruffy is designed to be extremely extendible. Adding new graph types or themes can be done in as little as a few lines of code. If you need more control over your graphs, you can customize the layouts, data generation, almost anything.
http://rubyfurnace.com/gems/tioga
| Homepage: | http://rubytreemap.rubyforge.org/ |
|---|---|
| Documentation: | RDocDemo: PNGDemo: HTML Treemap
|
| Description: | RubyTreemap provides an interface for creating treemaps and rendering them in multiple formats such as png, svg, and html.
|
| Readiness: | 3 - Alpha
|
What are Treemaps? See Treemaps
http://rubytreemap.rubyforge.org/docs/files/EXAMPLES.html
To create a treemap you first need to build up a tree structure using the Treemap::Node class. This is a generic tree node class and represents the data to be treemapâed. A Node in the treemap has a size and a color. The size can be any value and is specific to your data set. So for example, in a treemap of the stock market, a given nodeâs size could be equal to itâs total shares sold for the day. For all non-leaf nodes the size value must be equal to the sum of the sizes of itâs children. If the size is nil it will be calculated by recursively summing the size of the child nodes. The color for a node can be either a value (usually a percentage (a rate of change)) or a hex string color (#FFCCFF). If the color is a value then a hex color string will be generated for you using the GradientColor class. A quick example: root = Treemap::Node.new root.new_child(:size => 6) root.new_child(:size => 6) root.new_child(:size => 4) root.new_child(:size => 3) root.new_child(:size => 2) root.new_child(:size => 2) root.new_child(:size => 1) You can also build a tree from an XML file: file = File.new("data.xml") root = Treemap::tree_from_xml(file) Once you built up your root node now all you have to do is output it. For example (html output): output = Treemap::HtmlOutput.new do |o| o.width = 800 o.height = 600 o.center_labels_at_depth = 1 end puts output.to_html(root) (or image output): output = Treemap::ImageOutput.new do |o| o.width = 800 o.height = 600 end output.to_png(root)
| Project/Development: | http://rubyforge.org/projects/graphimacal/
|
|---|---|
| Description: | Graphimacal is a flexible library to produce elegant two-dimensional data visualizations such as plots. It is intended to support nearly any kind of desired output, and accept nearly any input.
|
| Readiness: | Registered: 2006-08-20 23:13, This Project Has Not Released Any Files 2007-03-23 17:50
|
Ruport is a REAP framework specialized for business reporting. It provides a custom toolkit that has features such as database interaction, data manipulation, extensible formatting, and flexible report generation. Ruby Reports makes reporting less painful by providing a simple and consistent way of developing your applications. This lets you focus on your task without undue friction. Ruby Reports is a framework that allows users to customize their reporting applications. It provides a solid foundation for you to build your applications on top of without making too many assumptions about your needs. Ruport is also a lighter alternative when compared to larger reporting packages. Here are some examples where Ruport is most useful:
- You have some existing reports that you want to clean up and make more extensible.
- You need to generate custom reports from a database-backed application (SQL/ActiveRecord).
- You have to deal with many different data sources and create multiple forms of output.
Libraries for building web sites
| Categories/Tags: | [Captcha (category)]
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/captcha/
|
| Description: | A simple CAPTCHA ("Completely Automatic Public Turing Test to Tell Computers and Humans Apart") written in Ruby. This will dynamically create an image containing a key displayed on a noisy background, which the user must enter into a text box.
|
| Authors: | Jamis Buck, Justin Dossey |
| Readiness: | 4 - Beta
|
| Project/Development: | http://rubyforge.org/projects/adwords4r/
|
|---|---|
| Description: | AdWords finally comes to rails! Manage your AdWords campaigns through irb or a rails application.
|
| Readiness: | 0.7 September 28, 2006
|
c = Campaign.new c.dailyBudget = 10000 c.status = 'Paused' c.name = 'Test P@' drv.addCampaign(AddCampaign.new(c))
| putting the semantic web on rails
|
|
| Categories/Tags: | [RDF (category)], Database, Rails, Object Brokering |
| Homepage: | http://www.activerdf.org/
|
| Project/Development: | http://rubyforge.org/projects/activerdf/
|
| Description: | ActiveRDF is a library for accessing RDF data from Ruby programs. It can be used as data layer in Ruby-on-Rails, similar to ActiveRecord (which provides an O/R mapping to relational databases). ActiveRDF in RoR allows you to create semantic web applications very rapidly. ActiveRDF gives you a Domain Specific Language (DSL) for your RDF model: you can address RDF resources, classes, properties, etc. programmatically, without queries.
|
| Environment: | Console (Text Based), Other Environment, Web Environment, [Rails (category)] |
| Readiness: | 4 - Beta
|
# we add an existing SPARQL database as datasource ConnectionPool.add_data_source(:type => :sparql, :results => :sparql_xml, :url => "http://m3pe.org:8080/repositories/test-people") # we register a short-hand notation for the namespace used in this test data Namespace.register :test, 'http://activerdf.org/test/' # now we can access all RDF properties of a person as Ruby attributes: eyal = RDFS::Resource.new 'http://activerdf.org/test/eyal' puts eyal.test::age puts eyal.test::eye puts eyal.rdf::type # now we construct Ruby classes for the currently existing RDFS classes ObjectManager.construct_classes armin = TEST::Person.new 'http://armin-haller.com/#me'
| Project/Development: | http://rubyforge.org/projects/payment/
|
|---|---|
| Description: | An easy to use payment gateway for Ruby. Payment is used to process credit cards and electronic cash through merchant accounts like Authorize.Net.
|
| Readiness: | 5 - Production/Stable
|
| Project/Development: | http://rubyforge.org/projects/vpaypal/
|
|---|---|
| Description: | A library to access Paypal's Website Payments Pro API. It implements both Express checkout API (pay from paypal account) and Direct checkout API (pay by credit card).
|
http://rubyforge.org/projects/ebay4r/
http://rubyforge.org/projects/rflickr/
http://rubyfurnace.com/gems/gmailer
A class interface of the Googleâs webmail service
http://www.ruby-doc.org/stdlib/libdoc/tempfile/rdoc/index.html
http://beaver.net/slides/ruby/10-easy-pieces.html
- Create a private temporary file with a guaranteed unique path
- Temp file is cleaned up automatically for you when the object expires
irb -> require 'tempfile'
irb -> f = Tempfile.new('what')
=> #<File:/tmp/what.30706.0>
irb -> f.path
=> "/tmp/what.30706.0"
irb -> f << "Some text."
irb -> f.rewind
irb -> f.read # => "Some text."
irb -> system "#{ENV['EDITOR']} #{f.path}"
irb -> require 'fileutils'
irb -> FileUtils.chmod 0700, f.path
# File won't be written until you close it.
irb -> f.close
# Although you can explicitly unlink the file, why bother? It appears to do that for you after the process terminates.
irb -> f.unlink
=> #<File:/tmp/what.30706.0>
http://safari.oreilly.com/0596523696/rubyckbk-CHP-6-SECT-8 [missing feature (category)]
http://www.ruby-doc.org/stdlib/libdoc/dbm/rdoc/index.html
http://beaver.net/slides/ruby/10-easy-pieces.html
- Simple disk-based key/value binary database, quick lookup time
- Not to be confused with bdb modules (Berkeley DB)
- Use this if you want to easily store a table of data to disk and you're not concerned with keeping it human-readable
http://www.ruby-doc.org/stdlib/libdoc/pathname/rdoc/index.html http://beaver.net/slides/ruby/10-easy-pieces.html
- Uber-class that bundles up all logic relating to file paths
- Wraps methods from Dir, Find, IO, File, FileUtils, FileTest classes
- Resolve symlinks, generate relative paths, safely concatenate path components
"evil.rb" should go here...
Ruby/DL
http://rubyforge.org/projects/zenhacks
http://seattlerb.rubyforge.org/mem_inspect/
require 'mem_inspect' require 'mem_inspect/png_viewer' MemInspect::PNGViewer.new(1024, 768).draw
require 'mem_inspect' require 'mem_inspect/aquaterm_viewer' MemInspect::AquatermViewer.new(1024, 768).draw
| Project/Development: | http://rubyforge.org/projects/style/
|
|---|---|
| Description: | This is a small ruby library that provides tools for surface-level analysis of English text, including readability scoring, syllable counting, part-of-speech analysis, and word simplicity. It was inspired by the C program GNU Style.
|
| Categories/Tags: | Graphics, Text Processing, Syntax trees
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/rsyntaxtree/
|
| Description: | RSyntaxTree is a Ruby port of phpSyntaxTree. It generates graphical images of tree structures typically used in theoretical linguistic researches (though not necessarily restricted to). It consists of an easy-to-use ruby library and web-based interface made with Ruby on Rails.
|
RSyntaxTree| Homepage: | http://www.yohasebe.com/rsyntaxtree/ |
|---|---|
| Documentation: | Working demo
|
| Project/Development: | http://rubyforge.org/projects/rsyntaxtree
|
| Description: | RSyntaxTree is a Ruby port of phpSyntaxTree. It generates graphical images of tree structures typically used in theoretical linguistic researches (though not necessarily restricted to).
|
| Readiness: | 0.1.1 March 11, 2007
|
http://www.yohasebe.com/rsyntaxtree/
Enter a sentence in a labeled bracket notation into the text area above and click the âDrawâ button. A graphical syntax tree will appear immediately. English and Japanese are available at the moment. Every branch or leaf of a tree must belong to a node. To create a node, place a label right next to the opening bracket. Arbitrary number of branches can follow with a preceding space. When a node has one and only one leaf and the leaf contains more than one space character (i.e. when itâs a phrase), a triangle is drawn instead of a vertical line if the âTrianglesâ option is on. You can select from multiple image formats (png, jpg, gif, and bmp). Also RSyntaxTree is capable of generating SVG files. This is very convenient for those who want to modify output images on third party vector graphic software (such as Adobe Illustrator and Microsoft Visio). Just click on the link that appears below the (non SVG) syntax tree image.
http://www.yohasebe.com/rsyntaxtree/
As a ruby application/library Ruby 1.8 or higher with RMagick (the latter requires your system have either ImageMagick or GraphickMagick already installed) [or] With web interface Web server with Ruby on Rails 1.0 or higher in addition to above.
Example input:
[S [NP RSyntaxTree][VP [V generates][NP multilingual syntax trees ]]]
| Categories/Tags: | text parsing, WWW/HTTP, Text Processing |
|---|---|
| Documentation: | A text parsing engine. The syntax is defined outside the engine as regex-based rules, in YAML or Ruby. It supports layering and multiple output types. Rules for Markdown to HTML are included, with optional layered extensions for tables and wikilinks.
|
| Readiness: | 3 - Alpha, 0.1.1 August 21, 2006
|
| Categories/Tags: | Code Generators, Compilers, Interpreters
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/peggy/
|
| Description: | Object oriented packrat parser library and language. Peggy supports grammars written in several languages, including two pure Ruby, a Parsing Expression Grammar (PEG) and my preferred grammar language. Packrat parsers are fast, flexible and need no lexer.
|
| Readiness: | 3 - Alpha
|
ParseTreehttp://rubyforge.org/projects/parsetree
Ruby2Rubyhttp://seattlerb.rubyforge.org/ruby2ruby/
RubyToRuby.translate(MyClass, :mymethod) # => "def mymethod..."| Project/Development: | http://rubyforge.org/projects/suby/
|
|---|---|
| Description: | Suby is an experimental fork of the Ruby Interpreter. It serves primarily as a research platform for AOP integration and dynamic parsing techniques, though a number of other interesting modifications are also being explored.
|
http://rubyforge.org/projects/metaruby
http://seattlerb.rubyforge.org/ograph/
Error on call to Template:cite web: Parameter url must be specified.
require 'ograph' require 'rubygems' require 'mechanize' mech = WWW::Mechanize.new mech.get('http://google.com/') puts ObjectGraph.graph(mech, :class_filter => /^WWW/)desc "project object graph" task :ograph do require 'ograph' require 'project/project' project = Project.load puts ObjectGraph.graph(project, :class_filter => /^Project/) end
Ruby development tools edit (Category edit)
http://rubyforge.org/projects/rubyinline
http://www.zenspider.com/ZSS/Products/RubyInline/
class MyTest def factorial(n) f = 1 n.downto(2) { |x| f *= x } f end inline do |builder| builder.c " long factorial_c(int max) { int i=max, result=1; while (i >= 2) { result *= i--; } return result; }" end endThe time for 1 million iterations of factorial and factorial_c is 27 and 7 respectively on my PowerBook (you can run 'make bench' from a RubyInline tarball on your hardware to get numbers for your platform).
An example using builder.optimize (which relies on Ruby2c):
require 'inline'
class MyTest
def factorial(n)
f = 1
n.downto(2) { |x| f *= x }
f
end
inline(:Ruby) do |builder|
builder.optimize :factorial
end
end
http://rubyforge.org/projects/ruby2c ruby2c - ruby to c translator
| Categories/Tags: | |
|---|---|
| Homepage: | none
|
| Project/Development: | http://rubyforge.org/projects/loom/
|
| Description: | A text-weaving tool, allowing text to be entered using only the cursor keys.
|
| Readiness: | prototype
|
http://rubyforge.org/forum/forum.php?forum_id=2236
A proof-of-concept of a text-entry paradigm that only requires you to use the cursor keys to enter text. Features character-level predictive modeling and a Fox / RUDL interface.
| Homepage: | http://www.fxruby.org/ |
|---|---|
| Documentation: | User's guide Examples/screenshots
|
| Project/Development: | http://rubyforge.org/projects/fxruby
|
| Description: | FXRuby is a Ruby extension module that provides an interface to the FOX GUI library. |
| Based on: | Uses Fox], a platform independent GUI toolkit written in C++.
|
| Homepage: | http://fox-tool.rubyforge.org/ |
|---|---|
| Documentation: | User's Guide
|
| Project/Development: | http://rubyforge.org/projects/fox-tool/
|
| Description: | An interactive GUI builder and code generator for FXRuby. It is a convenient tool that makes it easy to quickly build complex and good looking graphical user interfaces for Ruby.
|
| License: | Artistic
|
RubyWebDialogs| The Web Browser as a Graphical User Interface for Ruby Applications
|
|
| Homepage: | http://www.erikveen.dds.nl/rubywebdialogs/index.html (impressive) |
| Documentation: | http://rwdapplications.rubyforge.org/wiki/wiki.pl?RubyWebDialogs
|
| Project/Development: | http://sourceforge.net/projects/rubywebdialogs/http://rubyforge.org/projects/rubywebdialogs/
|
| License: | [[:GPL 2 LGPL 2.1|GPL 2 LGPL 2.1]]
|
| Authors: | Erik Veenstra
|
Lets you build platform-independent GUI applications by using your web browser/a web server (?).
http://rwdapplications.rubyforge.org/wiki/wiki.pl?RubyWebDialogs
RubyWebDialogs is a platform-independent graphical user interface for Ruby applications. It generates HTML and serves it with an internal HTTP server, so you can use your favorite web browser as the front end for your Ruby application. All this means, that it can be used on almost every platform, like Ruby itself. The basic idea of RubyWebDialogs is to keep development simple, so one can build simple applications in a couple of minutes and not-that-simple applications in a couple of hours. It's not meant for building big applications or things like adding functionality to the corporate's web site. (They'll use Java, anyway...) But if things get faster, and more stable, and more feature-rich, and more community driven, and more integrated with WEBrick, and Apache, well, who knows what all this will lead to... For now, it's just a thing I already use for almost a year and want to share. You don't have to know anything about HTML, or HTTP, or cookies, or TCP/IP or anything else that's necessary to communicate with browsers over a network. All that has to be and is covered by RubyWebDialogs. The only thing you need to know, besides Ruby, is the very basics of XML, because it's used to define the layout of the screens. RubyWebDialogs doesn't require any external packages, no RubyXML, no WEBrick, no Amrita. Just plain Ruby. RubyWebDialogs applications can be used over a network as well. A simple authentication mechanism is built in.
Example [3]:
<application>
<window name="main" title="Simple Calculator">
<table>
<row> <p align="right">First number:</p> <text name="a"/> </row>
<row> <p align="right">Second number:</p> <text name="b"/> </row>
</table>
<p>%result%</p>
<horizontal>
<button caption="Multiply" action="multiply"/>
<button caption="Add" action="add"/>
</horizontal>
</window>
</application>
File rwdcalc.rbw:
require "ev/rwd"
class Demo < RWDialog
def multiply
@result = "%s * %s = %s" % [@a, @b, @a.to_i*@b.to_i]
end
def add
@result = "%s + %s = %s" % [@a, @b, @a.to_i+@b.to_i]
end
end
Demo.file("rwdcalc.rwd").serve
Extensions/frameworks/add-ons for it:
http://rubyforge.org/projects/rwdapplications/
rubycocoa.sourceforge.net/doc/getting.en.html
http://rubyforge.org/projects/korundum/
http://rubyforge.org/projects/kdialog/
| Project/Development: | http://rubyforge.org/projects/creditcard/
|
|---|---|
| Description: | Validates credit cards using a mathematical algorithm.
|
| Project/Development: | http://rubyforge.org/projects/currency/
|
|---|---|
| Description: | Currency package provides an object-oriented model of world currencies, foreign exchanges, exchange rates and money values. Money values are timestamped for convertion between currencies using historical exchange rates. Supports RoR/ActiveRecord.
|
| Readiness: | 4 - Beta
|
| Categories/Tags: | Compilers, Interpreters
|
|---|---|
| Project/Development: | http://rubyforge.org/projects/expr-interpret/
|
| Description: | Expression interpreter parses and compiles simple mathematical expression. It respects brackets in the expression and operator precedence. The compiled expressions is evaluated using a predefined context, or using a block.
|
| Readiness: | 3 - Alpha
|
http://rubyforge.org/softwaremap/trove_list.php?form_cat=15&page=3
http://rubyforge.org/projects/permutation/
http://rubyforge.org/projects/rwikibot/
http://rubyforge.org/projects/vim-ruby/
http://rubyforge.org/projects/parlement/
http://rubyforge.org/projects/rubyvote/
http://rubyforge.org/projects/hornetseye/
http://rubyforge.org/projects/opencv/
http://rubyforge.org/projects/camellia/
http://rubyforge.org/projects/daapclient/
http://rubyforge.org/projects/rubypodder/
(Move to Applications written in Ruby)
http://rubyforge.org/projects/podcatcher/
http://rubyforge.org/projects/musicextras/
http://rubyforge.org/projects/rmovie/
http://rubyforge.org/projects/xspf/
http://rubyforge.org/projects/ruby-mp3info/
http://rubyforge.org/projects/mp3retracker/
| Homepage: | http://www.igvita.com/blog/2007/04/16/decision-tree-learning-in-ruby/
|
|---|
http://www.igvita.com/blog/2007/01/15/svd-recommendation-system-in-ruby/
[Decision tree learning (category)]
http://www.igvita.com/blog/2007/04/16/decision-tree-learning-in-ruby/
require 'rubygems' require 'decisiontree' attributes = ['Age', 'Education', 'Income', 'Marital Status'] training = [ ['36-55', 'Masters', 'High', 'Single', 1], ['18-35', 'High School', 'Low', 'Single', 0], ['< 18', 'High School', 'Low', 'Married', 1] # ... more training examples ] # Instantiate the tree, and train it based on the data (set default to '1') dec_tree = DecisionTree::ID3Tree.new(attributes, training, 1, :discrete) dec_tree.train test = ['< 18', 'High School', 'Low', 'Single', 0] decision = dec_tree.predict(test) puts "Predicted: #{decision} ... True decision: #{test.last}"; # Graph the tree, save to 'discrete.png' dec_tree.graph("discrete")
| Project/Development: | http://rubyforge.org/projects/rubles/
|
|---|---|
| Description: | Ruby forward and backward chaining rules system. Supports deduction or simplifying, domain transformation, integrity assertions / truth maintenance, and data-driven execution.
|
| Readiness: | This Project Has Not Released Any Files
|
| Project/Development: | http://rubyforge.org/projects/extract-curves/
|
|---|---|
| Description: | Convert the raster image effect of the characteristic of motion of an (interesting) process into a list of rectangular coordinates (in raster image's system) representing the inferred characteristic of motion of the midline of an image blob.
|
http://rubyforge.org/projects/drp/
http://rubyforge.org/projects/neuro/
| Project/Development: | http://rubyforge.org/projects/backprop/
|
|---|---|
| Description: | Create variably layered neuronal networks and train them using a backpropagation algorithm with this Ruby extension written in C
|
| Readiness: | 4 - Beta
|
http://seattlerb.rubyforge.org/rbayes/
Within each category, order by preference/rating.
Some overlap with:
Database table schema: