[ANN] dev-utils v1.0.1

G

Gavin Sinclair

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
 
B

Bill Atkins

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

require 'dev-utils/debug'

a = [1, 2, 3]
breakpoint a
 
G

George Moschovitis

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
 
C

Chad Fowler

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
 
G

George Moschovitis

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
 
C

Charles Comstock

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

George Moschovitis

George said:
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
 
G

Gavin Sinclair

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
 
G

gabriele renzi

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

Chad Fowler

George Moschovitis ha scritto:


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
 
F

Florian Gross

Bill said:
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
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,049
Latest member
Allen00Reed

Latest Threads

Top