Script/plugin discover breaks?


#1

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:inparse!’
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:inparse!’
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:inrequire’
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


#2

My hack for this was to change line 658 from:

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

to:

if line =~ /<a[^>]href=’"[’"]/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
removed_email_address@domain.invalid
http://pearsonedmeasurement.com


#3

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?


#4

Now that’s what I’m talkin’ about! Thanks!


#5

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 C.
http://www.bencurtis.com/
http://www.tesly.com/ – Collaborative test case management
http://www.agilewebdevelopment.com/ – Resources for the Rails community