Changesets can be listed by changeset number.
The Git repository is here.
Changeset 365
Hub integration and development mode bug fix - require "instiki_errors"
in application.rb, rather than environment.rb, since the latter is not
reloaded in development mode but the former is and the required code
seems to be forgotten, leading to exceptions on anything but the first
development mode patch fetch under Apache+Passenger in development mode.
- Comitted by: rool
- Date: Saturday March 19 22:05:55 2011 (over 13 years ago)
Affected files:
- rool/rails/instiki/trunk/app/controllers/application_controller.rb (diff)
- rool/rails/instiki/trunk/config/environment.rb (diff)
rool/rails/instiki/trunk/app/controllers/application_controller.rb:
prev. | current | |
1 | # This must be done here rather than environment.rb so that it gets picked up | |
2 | # properly in Development mode, when the controller is re-read for each request | |
3 | # but the environment may not be (e.g. it isn't with Passenger). | |
4 | require_dependency 'instiki_errors' | |
5 | ||
# The filters added to this controller will be run for all controllers in the application. | ||
# Likewise will all the methods added be available for all controllers. | ||
class ApplicationController < ActionController::Base | ||
... | ... | |
8 | # Hub single sign-on support. | |
9 | ||
10 | require 'hub_sso_lib' | |
11 | include HubSsoLib::Core | |
12 | ||
13 | before_filter :hubssolib_beforehand | |
14 | after_filter :hubssolib_afterwards | |
15 | ||
protect_forms_from_spam |
rool/rails/instiki/trunk/config/environment.rb:
prev. | current | |
# Bootstrap the Rails environment, frameworks, and default configuration | ||
#### | ||
5 | RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION | |
6 | ||
# Make sure we are using the latest rexml | ||
6 | ||
8 | rexml_versions = ['', File.join(File.dirname(__FILE__), '..', 'vendor', 'plugins', 'rexml', 'lib', '')].collect { |v| | |
`ruby -r "#{v + 'rexml/rexml'}" -e 'p REXML::VERSION'`.split('.').collect {|n| n.to_i} } | ||
$:.unshift(File.join(File.dirname(__FILE__), '..', 'vendor', 'plugins', 'rexml', 'lib')) if (rexml_versions[0] <=> rexml_versions[1]) == -1 | ||
... | ... | |
# in a file, for reuse between server restarts. If you want to | ||
# change the key, just delete the file, and it will be regenerated | ||
# on the next restart. Doing so will invalitate all existing sessions. | ||
21 | | |
22 | | |
23 | | |
24 | | |
23 | secret_file = Rails.root.join("secret") | |
24 | if File.exist?(secret_file) | |
25 | secret = secret_file.read | |
26 | else | |
secret = ActiveSupport::SecureRandom.hex(64) | ||
26 | | |
27 | | |
28 | | |
29 | | |
28 | File.open(secret_file, 'w', 0600) { |f| f.write(secret) } | |
29 | end | |
30 | config.action_controller.session = { | |
31 | :key => "_instikiapp_session_id", | |
:secret => secret | ||
31 | | |
33 | } | |
# Don't do file system STAT calls to check to see if the templates have changed. | ||
#config.action_view.cache_template_loading = true | ||
... | ... | |
File.umask(0026) | ||
end | ||
57 | ||
58 | ||
59 | ||
#require 'jcode' | ||
# Miscellaneous monkey patches (here be dragons ...) | ||
... | ... | |
require 'logging_stuff' | ||
require 'rack_stuff' | ||
67 | ||
66 | #Additional Mime-types | |
mime_types = YAML.load_file(File.join(File.dirname(__FILE__), 'mime_types.yml')) | ||
Rack::Mime::MIME_TYPES.merge!(mime_types) |