[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] rcodetools 0.4.0: TDD++, automagic assertions, 100% accurate completion, doc/code browsing...

Mauricio Fernández

12/29/2006 7:24:00 PM


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 (editor-independent) code completion
* rct-doc: document browsing and code navigator
* rct-meth-args: precise method info (meta-programming aware) and TAGS
generation

rcodetools includes and supersedes xmpfilter, which has been much improved and
extended by rubikitch, ultimately resulting in the rct-* tools, which are
almost entirely his work.

See http://eige.../hiki.rb?... for further information.

Download
========
rcodetools can be installed with RubyGems:

gem install rcodetools

If you try this shortly after a release and you get an old version/a 404
error, please allow some time until the packages propagate to RubyForge's
mirrors.

rcodetools is available in tarball format. rcodetools' executables will run
faster when installed this way, since RubyGems add a noticeable overhead.

Usage
=====
rcodetools can be used with any editor, but the distribution includes emacs
and vim interfaces (contributions for other editors are welcome); see
README.emacs and README.vim in the sources for more information.

Further usage info will be available at
http://eige.../hiki.rb?...

License
=======
Copyright (c) 2006 rubikitch <rubikitch@ruby-lang.org>
http://www.rubyist.net/~...
Copyright (c) 2005-2006 Mauricio Fernandez <mfp@acm.org>
http://eige...

Use and distribution subject to the terms of the Ruby license.

--
Mauricio Fernandez (on behalf of the "rcodetools devel team")

4 Answers

hemant

12/29/2006 7:43:00 PM

0

Mauricio Fernandez wrote:
> 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 (editor-independent) code completion
> * rct-doc: document browsing and code navigator
> * rct-meth-args: precise method info (meta-programming aware) and TAGS
> generation
>
> rcodetools includes and supersedes xmpfilter, which has been much improved and
> extended by rubikitch, ultimately resulting in the rct-* tools, which are
> almost entirely his work.
>
> See http://eigenclass.org/hiki.rb?... for further information.
>
> Download
> ========
> rcodetools can be installed with RubyGems:
>
> gem install rcodetools
>
> If you try this shortly after a release and you get an old version/a 404
> error, please allow some time until the packages propagate to RubyForge's
> mirrors.
>
> rcodetools is available in tarball format. rcodetools' executables will run
> faster when installed this way, since RubyGems add a noticeable overhead.
>
> Usage
> =====
> rcodetools can be used with any editor, but the distribution includes emacs
> and vim interfaces (contributions for other editors are welcome); see
> README.emacs and README.vim in the sources for more information.
>
> Further usage info will be available at
> http://eigenclass.org/hiki.rb?...
>
>
Awesome work, has this been tested in Windows too?


Mauricio Fernández

12/29/2006 8:20:00 PM

0

On Sat, Dec 30, 2006 at 04:42:45AM +0900, Hemant Kumar wrote:
> Mauricio Fernandez wrote:
> >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 (editor-independent) code completion
> > * rct-doc: document browsing and code navigator
> > * rct-meth-args: precise method info (meta-programming aware) and TAGS
> > generation
[...]
> Awesome work, has this been tested in Windows too?

Some people tried to use xmpfilter on win32 and there were some issues but I
believe they've been solved now (the code was modified so that it doesn't
require Kernel#fork/Open3::popen3 anymore, and some other problems were
addressed). If it doesn't work right now, I'm confident it can be fixed
easily, so just give it a try and we'll try to solve problems as they appear.

AFAIK the rct-* scripts haven't been tested on win32 yet (I haven't, and I
believe rubikitch doesn't normally do win32 either), but they are based on the
same code as xmpfilter so there's a good chance they'll work to some extent.

At the moment rcodetools ships with emacs/vim plugins that make them quite
convenient, but there's no reason why the same couldn't be done for other
editors. For instance, in vim <LocalLeader>r (\r by default) shows you the RI
documentation of the *actual* method being invoked, so if you have
foo.dostuff
and several classes have a #dostuff instance method, it will determine which
definition has been used and show its documentation.

The vim plugin is in an early development stage, but rcodetools.el is much
more powerful and polished.

--
Mauricio Fernandez - http://eige... - singular Ruby

Ara.T.Howard

12/29/2006 8:26:00 PM

0

Mauricio Fernández

12/30/2006 7:19:00 PM

0

On Sat, Dec 30, 2006 at 05:26:02AM +0900, ara.t.howard@noaa.gov wrote:
> On Sat, 30 Dec 2006, Mauricio Fernandez wrote:
> >On Sat, Dec 30, 2006 at 04:42:45AM +0900, Hemant Kumar wrote:
> >>Awesome work, has this been tested in Windows too?
> >
> >Some people tried to use xmpfilter on win32 and there were some issues but
> >I believe they've been solved now (the code was modified so that it doesn't
> >require Kernel#fork/Open3::popen3 anymore, and some other problems were
> >addressed). If it doesn't work right now, I'm confident it can be fixed
> >easily, so just give it a try and we'll try to solve problems as they
> >appear.
>
> did you switch from Open3::popen3 to systemu by chance?

I just needed the stdout/stderr of a ruby interpreter, so instead of this:

def execute_popen(code)
require 'open3'
stdin, stdout, stderr = Open3::popen3(*interpreter_command)
stdin.puts code
@evals.each{|x| stdin.puts x } unless @evals.empty?
stdin.close
[stdout, stderr]
end

win32 uses this code (thanks to eao197 for reporting & fixing the problem with
open files not being removable on win32):

def execute_tmpfile(code)
stdin, stdout, stderr = (1..3).map do |i|
fname = "xmpfilter.tmpfile_#{Process.pid}-#{i}.rb"
f = File.open(fname, "w+")
at_exit { f.close unless f.closed?; File.unlink fname }
f
end
stdin.puts code
stdin.close
exe_line = <<-EOF.map{|l| l.strip}.join(";")
$stdout.reopen('#{stdout.path}', 'w')
$stderr.reopen('#{stderr.path}', 'w')
$0.replace '#{stdin.path}'
ARGV.replace(#{@options.inspect})
load #{stdin.path.inspect}
#{@evals.join(";")}
EOF
system(*(interpreter_command << "-e" << exe_line))
[stdout, stderr]
end

--
Mauricio Fernandez - http://eige... - singular Ruby