[ANN] dev-utils v1.0.1

Discussion in 'Ruby' started by Gavin Sinclair, Oct 12, 2004.

  1. Hi folks,

    This is a very minor update on dev-utils v1.0, released last week.
    There are a couple of documentation updates, but the only important
    difference is a tarball for installation.

    http://rubyforge.org/frs/download.php/1678/dev-utils-1.0.1.tgz

    Cheers,
    Gavin

    ================

    About dev-utils:

    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.

    Home page: http://dev-utils.rubyforge.org
    Project page: http://rubyforge.org/projects/dev-utils
    Download: http://rubyforge.org/frs/?group_id=270
    API Documentation: http://dev-utils.rubyforge.org/api
    Gavin Sinclair, Oct 12, 2004
    #1
    1. Advertising

  2. Gavin Sinclair

    Bill Atkins Guest

    Is it possible to have breakpoint open the IRB session within a
    particular object?

    require 'dev-utils/debug'

    a = [1, 2, 3]
    breakpoint a
    >>self.class

    Array

    Bill

    On Wed, 13 Oct 2004 00:09:14 +0900, Gavin Sinclair
    <> wrote:
    > Hi folks,
    >
    > This is a very minor update on dev-utils v1.0, released last week.
    > There are a couple of documentation updates, but the only important
    > difference is a tarball for installation.
    >
    > http://rubyforge.org/frs/download.php/1678/dev-utils-1.0.1.tgz
    >
    > Cheers,
    > Gavin
    >
    > ================
    >
    > About dev-utils:
    >
    > 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.
    >
    > Home page: http://dev-utils.rubyforge.org
    > Project page: http://rubyforge.org/projects/dev-utils
    > Download: http://rubyforge.org/frs/?group_id=270
    > API Documentation: http://dev-utils.rubyforge.org/api
    >
    >
    Bill Atkins, Oct 12, 2004
    #2
    1. Advertising

  3. I tried to use the gem and got the following error,
    any idea?

    [root@sith]# gem install dev-utils
    Attempting local installation of 'dev-utils'
    Local gem file not found: dev-utils.gem
    Attempting remote installation of 'dev-utils'
    Install required dependency extensions? [Yn] y
    ERROR: While executing gem ... (Gem::FormatException)
    Error reading files from gem

    regards,
    George Moschovitis

    --
    www.navel.gr
    Navel does not accept liability for any errors, viruses or omissions in
    the contents of this message.
    George Moschovitis, Oct 12, 2004
    #3
  4. Gavin Sinclair

    Chad Fowler Guest

    On Wed, 13 Oct 2004 02:24:37 +0900, George Moschovitis <> wrote:
    > I tried to use the gem and got the following error,
    > any idea?
    >
    > [root@sith]# gem install dev-utils
    > Attempting local installation of 'dev-utils'
    > Local gem file not found: dev-utils.gem
    > Attempting remote installation of 'dev-utils'
    > Install required dependency extensions? [Yn] y
    > ERROR: While executing gem ... (Gem::FormatException)
    > Error reading files from gem
    >


    Hi George. It looks like you're runnning Rubygems < 0.8.0. Is that
    right? If so, you need to upgrade to 0.8.1 to use newly released
    gems:

    $ gem install rubygems-update
    $ update_rubygems

    Thanks,
    Chad
    Chad Fowler, Oct 12, 2004
    #4

  5. > Hi George. It looks like you're runnning Rubygems < 0.8.0. Is that
    > right?


    You are of course right :) Thank you for your help and the nice lib!

    regards,
    George


    --
    www.navel.gr
    Navel does not accept liability for any errors, viruses or omissions in
    the contents of this message.
    George Moschovitis, Oct 12, 2004
    #5
  6. On Wednesday, October 13, 2004, 2:41:04 AM, Bill wrote:

    > Is it possible to have breakpoint open the IRB session within a
    > particular object?


    > require 'dev-utils/debug'


    > a = [1, 2, 3]
    > breakpoint a
    >>>self.class

    > Array


    Not at the moment, but it's very easy to implement. Is that something
    you want?

    Gavin
    Gavin Sinclair, Oct 13, 2004
    #6
  7. Gavin Sinclair

    Bill Atkins Guest

    I think so. :)

    Bill

    On Wed, 13 Oct 2004 11:40:05 +0900, Gavin Sinclair
    <> wrote:
    > Not at the moment, but it's very easy to implement. Is that something
    > you want?
    Bill Atkins, Oct 13, 2004
    #7
  8. >
    > * 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.
    >


    I don't know if this was mentioned before, but even though there is no
    need for default configuration, it would be nice if there was a way to
    change the debug log if necessary. For instance if your running two
    different ruby scripts in the same directory that both use debug.log is
    there a way to specify a different log name for each one? No
    configuration necessary by default is great but there are cases it
    becomes necessary.
    Charles Comstock
    Charles Comstock, Oct 13, 2004
    #8
  9. George Moschovitis wrote:
    >
    >> Hi George. It looks like you're runnning Rubygems < 0.8.0. Is that
    >> right?

    >
    >
    > You are of course right :) Thank you for your help and the nice lib!
    >
    > regards,
    > George
    >
    >


    Btw It would be nice if the error was more helpful, ie something like:

    This gem was packaged by another version

    or something...

    -g.

    --
    www.navel.gr | tel: +30 2106898050 | fax: +30 2106898437

    Navel does not accept liability for any errors, viruses or omissions in
    the contents of this message. The full corporate policy is available on
    our site.

    have fun: www.joy.gr
    George Moschovitis, Oct 13, 2004
    #9
  10. On Wednesday, October 13, 2004, 3:49:35 PM, Charles wrote:

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


    > I don't know if this was mentioned before, but even though there is no
    > need for default configuration, it would be nice if there was a way to
    > change the debug log if necessary. For instance if your running two
    > different ruby scripts in the same directory that both use debug.log is
    > there a way to specify a different log name for each one? No
    > configuration necessary by default is great but there are cases it
    > becomes necessary.


    It's planned. The fact that someone actually wants it (for personal
    use, I couldn't care less) will hurry it up :)

    Gavin
    Gavin Sinclair, Oct 13, 2004
    #10
  11. George Moschovitis ha scritto:

    >
    > Btw It would be nice if the error was more helpful, ie something like:
    >
    > This gem was packaged by another version
    >
    > or something...
    >


    I think that dtermining a version mismatch from this error would be
    quite hard...
    But it could be useful if when getting remote gems the rubygems
    application checked that it version was the latest one.
    gabriele renzi, Oct 13, 2004
    #11
  12. Gavin Sinclair

    Chad Fowler Guest

    On Wed, 13 Oct 2004 16:54:34 +0900, gabriele renzi
    <> wrote:
    > George Moschovitis ha scritto:
    >
    > >
    > > Btw It would be nice if the error was more helpful, ie something like:
    > >
    > > This gem was packaged by another version
    > >
    > > or something...
    > >

    >
    > I think that dtermining a version mismatch from this error would be
    > quite hard...
    > But it could be useful if when getting remote gems the rubygems
    > application checked that it version was the latest one.
    >


    In future RubyGems versions, we can do this. The problem is that
    0.7.0 never imagined that 0.8.0 would come along and change its
    format. So as far as 0.7.0 knew, the new gems were corrupt. We can
    change this for later releases, but we can't fix 0.7.0 without having
    people upgrade.

    In short, I agree ;)

    Chad
    Chad Fowler, Oct 13, 2004
    #12
  13. Bill Atkins wrote:

    > I think so. :)


    Would you be okay with doing breakpoint(nil, obj.send:)binding))?

    I don't think it is possible to get access to outer variables when using
    a changed object, however.

    Regards,
    Florian Gross
    Florian Gross, Oct 13, 2004
    #13
    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. arm developer
    Replies:
    0
    Views:
    356
    arm developer
    Jun 3, 2004
  2. Daniel Berger

    [ANN] Win32 Utils Installer 0.0.1

    Daniel Berger, May 3, 2004, in forum: Ruby
    Replies:
    0
    Views:
    117
    Daniel Berger
    May 3, 2004
  3. Gavin Sinclair

    [ANN] dev-utils v1.0

    Gavin Sinclair, Oct 7, 2004, in forum: Ruby
    Replies:
    14
    Views:
    230
    Mauricio Fernández
    Oct 11, 2004
  4. Eirikur Hallgrimsson
    Replies:
    3
    Views:
    157
    Gavin Sinclair
    Oct 10, 2004
  5. Michael Neumann

    dev-utils breakpoint

    Michael Neumann, Oct 26, 2004, in forum: Ruby
    Replies:
    6
    Views:
    103
    Michael Neumann
    Oct 27, 2004
Loading...

Share This Page