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