Methods
Attributes
[RW] | quiet |
Class Public methods
new(urls_to_fetch, level = 1, cwd = ".")
Link
Instance Public methods
download(link)
Link
fetch(links = @urls_to_fetch)
Link
fetch_dir(url)
Link
links(base_url, contents)
Link
# File railties/lib/rails/commands/plugin.rb, line 506 def links(base_url, contents) links = [] contents.scan(/href\s*=\s*\"*[^\">]*/) do |link| link = link.sub(/href="/, "") next if link =~ /svnindex.xsl$/ next if link =~ /^(\w*:|)\/\// || link =~ /^\./ links << File.join(base_url, link) end links end
ls()
Link
# File railties/lib/rails/commands/plugin.rb, line 485 def ls @urls_to_fetch.collect do |url| if url =~ /^svn(\+ssh)?:\/\/.*/ %xsvn ls #{url}`.split("\n").map {|entry| "/#{entry}"} rescue nil else open(url) do |stream| links("", stream.read) end rescue nil end end.flatten end
pop_d()
Link