[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

[ANN] uri-relative 0.0.1

MenTaLguY

11/5/2006 7:24:00 AM

So, okay, guys. I'm trying to get better about this release early/often
thing.

Here is what I made today:

== WHAT IS IT?

uri-relative is a small gem which embellishes URI::Generic with a few
useful methods: URI::Generic#normalize (and normalize!),
URI::Generic#resolve, and URI::Generic#relativize.

- normalize compresses those /./ and /../ bits in your paths

- resolve uses one URI as reference to convert another URI
from relative to absolute (per RFC 2396)

- relativize will do the reverse, taking a URI from absolute
to relative (per... Java-URI I guess)

Keen Java-ists may note a certain similarity to what's offered by Java's
URI class. It's not entirely accidental. But mainly I just needed to
do some of that same sort of URI manipulation in Ruby and nobody could
point me to any libraries to do it.

All pyramids look alike.

== IS IT DONE YET?

Well, I think the coding part is basically done. I just need to
implement URI::Generic#relativize and write documentation.

== WHERE DO I GET IT?

I'll have a rubyforge project set up sooner or later. Like, after I
implement URI::Generic#relativize.

In the meantime, there is a tiny embittered stump of a website here:

http://moonbase.rydia.net/software/uri...

But really I would only bother with the gem and/or tarball:

http://moonbase.rydia.net/software/uri...uri-relative-0.0.1.gem

http://moonbase.rydia.net/software/uri...uri-relative-0.0.1.tgz


5 Answers

MenTaLguY

11/5/2006 9:33:00 PM

0

Hah! Well, I feel dumb. URI::Generic#merge and URI::Generic#route_to
do precisely the same thing as my own methods. And they're the
practically the only rdoc'd methods in URI::Generic, too. Should have
stuck out like a sore thumb.

So ... that leaves URI::Generic#normalize, I think. Anyone have a use
for it?

-mental

MenTaLguY

11/5/2006 9:54:00 PM

0

Briefly, I've dropped my own resolution and relativization methods in
favor of the existing ones in URI::Generic. So, uri-relative is now
simply a library that adds a Java-esque 'normalize' method and some
aliases to Ruby's URI::Generic.

The project page (such as it is) is here:

http://moonbase.rydia.net/software/ur...

Are there any other useful things which are actually missing? Or have I
also missed some obvious way to do normalization with stock
URI::Generic?

(By the way: here's the funny part: I was actually calling
URI::Generic#merge as part of my URI::Generic#resolve, without realizing
its full functionality! I suppose that at least I can say that
implementing my own resolve and relativize methods was a useful learning
exercise...)

-mental

William Sommerwerck

11/13/2011 7:57:00 PM

0

"M forever" <ms1000@gmail.com> wrote in message
news:d7367a7f-d586-4df6-b174-8264333de4ef@w1g2000vba.googlegroups.com...

> There was an Italian TV mini series about Verdi in the early 80s,
> and I think that memory might come from that. I also remember
> it only dimly.

There was, and I think it was fairly accurate.


Angelotti

11/13/2011 8:21:00 PM

0

On 13 nov, 19:29, M forever <ms1...@gmail.com> wrote:
> On Nov 13, 12:46 pm, Angelotti <linden...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > On 9 nov, 23:05, Murolucis <bosleycrowt...@live.com> wrote:
>
> > > Amadeus was fun in parts but too silly.
>
> > > Immortal Beloved was Beethoven as Sid Vicious. An insult since he was
> > > really the Johnny Rotten of classical music.
>
> > > Taking Sides was pretty good but too didactic.
>
> > > Was Abel Gance's Beethoven a silent movie or sound movie? It might
> > > have made sense as a silent since the Beether was deaf later in life.
>
> > From the time being young I remember an Italian movie about the live
> > of Giuseppe Verdi containing a scene like:
> > Verdi in the snow in Milan buying chestnuts and in the meantime
> > getting inspiration for the choir of Hebrew Slaves from 'Nabucco'', if
> > I remember well
> > I thought it to be a great movie.
>
> There was an Italian TV mini series about Verdi in the early 80s, and
> I think that memory might come from that. I also remember it only very
> dimly.

No, I think I am a generation older, I remember a movie from the early
fifties, and it must be the one by Raffaello Matarazzo.
A link:

http://home.earthlink.net/~beachwoodprs/html...

I think I will buy it. I have most of the time doubts about buying DVD
of old favorites because of disappointments, but seeing the name of
the singers I will give it a try.

Hvdlinden

Matthew B. Tepper

11/14/2011 5:12:00 AM

0

"William Sommerwerck" <grizzledgeezer@comcast.net> appears to have caused the
following letters to be typed in news:j9p7di$5r3$1@dont-email.me:

> "M forever" <ms1000@gmail.com> wrote in message
> news:d7367a7f-d586-4df6-b174-8264333de4ef@w1g2000vba.googlegroups.com...
>
>> There was an Italian TV mini series about Verdi in the early 80s,
>> and I think that memory might come from that. I also remember
>> it only dimly.
>
> There was, and I think it was fairly accurate.

Was that the one with Ronald Pickup?

--
Matthew B. Tepper: WWW, science fiction, classical music, ducks!
Read about "Proty" here: http://home.earthlink.net/~oy/...
To write to me, do for my address what Androcles did for the lion
Opinions expressed here are not necessarily those of my employers