Forum: Ruby on Rails script/plugin discover breaks?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
15f1ab8ec6a96331cee5137fd7657e1d?d=identicon&s=25 Sean H. (seanhussey)
on 2006-06-13 21:31
(Received via mailing list)
Hi everyone,

I was trying to discover some new plugins, but the script breaks at a
certain point:

$ ./script/plugin discover
Add http://delynnberry.com/svn/code/rails/plugins/? [Y/n]
Add http://svn.recentrambles.com/plugins/? [Y/n]
Add http://svn.hasmanythrough.com/public/plugins/? [Y/n]
Add http://www.svn.recentrambles.com/plugins/? [Y/n]
Add http://sean.treadway.info/svn/plugins/? [Y/n]
Add http://thar.be/svn/projects/plugins/? [Y/n]
Add http://svn.eastmedia.com/svn/bantay/plugins/? [Y/n]
Add http://svn.writertopia.com/svn/plugins/? [Y/n]
Add http://opensvn.csie.org/ezra/rails/plugins/? [Y/n]
Add http://svn.openprofile.net/plugins/? [Y/n]
Add http://terralien.com/svn/projects/plugins/? [Y/n]
(eval):3:in `each': undefined method `[]' for nil:NilClass
(NoMethodError)
        from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/plugin.rb:658:in
`scrape'
        from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/plugin.rb:632:in
`parse!'
        from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/plugin.rb:631:in
`parse!'
        from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/plugin.rb:447:in
`parse!'
        from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/plugin.rb:463:in
`parse!'
        from
/usr/local/lib/ruby/gems/1.8/gems/rails-1.1.2/lib/commands/plugin.rb:871
        from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in
`require'
        from
/usr/local/lib/ruby/gems/1.8/gems/activesupport-1.3.1/lib/active_support/dependencies.rb:147:in
`require'
        from ./script/plugin:3
$

Any ideas?  It dies at the same place every time.  New projects and old.

Thanks!

Sean
John-Mason P. Shackelford (Guest)
on 2006-06-16 20:22
(Received via mailing list)
My hack for this was to change line 658 from:

if line =~ /<a[^>]*href=['"]([^'"]*)['"]/ or line =~
/(svn:\/\/[^<|\n]*)/

to:

if line =~ /<a[^>]*href=['"]((http|ftp)[^'"]*)['"]/i or line =~
/(svn:\/\/[^<|\n]*)/


--
John-Mason Shackelford

Software Developer
Pearson Educational Measurement

2510 North Dodge St.
Iowa City, IA 52245
ph. 319-354-9200x6214
john-mason.shackelford@pearson.com
http://pearsonedmeasurement.com
15f1ab8ec6a96331cee5137fd7657e1d?d=identicon&s=25 Sean H. (seanhussey)
on 2006-06-16 21:31
(Received via mailing list)
Hmm.  I haven't looked at the code, but is it safe to assume that the
script just scrapes the plugin wiki page right now?  So if a URL is of
the wrong format, then, kablooie?
Benjamin Curtis (Guest)
on 2006-06-16 22:26
(Received via mailing list)
By default it does scrape the wiki page.  You can also provide a
command-line argument so it will scrape the plugin directory:

script/plugin discover http://www.agilewebdevelopment.com/plugins/scrape


--
Benjamin Curtis
http://www.bencurtis.com/
http://www.tesly.com/ -- Collaborative test case management
http://www.agilewebdevelopment.com/ -- Resources for the Rails community
15f1ab8ec6a96331cee5137fd7657e1d?d=identicon&s=25 Sean H. (seanhussey)
on 2006-06-19 16:31
(Received via mailing list)
Now that's what I'm talkin' about!  Thanks!
This topic is locked and can not be replied to.