lib/view.rb in inqlude-0.0.6 vs lib/view.rb in inqlude-0.0.7
- old
+ new
@@ -23,10 +23,12 @@
def initialize handler
@manifest_handler = handler
end
def create output_dir
+ puts "Creating web site in '#{output_dir}' from '#{@manifest_handler.settings.manifest_path}'"
+
assert_dir output_dir
assert_dir "#{output_dir}/public"
system "cp #{view_dir}/public/* #{output_dir}/public/"
@@ -93,10 +95,10 @@
def link url
"<a href=\"#{url}\" target=\"_blank\">#{url}</a>"
end
def link_to title, url
- if url !~ /^mailto:/ && url !~ /^http:/ && url !~ /^https:/
+ if url !~ /^mailto:/ && url !~ /^http:/ && url !~ /^https:/ && url !~ /^ftp:/
url = "#{@root}#{url}.html"
end
"<a href=\"#{url}\">#{title}</a>"
end