[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

commit2rss.rb - running on hooking up CVS NT

paul.s.barriscale

9/25/2006 6:13:00 PM

Hi all,

I'm trying to get Dave Thomas' commit2rss.rb ruby script running on windows XP using CVS NT v2.0.51d. The script is at http://pragmaticprogrammer.com/downloads/commit2rss/commit2...

I've removed unix references to etc and Etc.getpwuid parts. and my command in the CVS loginfo is as follows

# Ruby script to generate an RSS feed for commits to Underwriting module
Underwriting/* D:\development\test-workspace\scripts\commit2rss.rb %{}

I'm stumped as to why I'm getting the following error on commit. I've included the some verbose output from cvs.

-> loginfo:Parse_Info(D:/development/test-cvs-respo/Underwriting/JavaSource,D:\development\test-workspace\scripts\commit2rss.rb %{} )
-> run_popen(D:\development\test-workspace\scripts\commit2rss.rb "Underwriting/JavaSource" )
D:/development/test-workspace/scripts/commit2rss.rb:44:in `gets': Bad file descriptor (Errno::EBADF)
from D:/development/test-workspace/scripts/commit2rss.rb:44

Line 44 refers to this block of code

while line = STDIN.gets
line.chomp!
if line =~ /^[A-Z].*:\s*$/
desc << "<p /><b>" << line << "</b>"
else
desc << line
end
desc << "<br />"
end

I'd appreciate any help on this.

Thanks,
Paul


This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.
2 Answers

Paul Lutus

9/25/2006 10:06:00 PM

0

paul.s.barriscale@accenture.com wrote:

/ ...

loginfo:Parse_Info(D:/development/test-cvs-respo/Underwriting/JavaSource,D
\development\test-workspace\scripts\commit2rss.rb

Hoo-boy. I think you need to decide which path delimiter to use, and stick
to your single choice. The above line is truly ecumenical, but I don't
think Ruby is. I don't have a Windows system to find out how Ruby reacts to
these freely mixed delimiters, but this line really stands out.

--
Paul Lutus
http://www.ara...

paul.s.barriscale

9/26/2006 11:15:00 AM

0

I've removed that potential problem from the script, but to no avail. From reading through some of the news groups there seems to be some suggestion that Ruby needs to have a real console to read from STDIN. Whether this is specific to Ruby on Windows I do not know.

Does anyone have knowledge of Ruby on Windows to answer this?

Thanks,
Paul

________________________________

From: Paul Lutus [mailto:nospam@nosite.zzz]
Sent: Mon 25/09/2006 23:10
To: ruby-talk ML
Subject: Re: commit2rss.rb - running on hooking up CVS NT



paul.s.barriscale@accenture.com wrote:

/ ...

loginfo:Parse_Info(D:/development/test-cvs-respo/Underwriting/JavaSource,D
\development\test-workspace\scripts\commit2rss.rb

Hoo-boy. I think you need to decide which path delimiter to use, and stick
to your single choice. The above line is truly ecumenical, but I don't
think Ruby is. I don't have a Windows system to find out how Ruby reacts to
these freely mixed delimiters, but this line really stands out.

--
Paul Lutus
http://www.ara...





This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the email by you is prohibited.