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

M

Mauricio Fernandez

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?rcodetools 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?rcodetools

License
=======
Copyright (c) 2006 rubikitch <[email protected]>
http://www.rubyist.net/~rubikitch/
Copyright (c) 2005-2006 Mauricio Fernandez <[email protected]>
http://eigenclass.org

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

Hemant Kumar

Mauricio said:
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?rcodetools 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?rcodetools
Awesome work, has this been tested in Windows too?
 
M

Mauricio Fernandez

Mauricio said:
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.
 
A

ara.t.howard

Mauricio said:
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.

did you switch from Open3::popen3 to systemu by chance?

regards.

-a
 
M

Mauricio Fernandez

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top