From: wmorgan Date: Mon, 8 Jan 2007 18:27:33 +0000 (+0000) Subject: made comparisons in "source_for" be based on uri, not string (so that trailing X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=3e59e7418a6bc75644f68d244e5f5c4434302861;p=sup made comparisons in "source_for" be based on uri, not string (so that trailing slashes, etc. are irrelevant) git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@226 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/bin/sup-import b/bin/sup-import index b429b43..705a737 100644 --- a/bin/sup-import +++ b/bin/sup-import @@ -128,6 +128,7 @@ index.load sources = ARGV.map do |uri| uri = "mbox://#{uri}" unless uri =~ %r!://! source = index.source_for uri + puts "source for #{uri} is #{source}" unless source source = case uri diff --git a/lib/sup/source.rb b/lib/sup/source.rb index 59b8b70..9571d6a 100644 --- a/lib/sup/source.rb +++ b/lib/sup/source.rb @@ -87,7 +87,7 @@ class Source true end end - def is_source_for? s; to_s == s; end + def is_source_for? uri; URI(self.uri) == URI(uri); end def each return if broken?