Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 13
- Log:
Initial import of Typo 2.6.0 sources from a downloaded Tarball.
Typo is a Ruby On Rails based blog engine.
- Author:
- adh
- Date:
- Sat Jul 22 22:25:02 +0100 2006
- Size:
- 3364 Bytes
1 | RAILS_ROOT = File.dirname(__FILE__) + "/../" |
2 | RAILS_ENV = ENV['RAILS_ENV'] || 'development' |
3 | |
4 | |
5 | # Mocks first. |
6 | ADDITIONAL_LOAD_PATHS = ["#{RAILS_ROOT}/test/mocks/#{RAILS_ENV}"] |
7 | |
8 | # Then model subdirectories. |
9 | ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/app/models/[_a-z]*"]) |
10 | ADDITIONAL_LOAD_PATHS.concat(Dir["#{RAILS_ROOT}/components/[_a-z]*"]) |
11 | |
12 | # Followed by the standard includes. |
13 | ADDITIONAL_LOAD_PATHS.concat %w( |
14 | app |
15 | app/models |
16 | app/controllers |
17 | app/helpers |
18 | app/apis |
19 | components |
20 | config |
21 | lib |
22 | vendor |
23 | vendor/rubypants |
24 | vendor/redcloth/lib |
25 | vendor/bluecloth/lib |
26 | vendor/rails/railties |
27 | vendor/rails/railties/lib |
28 | vendor/rails/actionpack/lib |
29 | vendor/rails/activesupport/lib |
30 | vendor/rails/activerecord/lib |
31 | vendor/rails/actionmailer/lib |
32 | vendor/rails/actionwebservice/lib |
33 | ).map { |dir| "#{RAILS_ROOT}/#{dir}" }.select { |dir| File.directory?(dir) } |
34 | |
35 | # Prepend to $LOAD_PATH |
36 | ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } |
37 | |
38 | # Load included libraries. |
39 | require 'redcloth' |
40 | require 'bluecloth' |
41 | require 'rubypants' |
42 | |
43 | # Require Rails libraries. |
44 | require 'rubygems' unless File.directory?("#{RAILS_ROOT}/vendor/rails") |
45 | |
46 | require 'active_support' |
47 | require 'active_record' |
48 | require 'action_controller' |
49 | require 'action_mailer' |
50 | require 'action_web_service' |
51 | |
52 | # Environment-specific configuration. |
53 | require_dependency 'migrator' |
54 | require_dependency 'theme' |
55 | require_dependency 'login_system' |
56 | require_dependency "environments/#{RAILS_ENV}" |
57 | ActiveRecord::Base.configurations = File.open("#{RAILS_ROOT}/config/database.yml") { |f| YAML::load(f) } |
58 | ActiveRecord::Base.establish_connection |
59 | |
60 | |
61 | # Configure defaults if the included environment did not. |
62 | begin |
63 | RAILS_DEFAULT_LOGGER = Logger.new("#{RAILS_ROOT}/log/#{RAILS_ENV}.log") |
64 | RAILS_DEFAULT_LOGGER.level = (RAILS_ENV == 'production' ? Logger::INFO : Logger::DEBUG) |
65 | rescue StandardError |
66 | RAILS_DEFAULT_LOGGER = Logger.new(STDERR) |
67 | RAILS_DEFAULT_LOGGER.level = Logger::WARN |
68 | RAILS_DEFAULT_LOGGER.warn( |
69 | "Rails Error: Unable to access log file. Please ensure that log/#{RAILS_ENV}.log exists and is chmod 0666. " + |
70 | "The log level has been raised to WARN and the output directed to STDERR until the problem is fixed." |
71 | ) |
72 | end |
73 | |
74 | [ActiveRecord, ActionController, ActionMailer].each { |mod| mod::Base.logger ||= RAILS_DEFAULT_LOGGER } |
75 | [ActionController, ActionMailer].each { |mod| mod::Base.template_root ||= "#{RAILS_ROOT}/app/views/" } |
76 | ActionController::Routing::Routes.reload |
77 | |
78 | Controllers = Dependencies::LoadingModule.root( |
79 | File.join(RAILS_ROOT, 'app', 'controllers'), |
80 | File.join(RAILS_ROOT, 'components') |
81 | ) |
82 | |
83 | # Include your app's configuration here: |
84 | $KCODE = 'u' |
85 | require_dependency 'jcode' |
86 | require_dependency 'aggregations/delicious' |
87 | require_dependency 'aggregations/tada' |
88 | require_dependency 'aggregations/flickr' |
89 | require_dependency 'aggregations/fortythree' |
90 | require_dependency 'aggregations/upcoming' |
91 | require_dependency 'configuration' |
92 | require_dependency 'spam_protection' |
93 | require_dependency 'xmlrpc_fix' |
94 | require_dependency 'renderfix' |
95 | |
96 | ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS.update(:database_manager => CGI::Session::ActiveRecordStore) |
97 | |
98 | ActiveSupport::CoreExtensions::Time::Conversions::DATE_FORMATS.merge!( |
99 | :long_weekday => '%a %B %e, %Y %H:%M' |
100 | ) |
101 | |
102 | ActiveRecord::ConnectionAdapters::MysqlAdapter.emulate_booleans = false rescue nil |