Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 385
- Log:
Remove PATH_PREFIX stuff, since Apache+Passenger doesn't need it.
- Author:
- rool
- Date:
- Mon Mar 21 14:15:29 +0000 2011
- Size:
- 5373 Bytes
1 | # Be sure to restart your webserver when you modify this file. |
2 | |
3 | # Rails Gem Version |
4 | RAILS_GEM_VERSION = '1.2.6' unless defined? RAILS_GEM_VERSION |
5 | |
6 | # Uncomment below to force Rails into production mode |
7 | # (Use only when you can't set environment variables through your web/app server) |
8 | # ENV['RAILS_ENV'] = 'production' |
9 | |
10 | # Bootstrap the Rails environment, frameworks, and default configuration |
11 | require File.join(File.dirname(__FILE__), 'boot') |
12 | |
13 | # Location of application relative to document root in terms of |
14 | # URLs (i.e. according to the web server configuration, not the |
15 | # filesystem location). |
16 | |
17 | PATH_PREFIX = '/news' # Needed by dodgy code in "vendor/plugins/typo_textfilter_lightbox/lib/typo_textfilter_lightbox.rb" |
18 | |
19 | Rails::Initializer.run do |config| |
20 | # Skip frameworks you're not going to use |
21 | # config.frameworks -= [ :action_web_service, :action_mailer ] |
22 | |
23 | # Add additional load paths for your own custom dirs |
24 | # config.load_paths += %W( #{RAILS_ROOT}/app/services ) |
25 | |
26 | # I need the localization plugin to load first |
27 | # Otherwise, I can't localize plugins <= localization |
28 | config.plugins = [ 'localization' ] |
29 | Dir.entries("#{RAILS_ROOT}/vendor/plugins/").each { |dir| |
30 | config.plugins.push("#{dir}") if File.directory?("#{RAILS_ROOT}/vendor/plugins/#{dir}/lib") |
31 | } |
32 | |
33 | config.load_paths += %W( |
34 | vendor/rubypants |
35 | vendor/akismet |
36 | vendor/redcloth/lib |
37 | vendor/bluecloth/lib |
38 | vendor/flickr |
39 | vendor/syntax/lib |
40 | vendor/sparklines/lib |
41 | vendor/uuidtools/lib |
42 | vendor/jabber4r/lib |
43 | vendor/mocha/lib |
44 | vendor/memcache-client/lib |
45 | vendor/cached_model/lib |
46 | ).map {|dir| "#{RAILS_ROOT}/#{dir}"}.select { |dir| File.directory?(dir) } |
47 | |
48 | # Force all environments to use the same logger level |
49 | # (by default production uses :info, the others :debug) |
50 | config.log_level = :warn |
51 | |
52 | # Use the database for sessions instead of the file system |
53 | # (create the session table with 'rake create_sessions_table') |
54 | config.action_controller.session_store = :active_record_store |
55 | |
56 | # Enable page/fragment caching by setting a file-based store |
57 | # (remember to create the caching directory and make it readable to the application) |
58 | config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache" |
59 | |
60 | # Activate observers that should always be running |
61 | # config.active_record.observers = :cacher, :garbage_collector |
62 | config.active_record.observers = :email_notifier, :web_notifier |
63 | |
64 | config.active_record.allow_concurrency = false |
65 | |
66 | # Make Active Record use UTC-base instead of local time |
67 | # config.active_record.default_timezone = :utc |
68 | |
69 | # Use Active Record's schema dumper instead of SQL when creating the test database |
70 | # (enables use of different database adapters for development and test environments) |
71 | # config.active_record.schema_format = :ruby |
72 | |
73 | # See Rails::Configuration for more options |
74 | end |
75 | |
76 | # Add new inflection rules using the following format |
77 | # (all these examples are active by default): |
78 | # Inflector.inflections do |inflect| |
79 | # inflect.plural /^(ox)$/i, '\1en' |
80 | # inflect.singular /^(ox)en/i, '\1' |
81 | # inflect.irregular 'person', 'people' |
82 | # inflect.uncountable %w( fish sheep ) |
83 | # end |
84 | |
85 | Inflector.inflections {|i| i.uncountable %w(feedback)} |
86 | |
87 | # Include your application configuration below |
88 | |
89 | # Allow multiple Rails applications by giving the session cookie a |
90 | # unique prefix. |
91 | |
92 | ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] = 'typoapp_session_id' |
93 | |
94 | # Load included libraries. |
95 | require 'redcloth' |
96 | require 'bluecloth' |
97 | require 'rubypants' |
98 | require 'flickr' |
99 | require 'uuidtools' |
100 | |
101 | require 'migrator' |
102 | require 'rails_patch/active_record' |
103 | require 'login_system' |
104 | require 'typo_version' |
105 | require 'metafragment' |
106 | require 'actionparamcache' |
107 | $KCODE = 'u' |
108 | require 'jcode' |
109 | require 'xmlrpc_fix' |
110 | require 'transforms' |
111 | require 'builder' |
112 | |
113 | require 'typo_deprecated' |
114 | |
115 | #MemoryProfiler.start(:delay => 10, :string_debug => false) |
116 | |
117 | unless Builder::XmlMarkup.methods.include? '_attr_value' |
118 | # Builder 2.0 has many important fixes, but for now we will only backport |
119 | # this one... |
120 | class Builder::XmlMarkup |
121 | # Insert the attributes (given in the hash). |
122 | def _insert_attributes(attrs, order=[]) |
123 | return if attrs.nil? |
124 | order.each do |k| |
125 | v = attrs[k] |
126 | @target << %{ #{k}="#{_attr_value(v)}"} if v # " WART |
127 | end |
128 | attrs.each do |k, v| |
129 | @target << %{ #{k}="#{_attr_value(v)}"} unless order.member?(k) # " WART |
130 | end |
131 | end |
132 | |
133 | def _attr_value(value) |
134 | case value |
135 | when Symbol |
136 | value.to_s |
137 | else |
138 | _escape(value.to_s).gsub(%r{"}, '"') # " WART |
139 | end |
140 | end |
141 | end |
142 | end |
143 | |
144 | ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!( |
145 | :long_weekday => '%a %B %e, %Y %H:%M' |
146 | ) |
147 | |
148 | ActionMailer::Base.default_charset = 'utf-8' |
149 | |
150 | if RAILS_ENV != 'test' |
151 | begin |
152 | mail_settings = YAML.load(File.read("#{RAILS_ROOT}/config/mail.yml")) |
153 | |
154 | ActionMailer::Base.delivery_method = mail_settings['method'] |
155 | ActionMailer::Base.server_settings = mail_settings['settings'] |
156 | rescue |
157 | # Fall back to using sendmail by default |
158 | ActionMailer::Base.delivery_method = :sendmail |
159 | end |
160 | end |
161 | |
162 | FLICKR_KEY='84f652422f05b96b29b9a960e0081c50' |
163 | |
164 | #require 'memcache_util' |
165 | require 'cached_model' |
166 | CachedModel.use_local_cache = true |
167 | CachedModel.use_memcache = false |
168 | |
169 | # Uncomment this to choose your blog's language |
170 | #Localization.lang = 'fr_FR' |