Changeset 570

Show
Ignore:
Timestamp:
09/08/07 06:32:07 (1 year ago)
Author:
duane.johns..@gmail.com
Message:

Some fixes and updates to Marble

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • apps/marble/trunk/config/merb.yml

    r500 r570  
    1414:environment: development 
    1515 
    16 # Comment out if you will be using a DB session store.  Memory session only 
    17 # works when you are running 1 merb at a time, and sessions will not persist 
    18 # between restarts. 
    19 :memory_session: true 
    20  
    21 # Turn on memcached sessions. 
    22 # Requires these lines in merb_init.rb (and a running memcached server): 
    23 #   require 'memcache' 
    24 #   CACHE = MemCache.new('127.0.0.1:11211', { :namespace => 'my_app' }) 
    25 # :mem_cache_session: true 
    26  
    27 # Uncomment to turn on the ActiveRecord sessions with rails parasite mode if 
    28 # active_support gem is installed. Skeleton app comes with a migration to 
    29 # create the sessions table. Or you can point merb to  the same sessions 
    30 # table that your rails app uses to share sessions between merb and rails. 
    31 #:sql_session: true 
    32 #:log_level: debug 
     16# Use memory session store for now, sequel store when it becomes available 
     17:session_store: memory 
    3318 
    3419# Uncomment to use the merb upload progress 
  • apps/marble/trunk/config/merb_init.rb

    r500 r570  
    1 puts "merb init called" 
    2  
    3 # $: << File.join(MERB_ROOT, "lib", "sequel", "lib") 
    4  
    5 Dir[MERB_ROOT+"/lib/*/lib/*.rb"].each               { |m| require m } 
    6 Dir[MERB_ROOT+"/lib/*/bin/*.rb"].each               { |m| require m } 
    7  
    8 require 'sequel/mysql' 
    9  
    10 # Need to connect to database before loading Sequel::Model classes 
    11 puts "Connecting to database..." 
    12 Sequel.mysql('marble', :host => 'localhost', :user => 'root', :logger => MERB_LOGGER) 
    13  
    14 require MERB_ROOT+"/app/controllers/application.rb" 
    15 Dir[MERB_ROOT+"/app/models/**/*.rb"].each           { |m| require m } 
    16 Dir[MERB_ROOT+"/app/controllers/**/*.rb"].each      { |m| require m } 
    17 Dir[MERB_ROOT+"/app/helpers/*.rb"].each             { |m| require m } 
    18 Dir[MERB_ROOT+"/app/mailers/*.rb"].each             { |m| require m } 
    19  
    20 Merb::Gems.load_required 
    21  
    22 # Get Environment File 
    23 require "#{MERB_ROOT}/config/environments/#{MERB_ENV}" 
    24  
    25 #  
    261# Add your own ruby code here for app specific stuff. This file gets loaded 
    272# after the framework is loaded. 
     3puts "Started merb_init.rb ..." 
     4 
     5# Your app's dependencies, including your database layer (if any) are defined 
     6# in config/dependencies.rb 
     7require File.join(MERB_ROOT, 'config', 'dependencies') 
     8 
     9# Here's where your controllers, helpers, and models, etc. get loaded.  If you 
     10# need to change the order of things, just move the call to 'load_application' 
     11# around this file. 
     12puts "Loading Application..." 
     13Merb::Server.load_application 
     14 
     15# Load environment-specific configuration 
     16require File.join(MERB_ROOT, 'config', 'environments', MERB_ENV)