Merge branch 'master' of git://github.com/penguincoder/binaryattraction

master
andrew 2008-11-23 02:19:17 -06:00
commit c58e109105
1 changed files with 12 additions and 16 deletions

View File

@ -2,6 +2,7 @@ Gem.clear_paths
Gem.path.unshift(Merb.root / "gems") Gem.path.unshift(Merb.root / "gems")
$LOAD_PATH.unshift(Merb.root / "lib") $LOAD_PATH.unshift(Merb.root / "lib")
require 'yaml'
dependencies 'haml', 'merb_helpers', 'merb_has_flash', 'merb-mailer' dependencies 'haml', 'merb_helpers', 'merb_has_flash', 'merb-mailer'
require 'digest/sha1' require 'digest/sha1'
require 'sass' require 'sass'
@ -12,13 +13,19 @@ require 'memcache'
require 'memcache_util' require 'memcache_util'
require 'gchart' require 'gchart'
use_orm :activerecord
use_test :rspec
use_template_engine :haml
Merb::Config.use do |c|
c[:session_secret_key] = 'ccf75249b0efbdb3edff96d0a1b16b19cf91f31e'
c[:session_store] = :activerecord
c[:sass] ||= {}
c[:sass][:style] = :compact
end
Merb::BootLoader.after_app_loads do Merb::BootLoader.after_app_loads do
config_path = File.join(Merb.root, 'config', 'memcache.yml') config_path = File.join(Merb.root, 'config', 'memcache.yml')
if File.file?(config_path) and File.readable?(config_path) memcache_connection_str = YAML::load_file(config_path) rescue 'localhost:11211'
memcache_connection_str = YAML.load(File.read(config_path))
else
memcache_connection_str = 'localhost:11211'
end
CACHE = MemCache.new memcache_connection_str CACHE = MemCache.new memcache_connection_str
Merb::Mailer.config = { :sendmail_path => '/usr/sbin/sendmail' } Merb::Mailer.config = { :sendmail_path => '/usr/sbin/sendmail' }
@ -33,14 +40,3 @@ Merb::BootLoader.after_app_loads do
raise "ReCaptcha configuration file not found!" raise "ReCaptcha configuration file not found!"
end end
end end
use_orm :activerecord
use_test :rspec
use_template_engine :haml
Merb::Config.use do |c|
c[:session_secret_key] = 'ccf75249b0efbdb3edff96d0a1b16b19cf91f31e'
c[:session_store] = :activerecord
c[:sass] ||= {}
c[:sass][:style] = :compact
end