pjb3 (owner)

Revisions

gist: 140602 Download_button fork
public
Public Clone URL: git://gist.github.com/140602.git
Embed All Files: show embed
default_value_for_initial_url_path.diff #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
From 0f7a7fdef7ab63dc62b950ff7487d257a326cf8c Mon Sep 17 00:00:00 2001
From: Paul Barry <mail@paulbarry.com>
Date: Sat, 4 Jul 2009 10:35:59 -0400
Subject: [PATCH] Default path of '/' will be used if none is supplied
 
---
 lib/anemone/core.rb | 1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
 
diff --git a/lib/anemone/core.rb b/lib/anemone/core.rb
index e996078..68456e8 100644
--- a/lib/anemone/core.rb
+++ b/lib/anemone/core.rb
@@ -14,6 +14,7 @@ module Anemone
     def initialize(url, &block)
       url = URI(url) if url.is_a?(String)
       @url = url
+ @url.path = "/" if @url.path.empty?
       @tentacles = []
       @pages = PageHash.new
       @on_every_page_blocks = []
--
1.5.4