Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 74
- Log:
Reapplied changes to Typo 4.0.0 from previous version in order to
configure it for use on the RISC OS Open site. Hopefully, the RISC
OS Open theme can be sorted out so that it works with no further
core changes.Note that this configured v4.0.0 installation has not been tested.
- Author:
- adh
- Date:
- Mon Aug 07 22:34:29 +0100 2006
- Size:
- 5402 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 = '/rails/typo' |
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 | config.load_paths += %W( |
28 | vendor/rubypants |
29 | vendor/akismet |
30 | vendor/redcloth/lib |
31 | vendor/bluecloth/lib |
32 | vendor/flickr |
33 | vendor/syntax/lib |
34 | vendor/sparklines/lib |
35 | vendor/uuidtools/lib |
36 | vendor/jabber4r/lib |
37 | vendor/rails/railties |
38 | vendor/rails/railties/lib |
39 | vendor/rails/actionpack/lib |
40 | vendor/rails/activesupport/lib |
41 | vendor/rails/activerecord/lib |
42 | vendor/rails/actionmailer/lib |
43 | vendor/rails/actionwebservice/lib |
44 | ).map {|dir| "#{RAILS_ROOT}/#{dir}"}.select { |dir| File.directory?(dir) } |
45 | |
46 | # Force all environments to use the same logger level |
47 | # (by default production uses :info, the others :debug) |
48 | config.log_level = :warn |
49 | |
50 | # Use the database for sessions instead of the file system |
51 | # (create the session table with 'rake create_sessions_table') |
52 | config.action_controller.session_store = :active_record_store |
53 | |
54 | # Enable page/fragment caching by setting a file-based store |
55 | # (remember to create the caching directory and make it readable to the application) |
56 | config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/tmp/cache" |
57 | |
58 | # Activate observers that should always be running |
59 | # config.active_record.observers = :cacher, :garbage_collector |
60 | config.active_record.observers = :content_observer, :email_notifier, :web_notifier |
61 | |
62 | # Make Active Record use UTC-base instead of local time |
63 | # config.active_record.default_timezone = :utc |
64 | |
65 | # Use Active Record's schema dumper instead of SQL when creating the test database |
66 | # (enables use of different database adapters for development and test environments) |
67 | # config.active_record.schema_format = :ruby |
68 | |
69 | # See Rails::Configuration for more options |
70 | end |
71 | |
72 | # Add new inflection rules using the following format |
73 | # (all these examples are active by default): |
74 | # Inflector.inflections do |inflect| |
75 | # inflect.plural /^(ox)$/i, '\1en' |
76 | # inflect.singular /^(ox)en/i, '\1' |
77 | # inflect.irregular 'person', 'people' |
78 | # inflect.uncountable %w( fish sheep ) |
79 | # end |
80 | |
81 | # Include your application configuration below |
82 | |
83 | # Allow multiple Rails applications by giving the session cookie a |
84 | # unique prefix. |
85 | |
86 | ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:session_key] = 'typoapp_session_id' |
87 | |
88 | # Load included libraries. |
89 | require 'redcloth' |
90 | require 'bluecloth' |
91 | require 'rubypants' |
92 | require 'flickr' |
93 | require 'uuidtools' |
94 | |
95 | require_dependency 'spam_protection' |
96 | require_dependency 'migrator' |
97 | require_dependency 'rails_patch/components' |
98 | require_dependency 'rails_patch/active_record' |
99 | require_dependency 'login_system' |
100 | require_dependency 'typo_version' |
101 | require_dependency 'metafragment' |
102 | require_dependency 'actionparamcache' |
103 | $KCODE = 'u' |
104 | require_dependency 'jcode' |
105 | require_dependency 'aggregations/audioscrobbler' |
106 | require_dependency 'aggregations/delicious' |
107 | require_dependency 'aggregations/tada' |
108 | require_dependency 'aggregations/flickr' |
109 | require_dependency 'aggregations/fortythree' |
110 | require_dependency 'aggregations/magnolia' |
111 | require_dependency 'aggregations/upcoming' |
112 | require_dependency 'xmlrpc_fix' |
113 | require_dependency 'transforms' |
114 | require_dependency 'builder' |
115 | |
116 | unless Builder::XmlMarkup.methods.include? '_attr_value' |
117 | # Builder 2.0 has many important fixes, but for now we will only backport |
118 | # this one... |
119 | class Builder::XmlMarkup |
120 | # Insert the attributes (given in the hash). |
121 | def _insert_attributes(attrs, order=[]) |
122 | return if attrs.nil? |
123 | order.each do |k| |
124 | v = attrs[k] |
125 | @target << %{ #{k}="#{_attr_value(v)}"} if v # " WART |
126 | end |
127 | attrs.each do |k, v| |
128 | @target << %{ #{k}="#{_attr_value(v)}"} unless order.member?(k) # " WART |
129 | end |
130 | end |
131 | |
132 | def _attr_value(value) |
133 | case value |
134 | when Symbol |
135 | value.to_s |
136 | else |
137 | _escape(value.to_s).gsub(%r{"}, '"') # " WART |
138 | end |
139 | end |
140 | end |
141 | end |
142 | |
143 | ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!( |
144 | :long_weekday => '%a %B %e, %Y %H:%M' |
145 | ) |
146 | |
147 | ActionMailer::Base.default_charset = 'utf-8' |
148 | |
149 | if RAILS_ENV != 'test' |
150 | begin |
151 | mail_settings = YAML.load(File.read("#{RAILS_ROOT}/config/mail.yml")) |
152 | |
153 | ActionMailer::Base.delivery_method = mail_settings['method'] |
154 | ActionMailer::Base.server_settings = mail_settings['settings'] |
155 | rescue |
156 | # Fall back to using sendmail by default |
157 | ActionMailer::Base.delivery_method = :sendmail |
158 | end |
159 | end |
160 | |
161 | FLICKR_KEY='84f652422f05b96b29b9a960e0081c50' |