forked from mleung/feather
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.rb
More file actions
107 lines (88 loc) · 2.9 KB
/
init.rb
File metadata and controls
107 lines (88 loc) · 2.9 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# Make the app's "gems" directory a place where gems are loaded from
Gem.clear_paths
Gem.path.unshift(Merb.root / "gems")
# Make the app's "lib" directory a place where ruby files get "require"d from
$LOAD_PATH.unshift(Merb.root / "lib")
Merb::Config.use do |c|
### Sets up a custom session id key, if you want to piggyback sessions of other applications
### with the cookie session store. If not specified, defaults to '_session_id'.
# c[:session_id_key] = '_session_id'
c[:session_secret_key] = '95bf50e5bb36b2a455611792c271f2581e6b21db'
c[:session_store] = 'datamapper'
c[:use_mutex] = false
end
### Merb doesn't come with database support by default. You need
### an ORM plugin. Install one, and uncomment one of the following lines,
### if you need a database.
### Uncomment for DataMapper ORM
use_orm :datamapper
### Uncomment for ActiveRecord ORM
# use_orm :activerecord
### Uncomment for Sequel ORM
# use_orm :sequel
### This defines which test framework the generators will use
### rspec is turned on by default
###
### Note that you need to install the merb_rspec if you want to ue
### rspec and merb_test_unit if you want to use test_unit.
### merb_rspec is installed by default if you did gem install
### merb.
###
# use_test :test_unit
use_test :rspec, "merb_stories"
### Add your other dependencies here
# These are some examples of how you might specify dependencies.
#
gem "archive-tar-minitar"
dependencies "merb_helpers"
dependency "merb_helpers"
dependency "merb-assets"
dependency "merb-cache"
dependency "merb-action-args"
dependency "merb-mailer"
dependency 'merb_paginate'
dependency "dm-aggregates"
dependency "dm-validations"
dependency "dm-timestamps"
# OR
# OR
# dependencies "RedCloth" => "> 3.0", "ruby-aes-cext" => "= 1.0"
Merb::BootLoader.after_app_loads do
require "tzinfo"
require "net/http"
require "uri"
require "cgi"
require "erb"
require "zlib"
require "stringio"
require "archive/tar/minitar"
require File.join("lib", "padding")
require File.join("lib", "hooks")
require File.join("lib", "database")
require File.join("lib", "plugin_dependencies")
# This loads the plugins
begin
Plugin.all(:order => [:name]).each do |p|
begin
p.load
Merb.logger.info("\"#{p.name}\" loaded")
rescue Exception => e
Merb.logger.info("\"#{p.name}\" failed to load : #{e.message}")
end
end
rescue Exception => e
Merb.logger.info("Error loading plugins: #{e.message}")
end
Merb::Mailer.delivery_method = :sendmail
end
require File.join(File.join(Merb.root_path, "lib"), "cache_helper")
begin
require File.join(File.dirname(__FILE__), '..', 'lib', 'authenticated_system/authenticated_dependencies')
rescue LoadError
end
Merb::Plugins.config[:merb_cache] = {
:cache_html_directory => Merb.dir_for(:public) / "cache",
:store => "file",
:cache_directory => Merb.root_path("tmp/cache"),
:disable => "development"
}