Sha256: 08bb47244981f9d6064843ea755120b1f9f096e6ed909b0ad63583700b3ffaab

Contents?: true

Size: 1.65 KB

Versions: 1

Compression:

Stored size: 1.65 KB

Contents

#!/usr/local/bin/ruby

require 'webrick'
require 'erb'
require 'redcloth-3.0.3'
require 'ftools'
require 'diff/lcs'
require 'diff/lcs/array'
require 'fileutils'
require 'thread'
require 'yaml'

require 'soks-utils'
require 'soks-storage'
require 'soks-model'
require 'soks-view'
require 'soks-servlet'
require 'helpers/default-helpers'

Thread.abort_on_exception = true
Socket.do_not_reverse_lookup = true

# These are the default settings.  Can be overriden in the call to soks-servlet.rb#start_wiki
$SETTINGS = {
	:name => 'A Soks Wiki',
	:description => 'A Soks Wiki',
	:root_directory => 'soks-wiki',
	:check_files_every => 60, # Seconds
	:url => 'http://localhost:8000',
	:port => 8000,
	:home_page => 'Home Page',
	:dont_frame_templates => ['print','rss'],
	:force_no_cache => false, # Adds headers to restrict the cacheing of pages
	:redcloth_hard_breaks => false, # Set Redcloth to use hard breaks
	:reload_erb_each_request => false, # False faster for production, true speeds development cycle
	:server_type =>  WEBrick::SimpleServer, # Could be WEBrick::Daemon if you wish to fork
	:authenticators => [ [ %r{/(view|rss|print|find|meta|attachment)/.*}, WEBrick::HTTPAuth::NoAuthenticationRequired.new ],
								# [ %r{/upload/.*}, WEBrick::HTTPAuth::NotPermitted.new ],
								# [ %r{/(edit|save)/home page}, WEBrick::HTTPAuth::SiteWidePassword.new('password','You need to enter the site wide password to edit the home page') ],
								# [ %r{/(view|edit|save)/private.*},WEBrick::HTTPAuth::BasicAuth.new( :UserDB => htpasswd, :Realm => realm ) ], # See webrick documentation
								[ %r{.*}, WEBrick::HTTPAuth::AskForUserName.new( 'No password, just enter a name') ]
							 ]
}

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Soks-0.0.7 lib/soks.rb