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

Discussion in 'Ruby' started by Mauricio Fernandez, Dec 29, 2006.

  1. 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 <>
    http://www.rubyist.net/~rubikitch/
    Copyright (c) 2005-2006 Mauricio Fernandez <>
    http://eigenclass.org

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

    --
    Mauricio Fernandez (on behalf of the "rcodetools devel team")
     
    Mauricio Fernandez, Dec 29, 2006
    #1
    1. Advertising

  2. Mauricio Fernandez

    Hemant Kumar Guest

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

    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?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?
     
    Hemant Kumar, Dec 29, 2006
    #2
    1. Advertising

  3. 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://eigenclass.org - singular Ruby
     
    Mauricio Fernandez, Dec 29, 2006
    #3
  4. Mauricio Fernandez

    Guest

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

    On Sat, 30 Dec 2006, Mauricio Fernandez wrote:

    > 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.


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

    regards.

    -a
    --
    if you find yourself slandering anybody, first imagine that your mouth is
    filled with excrement. it will break you of the habit quickly enough. - the
    dalai lama
     
    , Dec 29, 2006
    #4
  5. On Sat, Dec 30, 2006 at 05:26:02AM +0900, 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://eigenclass.org - singular Ruby
     
    Mauricio Fernandez, Dec 30, 2006
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mauricio Fernandez
    Replies:
    1
    Views:
    165
    Peña, Botp
    Oct 16, 2006
  2. Mauricio Fernandez
    Replies:
    2
    Views:
    106
    Benjamin Ritcey
    Jan 14, 2007
  3. Mauricio Fernandez
    Replies:
    4
    Views:
    162
    Mauricio Fernandez
    Feb 8, 2007
  4. Mauricio Fernandez
    Replies:
    0
    Views:
    133
    Mauricio Fernandez
    Jun 22, 2007
  5. Replies:
    5
    Views:
    909
Loading...

Share This Page