commit 3e59e7418a6bc75644f68d244e5f5c4434302861
parent 76d090cf4af007a8047b932374ee264b6e978951
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Mon, 8 Jan 2007 18:27:33 +0000
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
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git 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
@@ -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?