Changesets can be listed by changeset number.
The Git repository is here.
Changeset 88
Configured I2 to work within ROOL site. Updated application helper
to use RedCloth 3.0.3 with local modifications. The 3.0.3 in the
Lib folder is modified, to support escape sequences on special
characters using a backslash (see QTAGS and QTAGS_ESCAPE).
- Comitted by: adh
- Date: Monday October 16 10:46:55 2006 (over 18 years ago)
Affected files:
- rool/rails/i2/trunk/lib/redcloth303.rb
- rool/rails/i2/trunk/app/helpers/application_helper.rb (diff)
- rool/rails/i2/trunk/config/database.yml (diff)
- rool/rails/i2/trunk/config/environment.rb (diff)
- rool/rails/i2/trunk/config/routes.rb (diff)
- rool/rails/i2/trunk/db/schema.rb (diff)
- rool/rails/i2/trunk/public/dispatch.cgi (diff)
- rool/rails/i2/trunk/public/dispatch.fcgi (diff)
- rool/rails/i2/trunk/public/dispatch.rb (diff)
rool/rails/i2/trunk/app/helpers/application_helper.rb:
prev. | current | |
end | ||
def markup(body, existing_page_titles = @book.existing_page_titles) | ||
29 | | |
29 | require 'redcloth303' # Use local, specific version in 'lib' | |
30 | text = linkize(auto_link(body), existing_page_titles) | |
31 | textilized = RedCloth.new(text, [ :hard_breaks ]) | |
32 | textilized.hard_breaks = true if textilized.respond_to?("hard_breaks=") | |
33 | textilized.to_html | |
end | ||
def differences(original, new) |
rool/rails/i2/trunk/config/database.yml:
prev. | current | |
1 | # I2 PostgreSQL database configuration. Syntax taken from | |
2 | # "http://blog.bleything.net/" (Ben Bleything, June 2006). | |
3 | ||
4 | dbinfo: &dbinfo | |
5 | adapter: postgresql | |
6 | host: /home/adh/postgres/ | |
7 | username: adh | |
8 | password: oiarfewa | |
9 | ||
10 | # Warning: The database defined as 'test' will be erased and | |
11 | # re-generated from your development database when you run 'rake'. | |
12 | # Do not set this db to the same as development or production. | |
13 | ||
development: | ||
2 | | |
3 | | |
4 | | |
5 | | |
6 | | |
15 | <<: *dbinfo | |
16 | database: i2 | |
test: | ||
9 | | |
10 | | |
11 | | |
12 | | |
13 | | |
19 | <<: *dbinfo | |
20 | database: i2-test | |
production: | ||
16 | | |
17 | | |
18 | | |
19 | | |
20 | | |
23 | <<: *dbinfo | |
24 | database: i2 |
rool/rails/i2/trunk/config/environment.rb:
prev. | current | |
# Bootstrap the Rails environment, frameworks, and default configuration | ||
require File.join(File.dirname(__FILE__), 'boot') | ||
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/i2' | |
15 | ||
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 = "/rails/i2" | |
21 | ||
# Skip frameworks you're not going to use | ||
config.frameworks -= [ :action_web_service, :action_mailer ] | ||
25 | # Force all environments to use the same logger level | |
26 | # (by default production uses :info, the others :debug) | |
27 | config.log_level = :warn | |
28 | ||
# Add additional load paths for your own custom dirs | ||
config.load_paths += %W( #{RAILS_ROOT}/app/cachers ) | ||
... | ... | |
# config.active_record.default_timezone = :utc | ||
# See Rails::Configuration for more options | ||
38 | ||
54 | end |
rool/rails/i2/trunk/config/routes.rb:
prev. | current | |
ActionController::Routing::Routes.draw do |map| | ||
2 | | |
2 | map.connect PATH_PREFIX, :controller => "books", :action => "premiere" | |
4 | | |
5 | | |
6 | | |
7 | | |
8 | | |
9 | | |
10 | | |
11 | | |
12 | | |
4 | map.home PATH_PREFIX + '/:book_url_name', :controller => "pages", :action => "show", :page_title => "Home Page" | |
5 | map.pages PATH_PREFIX + '/:book_url_name/pages', :controller => "pages", :action => "index" | |
6 | map.recent PATH_PREFIX + '/:book_url_name/recent', :controller => "pages", :action => "recent" | |
7 | map.page PATH_PREFIX + '/:book_url_name/pages/:page_title', :controller => "pages", :action => "show" | |
8 | map.new PATH_PREFIX + '/:book_url_name/pages/:page_title/versions/new', :controller => "versions", :action => "new" | |
9 | map.rollback PATH_PREFIX + '/:book_url_name/pages/:page_title/versions/new/:version_number', :controller => "versions", :action => "new", :requirements => { :version_number => /^\d+$/ } | |
10 | map.version PATH_PREFIX + '/:book_url_name/pages/:page_title/versions/:version_number', :controller => "versions", :action => "show", :requirements => { :version_number => /^\d+$/ } | |
14 | | |
12 | map.connect PATH_PREFIX + '/:book_url_name/pages/:page_title/:controller/:action/:id' | |
14 | map.feed PATH_PREFIX + '/:book_url_name/feed.rss', :controller => "books", :action => "feed" | |
15 | ||
# Backwards compatible URLs with Instiki | ||
17 | | |
18 | | |
19 | | |
17 | map.connect PATH_PREFIX + '/:book_url_name/show/:page_title', :controller => "alias", :action => "show" | |
18 | map.connect PATH_PREFIX + '/:book_url_name/rss_with_content', :controller => "alias", :action => "feed" | |
19 | map.connect PATH_PREFIX + '/:book_url_name/rss_with_headlines', :controller => "alias", :action => "feed" | |
21 | | |
22 | ||
22 | map.connect PATH_PREFIX + '/:book_url_name/:controller/:action/:id' | |
23 | end |
rool/rails/i2/trunk/db/schema.rb:
prev. | current | |
ActiveRecord::Schema.define(:version => 8) do | ||
7 | | |
7 | create_table "authors", :force => true do |t| | |
t.column "name", :string | ||
t.column "ip", :string | ||
t.column "book_id", :integer | ||
end | ||
13 | | |
13 | create_table "books", :force => true do |t| | |
t.column "name", :string | ||
t.column "url_name", :string | ||
t.column "existing_page_titles", :text | ||
17 | | |
17 | t.column "premiere", :boolean, :default => false | |
end | ||
20 | | |
20 | create_table "pages", :force => true do |t| | |
t.column "title", :string | ||
t.column "book_id", :integer | ||
t.column "created_at", :datetime | ||
t.column "updated_at", :datetime | ||
end | ||
27 | | |
27 | create_table "versions", :force => true do |t| | |
t.column "page_id", :integer | ||
t.column "author_id", :integer | ||
t.column "created_at", :datetime |
rool/rails/i2/trunk/public/dispatch.cgi:
prev. | current | |
1 | ||
1 | #!/bin/ruby | |
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) | ||
... | ... | |
require "dispatcher" | ||
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) | ||
10 | ||
11 | Dispatcher.dispatch |
rool/rails/i2/trunk/public/dispatch.fcgi:
prev. | current | |
1 | ||
1 | #!/bin/ruby | |
# | ||
# You may specify the path to the FastCGI crash log (a log of unhandled | ||
# exceptions which forced the FastCGI instance to exit, great for debugging) |
rool/rails/i2/trunk/public/dispatch.rb:
prev. | current | |
1 | ||
1 | #!/bin/ruby | |
require File.dirname(__FILE__) + "/../config/environment" unless defined?(RAILS_ROOT) | ||
... | ... | |
require "dispatcher" | ||
ADDITIONAL_LOAD_PATHS.reverse.each { |dir| $:.unshift(dir) if File.directory?(dir) } if defined?(Apache::RubyRun) | ||
10 | ||
11 | Dispatcher.dispatch |