Permalink
Browse files

Merge pull request #2 from FRickReich/master

support specifying database; multiple stylesheet support
  • Loading branch information...
2 parents 7d603bd + 181b4f1 commit 896f0f6e0e3b87552829f0d5ca5c51f795895ca9 @benatkin committed Sep 20, 2011
Showing with 5 additions and 5 deletions.
  1. +2 −2 README.md
  2. +3 −3 weaky.rb
View
@@ -4,9 +4,9 @@ A basic CouchDB/Sinatra wiki.
## Installation
-1. Install CouchDB and run it on the default port
+1. Install CouchDB
2. Install sinatra, CouchRest, and maruku
-3. Run `ruby weaky.rb`
+3. Run 'ruby weaky.rb localhost:5984/weaky'
## Features
View
@@ -6,7 +6,7 @@
require 'haml'
require 'sass'
-$weaky = CouchRest.database!('http://localhost:5984/weaky')
+$weaky = CouchRest.database!("http://#{ARGV[0].to_s.gsub("http://","")}")
class Item < CouchRest::ExtendedDocument
use_database $weaky
@@ -61,9 +61,9 @@ class Weaky < Sinatra::Base
redirect '/home'
end
- get '/stylesheet.css' do
+ get '/:name.css' do
content_type 'text/css', :charset => 'utf-8'
- sass :stylesheet
+ sass :"/#{params[:name]}"
end
get '/items/all' do

0 comments on commit 896f0f6

Please sign in to comment.