[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[ANN] dev-utils v1.0

Gavin Sinclair

10/7/2004 6:41:00 PM

Hi all,

It's with great relief that I finally release dev-utils 1.0. Never
have I put so much effort into a project with so little code. (That's
because the effort was wasted on documentation...)

It's gem-only at the moment. Within a few days, I'll release 1.0.1
complete with tarball, and see its way clear to the RPA. For now,
though, it's 4am and I'm off to bed.

BTW, it depends on newly-released extensions-0.5. I'll be in touch,
Mauricio :)

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.rub...
Project page: http://rubyforge.org/projects...
Download: http://rubyforge.org/frs/?gr...
API Documentation: http://dev-utils.rub.../api



14 Answers

Bill Atkins

10/7/2004 7:46:00 PM

0

Wow, breakpoint looks _really_ useful. I await RPA-ification.

Bill

On Fri, 8 Oct 2004 03:40:34 +0900, Gavin Sinclair
<gsinclair@soyabean.com.au> wrote:
> Hi all,
>
> It's with great relief that I finally release dev-utils 1.0. Never
> have I put so much effort into a project with so little code. (That's
> because the effort was wasted on documentation...)
>
> It's gem-only at the moment. Within a few days, I'll release 1.0.1
> complete with tarball, and see its way clear to the RPA. For now,
> though, it's 4am and I'm off to bed.
>
> BTW, it depends on newly-released extensions-0.5. I'll be in touch,
> Mauricio :)
>
> 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.rub...
> Project page: http://rubyforge.org/projects...
> Download: http://rubyforge.org/frs/?gr...
> API Documentation: http://dev-utils.rub.../api
>
>


Aredridel

10/7/2004 9:12:00 PM

0

Totally looking forward to the tarball and RPA releases. .. I still
can't get RubyGems to work.


Chad Fowler

10/7/2004 10:47:00 PM

0

On Fri, 8 Oct 2004 06:12:21 +0900, Aredridel <aredridel@gmail.com> wrote:
> Totally looking forward to the tarball and RPA releases. .. I still
> can't get RubyGems to work.
>

What issue are you having? I saw that you were joining the rubygems
developers list. Can you post your problem there? I apologize if
it's been mentioned and overlooked. It's been a hectic several weeks
leading up to RubyConf.

Chad


Mauricio Fernández

10/10/2004 11:20:00 PM

0

On Fri, Oct 08, 2004 at 03:40:34AM +0900, Gavin Sinclair wrote:
> Hi all,
>
> It's with great relief that I finally release dev-utils 1.0. Never
> have I put so much effort into a project with so little code. (That's
> because the effort was wasted on documentation...)
>
> It's gem-only at the moment. Within a few days, I'll release 1.0.1
> complete with tarball, and see its way clear to the RPA. For now,
> though, it's 4am and I'm off to bed.

I've been waiting until the weekend was over to see if you released
1.0.1 :)

I know several people were waiting for this to enter RPA so I
tried to repackage the gem. I have to thank you for following
(maybe unknowingly) most of the good practices described in
http://rpa-base.rubyforge.org/wiki/wiki.cgi?Goo... ; this made
repackaging your gem easier.

Plz find below a minor patch I had to apply to make the documentation
generator work (I have removed the RPA specific part).


batsman@tux-chan:~/src/rpa/ports$ rpa update --no-proxy
Getting port info from http://rpa-base.rubyforge.org/ports/....
100% [========================================] 88230 bytes

Ports added since the last 'rpa update'
dev-utils 1.0-1 Debugging utilities: breakpoints, debugging, and tracing.

(the following was run with an early version of the 0.3 branch after install)
batsman@tux-chan:~/src/rpa/rpa-base$ rpa show dev-utils
Port: dev-utils
Classification: Top.Library.Development
Available-Version: 1.0-1
Installed-Version: 1.0-1
RPA-Version: 0.0
Updated: Mon, 11 Oct 2004 00:43:25 +0200
Source-URL: http://rpa-base.rubyforge.org/ports/dev-utils...
Build-Requires: cstemplate, redcloth
Requires: extensions
Description:
Debugging utilities: breakpoints, debugging, and tracing.
.
dev-utils provides utilites to assist the process of developing Ruby
programs. At the moment, the target areas are debugging and unit testing.


batsman@tux-chan:~/src/rpa/ports$ rpa install dev-utils --no-proxy
Installing ports
Getting port dev-utils from http://rpa-base.rubyforge.org/ports/dev-utils....
100% [========================================] 30720 bytes
Building dev-utils (1.0-1).
Installing pre-dependencies cstemplate redcloth.
Reusing cached package /home/batsman/usr/lib/ruby/rpa0.0/packages/cstemplate_0.5.1-3_i686-pc-linux-gnu.rpa.
Package cstemplate unchanged.
Reusing cached package /home/batsman/usr/lib/ruby/rpa0.0/packages/redcloth_2.0.11-2_i686-pc-linux-gnu.rpa.
Package redcloth unchanged.
Building dependencies extensions.
Generating RI data files.
Generating RDoc HTML documentation.
Calculating MD5 digests.
Building package in dev-utils_1.0-1_i686-pc-linux-gnu.rpa.
Installing dev-utils
Reusing cached package /home/batsman/usr/lib/ruby/rpa0.0/packages/dev-utils_1.0-1_i686-pc-linux-gnu.rpa.
Installing dependencies extensions.
Starting lightweight (metadata only) transaction for dev-utils
Reusing cached package /home/batsman/usr/lib/ruby/rpa0.0/packages/extensions_0.5.0-1_i686-pc-linux-gnu.rpa.
Package extensions unchanged.
Checking for file conflicts in dev-utils.
Starting transaction for dev-utils
Package /home/batsman/usr/lib/ruby/rpa0.0/packages/dev-utils_1.0-1_i686-pc-linux-gnu.rpa unpacked.
Finished transaction for dev-utils
Starting lightweight (metadata only) transaction for dev-utils
Finished lightweight (metadata only) transaction for dev-utils
Finished lightweight (metadata only) transaction for dev-utils
Committed changes


As for the (really minor :) patch:

--- etc/doc/generate.rb (revision 974)
+++ etc/doc/generate.rb (working copy)
@@ -9,10 +9,10 @@
# The simple function +generate_document+ does this.
#

require 'rubygems'
require 'redcloth'
require 'extensions/io'
require 'celsoft.com/template'
+require 'pathname'

#
# Takes the Textile file from +path+ (relative to ~/Projects/dev-utils) and generates an HTML

--
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com



Chad Fowler

10/11/2004 12:46:00 AM

0

On Mon, 11 Oct 2004 08:19:57 +0900, Mauricio Fernández
<batsman.geo@yahoo.com> wrote:
>
> I know several people were waiting for this to enter RPA so I
> tried to repackage the gem. I have to thank you for following
> (maybe unknowingly) most of the good practices described in
> http://rpa-base.rubyforge.org/wiki/wiki.cgi?Goo... ; this made
> repackaging your gem easier.
>

So, Mauricio, this is a repackage to RPA of a gem? Any
rubygems-related issues in the process? Did the fact that there was
already some metadata present help you at all?

I'm still interested in the possibility to script rubygems -> rpa-base
conversion and would like to hear your stories.

Chad



Mauricio Fernández

10/11/2004 1:59:00 AM

0

On Mon, Oct 11, 2004 at 09:45:30AM +0900, Chad Fowler wrote:
> On Mon, 11 Oct 2004 08:19:57 +0900, Mauricio Fernández
> <batsman.geo@yahoo.com> wrote:
> >
> > I know several people were waiting for this to enter RPA so I
> > tried to repackage the gem. I have to thank you for following
> > (maybe unknowingly) most of the good practices described in
> > http://rpa-base.rubyforge.org/wiki/wiki.cgi?Goo... ; this made
> > repackaging your gem easier.
> >
>
> So, Mauricio, this is a repackage to RPA of a gem? Any
> rubygems-related issues in the process?

As I said above, the process was relatively easy because Gavin followed
many of the good practices documented in rpa-base's wiki. This doesn't
mean that the conversion was automatic (or could be automated for the
matter), though. There were dependencies on RubyGems I had to remove,
and the documentation was generated with a custom script so I had to
adapt it; I also had to discover the "build dependencies" (I found them
in the documentation later) and fix some issues...

> Did the fact that there was already some metadata present help you at all?

Honestly, not really. The only piece of metadata I reused was
'Debugging utilities: breakpoints, debugging, and tracing.'. Since that
is not an acceptable description in RPA, I had to look for a better one
elsewhere. As far as I'm concerned, the rest of the metadata (with
the exception of the author, dep, email and homepage) consists only of
implementation details of RubyGems and is hence useless to me:
s.description = s.summary
s.files = FileList['[A-Z]*', '{etc,examples,lib,test}/**/*'].to_a
s.require_path = 'lib'
s.autorequire = nil
s.has_rdoc = true
s.extra_rdoc_files = FileList['*.txt'].to_a
s.rdoc_options << '--main' << 'README.txt' << '--title' << 'dev-utils API Documentation'
s.test_files = []
do not bring me that much useful information.

Moreover, it lacks information about the "build dependencies" (required
to generate the documentation).

> I'm still interested in the possibility to script rubygems -> rpa-base
> conversion and would like to hear your stories.

The conversion of dev-utils was relatively easy, and yet impossible to
automate. I had to read and understand the Rakefile and adapt
documentation generation. Plus remove the dependency on RubyGems and
correct the associated problems ("shadow requires").
I would *really* love to see you come up with a script able to
do what I did manually, but it would have to read and understand
Rakefiles/documentation/etc so it's probably as hard a problem as you
can get.

I'd like to remind you once again that the conversion involves much
more than a simple change in the package format. In general, systems
with a package manager have some associated policies, which determine
the quality of packages in that context --- besides being just "legal"
as far as the format it concerned. In the case of RubyGems, you have
decided to keep it "policy free", which means that you just cannot target
systems with a policy automatically, at least with the current metadata[1]:
such a script would really have to be "intelligent" (say, comparable
to a FreeBSD developer :) to create policy-compliant packages/ports for
other systems.

[1] if you managed to find a way to define the whole "gem build" process
in the gemspec and hence REMOVE altogether the reliance on external
processes, plus mark all files "semantically" (e.g.: example, test,
documentation, configuration, shared data) AND standardize the build
scripts, it could become possible. Note that the latter is essentially at
least as hard as (and actually more difficult than) post-install scripts;
so far, the only working design that could solve the latter completely is
http://rubyforge.org/pipermail/rubygems-developers/2004-October/0...
as far as I know.

--
Running Debian GNU/Linux Sid (unstable)
batsman dot geo at yahoo dot com



Chad Fowler

10/11/2004 3:08:00 AM

0

On Mon, 11 Oct 2004 10:59:16 +0900, Mauricio Fernández
<batsman.geo@yahoo.com> wrote:
>
> As I said above, the process was relatively easy because Gavin followed
> many of the good practices documented in rpa-base's wiki.

So by that you mean to use obvious directory names, don't do anything
fancy with test suites, and use rdoc for documentation. Is that it?
Pretty much exactly what it says in the gems chapter of the Pickaxe,
it turns out ;)

> This doesn't
> mean that the conversion was automatic (or could be automated for the
> matter), though. There were dependencies on RubyGems I had to remove,
> and the documentation was generated with a custom script so I had to
> adapt it; I also had to discover the "build dependencies" (I found them
> in the documentation later) and fix some issues...
<snip/>
> Moreover, it lacks information about the "build dependencies" (required
> to generate the documentation).

What do you mean by "build dependencies" in this context?

> I'd like to remind you once again that the conversion involves much
> more than a simple change in the package format. In general, systems
> with a package manager have some associated policies, which determine
> the quality of packages in that context --- besides being just "legal"
> as far as the format it concerned.

Obviously. But if you could run a script and have everything setup
for an inspection/sign-off, I imagine it would make things easier. I
guess it's really not worth the effort.

By "remove rubygems dependencies" are you saying you had to remove
"require 'rubygems'" and a few "require_gem" statements or was it
something somehow more involved?

Chad



vruz

10/11/2004 3:25:00 AM

0

> > As I said above, the process was relatively easy because Gavin followed
> > many of the good practices documented in rpa-base's wiki.
>
> So by that you mean to use obvious directory names, don't do anything
> fancy with test suites, and use rdoc for documentation. Is that it?
> Pretty much exactly what it says in the gems chapter of the Pickaxe,
> it turns out ;)

Pretty much what has been documented.

http://rpa-base.rubyforge.org/wiki/wiki.cgi?Goo...

best,
vruz


Brian Palmer

10/11/2004 4:10:00 AM

0

I love it, the breakpoints feature is going to get heavy use right here,
let me tell you. As a quick note, you might put a mention in your docs
for us poor Windows Rubyists that ^Z is in fact the EOF character in
Windows/DOS, not ^D. Cheers.

- Brian Palmer


Gavin Sinclair wrote:

>Hi all,
>
>It's with great relief that I finally release dev-utils 1.0. Never
>have I put so much effort into a project with so little code. (That's
>because the effort was wasted on documentation...)
>
>It's gem-only at the moment. Within a few days, I'll release 1.0.1
>complete with tarball, and see its way clear to the RPA. For now,
>though, it's 4am and I'm off to bed.
>
>BTW, it depends on newly-released extensions-0.5. I'll be in touch,
>Mauricio :)
>
>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.rub...
>Project page: http://rubyforge.org/projects...
>Download: http://rubyforge.org/frs/?gr...
>API Documentation: http://dev-utils.rub.../api
>
>
>
>
>
>
>



Gavin Sinclair

10/11/2004 5:36:00 AM

0

On Monday, October 11, 2004, 9:19:57 AM, Mauricio wrote:

>> It's gem-only at the moment. Within a few days, I'll release 1.0.1
>> complete with tarball, and see its way clear to the RPA. For now,
>> though, it's 4am and I'm off to bed.

> I've been waiting until the weekend was over to see if you released
> 1.0.1 :)

And I was waiting for your comments (not necessarily your actions)
before doing so :) Well, that's my excuse and I'm sticking to it.

> I know several people were waiting for this to enter RPA so I
> tried to repackage the gem. I have to thank you for following
> (maybe unknowingly) most of the good practices described in
> http://rpa-base.rubyforge.org/wiki/wiki.cgi?Goo... ; this made
> repackaging your gem easier.

I try my best :)

> Plz find below a minor patch I had to apply to make the documentation
> generator work (I have removed the RPA specific part).

This makes me curious. Reading through the RPA transcript, it's not
clear that the non-RDoc documentation is actually built. There's
copious details of everything else, yet no mention of that. Yet the
dev-utils RPA, as opposed to the dev-utils gem, specifies a dependency
on cstemplate and redcloth. Are they actually used?

This is interesting as a matter of packaging policy. I'd like to
assist users in building local documentation, but in this era of
universal Internet access, people (I think) tend to just hit the
website, which has exactly the same information.

Cheers,
Gavin

BTW, I can't install dev-utils with rpa-base 0.2.2. I know earlier
versions had an issue with Cygwin, but thought that was resolved.
Besides, I don't see any error messages during the install:

$ rpa install dev-utils
Installing ports
Getting port dev-utils from http://rpa-base.rubyforge.org/ports/dev-utils....
100% [========================================] 30720 bytes
Building dev-utils (1.0-1).
Installing pre-dependencies cstemplate redcloth.
Reusing cached package /usr/local/lib/ruby/rpa0.0/packages/cstemplate_0.5.1-3_i686-pc-cygwin.rpa.
Starting lightweight (metadata only) transaction for cstemplate
Checking for file conflicts in cstemplate.
Starting transaction for cstemplate
Package /usr/local/lib/ruby/rpa0.0/packages/cstemplate_0.5.1-3_i686-pc-cygwin.rpa unpacked.
Finished transaction for cstemplate
Finished lightweight (metadata only) transaction for cstemplate
Reusing cached package /usr/local/lib/ruby/rpa0.0/packages/redcloth_2.0.11-2_i686-pc-cygwin.rpa.
Starting lightweight (metadata only) transaction for redcloth
Checking for file conflicts in redcloth.
Starting transaction for redcloth
Package /usr/local/lib/ruby/rpa0.0/packages/redcloth_2.0.11-2_i686-pc-cygwin.rpa unpacked.
Finished transaction for redcloth
Finished lightweight (metadata only) transaction for redcloth
Building dependencies extensions.
/usr/local/lib/ruby/site_ruby/1.8/rpa/helper.rb:513: warning: Insecure world writable dir /d/Softwar
e/MikTex/Main/miktex, mode 040777
Generating RI data files.
Generating RDoc HTML documentation.

$ rpa list
Installed ports:
4 stopped transaction(s):
cstemplate 0.5.1-3 metadata
cstemplate 0.5.1-3 cleanup
redcloth 2.0.11-2 metadata
redcloth 2.0.11-2 cleanup

Restoring state...
Restoring state...
Restoring state...
Restoring state...
rpa-base 0.2.2-1 A port/package manager for the Ruby Production Archive (RPA)