[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: [ANN] session-2.1.8

Peña, Botp

10/6/2004 3:00:00 AM

Ara.T.Howard [mailto:Ara.T.Howard@noaa.gov] wrote:

> URLS: |
>
> http://raa.ruby-lang.org/projec...
> http://www.codeforpeople.com/lib/rub...
>

looks great. do you have an rpa for this?

>
>
> -a

kind regards -botp


6 Answers

Ara.T.Howard

10/6/2004 4:11:00 AM

0

Mauricio Fernández

10/6/2004 8:18:00 AM

0

On Wed, Oct 06, 2004 at 11:59:52AM +0900, "Peña, Botp" wrote:
> Ara.T.Howard [mailto:Ara.T.Howard@noaa.gov] wrote:
>
> > URLS: |
> >
> > http://raa.ruby-lang.org/projec...
> > http://www.codeforpeople.com/lib/rub...
> >
>
> looks great. do you have an rpa for this?

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

Ports added since the last 'rpa update'
session 2.1.8-1 Library to drive external progams via pipes from Ruby.

batsman@tux-chan:~$ rpa install session
Installing ports
Getting port session from http://rpa-base.rubyforge.org/ports/session_2....
100% [========================================] 11776 bytes
Building session (2.1.8-1).
Generating RI data files.
Generating RDoc HTML documentation.
Calculating MD5 digests.
Building package in session_2.1.8-1_i686-pc-linux-gnu.rpa.
Installing session
Reusing cached package /home/batsman/usr/lib/ruby/rpa0.0/packages/session_2.1.8-1_i686-pc-linux-gnu.rpa.
Starting lightweight (metadata only) transaction for session
Checking for file conflicts in session.
Starting transaction for session
Package /home/batsman/usr/lib/ruby/rpa0.0/packages/session_2.1.8-1_i686-pc-linux-gnu.rpa unpacked.
Finished transaction for session
Starting lightweight (metadata only) transaction for session
Finished lightweight (metadata only) transaction for session
Finished lightweight (metadata only) transaction for session
Committed changes
batsman@tux-chan:~$ rpa info session
Matching installed ports:
session 2.1.8-1 Library to drive external progams via pipes from Ruby.
batsman@tux-chan:~$ rpa info session -x
Matching installed ports:
name: session
version: 2.1.8-1
classification: Top.Library
requires:
description: Library to drive external progams via pipes from Ruby.

Session::* offers a set of class for driving external progams via pipes. It
offers a significant abstraction over Open3::popen since stdout/stderr can
be processed individually for each command. Additionally the exit_status of
each command is made available.

Sessions are Thread safe (in the sense that they do not block on io
operations) allowing command spawn from guis to update widgets with output
while running in the background.


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



Mauricio Fernández

10/6/2004 8:41:00 AM

0

On Wed, Oct 06, 2004 at 01:24:50PM +0900, Ara.T.Howard@noaa.gov wrote:
> This message is in MIME format. The first part should be readable text,
> while the remaining parts are likely unreadable without MIME-aware tools.

> On Wed, 6 Oct 2004, [iso-8859-1] "Peña, Botp" wrote:
>
> >Ara.T.Howard [mailto:Ara.T.Howard@noaa.gov] wrote:
> >
> >>URLS: |
> >>
> >> http://raa.ruby-lang.org/projec...
> >> http://www.codeforpeople.com/lib/rub...
> >>
> >
> >looks great. do you have an rpa for this?
>
> long answer:
>
> i have, on my TODO list, reading up on that and learning how to use it.

There's only little documentation about how to package using rpa-base.
There are two reasons for that:
* I am willing to do most (all) of the packaging myself (*)
* rpa-base is subject to possible changes that could break
backwards-compatibility as far as the packaging work is concerned.
Since we control both the installers and the corresponding packages,
we can modify them at once to ensure everything just works, but I would
hate to force those who packaged their sw. with rpa-base to update
their packages just because I introduced some incompatible change.

In other words, I was trying to protect early adopters from additional
work. Maybe that was excessive, so what about the following statement:

"I will maintain the rpafied install.rb files that are sent to me."

(*) of course, I'd happily accept help for that, but whoever is offering
it would become an RPA developer and would have to accept that he might
occasionally have more work due to changes in rpa-base (in the past
I've only had to update a package due to a change in rpa-base *once*,
but I like to think that I'm free to make rpa-base better w/o causing any
'external pain' :)

> i'm fine reading up on it myself but if you have any hints ;-)
> short answer:

That said, you can find some information at
http://rubyarchive.org/wiki/wiki.cgi?Developer_Documentation/Introduction_To_Packaging_Usin...

For your reference, here's the rpafied install.rb for session:

require 'rpa/install'

class Install_session < RPA::Install::FullInstaller
name "session"
version "2.1.8-1"
classification Library
build do
installdocs %w[HISTORY README TODO VERSION]
installexamples "samples"
end
install do
skip_default RunUnitTests
end
description <<EOF
Library to drive external progams via pipes from Ruby.

Session::* offers a set of class for driving external progams via pipes. It
offers a significant abstraction over Open3::popen since stdout/stderr can
be processed individually for each command. Additionally the exit_status of
each command is made available.

Sessions are Thread safe (in the sense that they do not block on io
operations) allowing command spawn from guis to update widgets with output
while running in the background.
EOF
end

As you can see, it's mostly declarative and fairly easy to understand.
It's longer than the corresponding gemspec due to the description:

require 'rubygems'
spec = Gem::Specification.new do |s|
s.name = 'session'
s.version = File.read("VERSION").strip
s.platform = Gem::Platform::RUBY
s.summary = "drive Sh, Bash, IDL easily from scripts"
s.files = Dir['lib/*']
s.require_path = 'lib'
s.autorequire = "session"
s.has_rdoc = true
s.test_suite_file = "test/session.rb"
s.author = "Ara T. Howard"
s.email = "ara.t.howard@noaa.gov"
s.homepage = "http://raa.ruby-lang.org/project/ses...
end

if $0==__FILE__
Gem::Builder.new(spec).build
end



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



Chad Fowler

10/6/2004 11:16:00 AM

0

On Wed, 6 Oct 2004 17:41:12 +0900, Mauricio Fernández
<batsman.geo@yahoo.com> wrote:
> As you can see, it's mostly declarative and fairly easy to understand.
> It's longer than the corresponding gemspec due to the description:
>

The gemspec would also be longer if you added a description to it ;)

Chad



Ara.T.Howard

10/6/2004 1:30:00 PM

0

Ara.T.Howard

10/6/2004 2:03:00 PM

0