Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 430
- Log:
Upgrade all Rails v2.x apps to v2.3.15, except for Radiant, which
is fiddly and has been patched instead. This is required due to two
critical security vulnerabilities recently discovered in Rails
versions 2 and 3.http://weblog.rubyonrails.org/2013/1/8/Rails-3-2-11-3-1-10-3-0-19-and-2-3-15-have-been-released/
https://groups.google.com/forum/?fromgroups=#!topic/radiantcms/b-2DPZlWt3o
- Author:
- rool
- Date:
- Sun Jan 13 23:19:02 +0000 2013
- Size:
- 2580 Bytes
1 | ##### |
2 | # Bootstrap the Rails environment, frameworks, and default configuration |
3 | #### |
4 | |
5 | RAILS_GEM_VERSION = '2.3.15' unless defined? RAILS_GEM_VERSION |
6 | |
7 | # Make sure we are using the latest rexml |
8 | rexml_versions = ['', File.join(File.dirname(__FILE__), '..', 'vendor', 'plugins', 'rexml', 'lib', '')].collect { |v| |
9 | `ruby -r "#{v + 'rexml/rexml'}" -e 'p REXML::VERSION'`.split('.').collect {|n| n.to_i} } |
10 | $:.unshift(File.join(File.dirname(__FILE__), '..', 'vendor', 'plugins', 'rexml', 'lib')) if (rexml_versions[0] <=> rexml_versions[1]) == -1 |
11 | |
12 | require File.join(File.dirname(__FILE__), 'boot') |
13 | |
14 | require 'active_support/secure_random' |
15 | |
16 | Rails::Initializer.run do |config| |
17 | |
18 | # Secret session key |
19 | # The secret session key is automatically generated, and stored |
20 | # in a file, for reuse between server restarts. If you want to |
21 | # change the key, just delete the file, and it will be regenerated |
22 | # on the next restart. Doing so will invalitate all existing sessions. |
23 | secret_file = Rails.root.join("secret") |
24 | if File.exist?(secret_file) |
25 | secret = secret_file.read |
26 | else |
27 | secret = ActiveSupport::SecureRandom.hex(64) |
28 | File.open(secret_file, 'w', 0600) { |f| f.write(secret) } |
29 | end |
30 | config.action_controller.session = { |
31 | :key => "_instikiapp_session_id", |
32 | :secret => secret |
33 | } |
34 | |
35 | # Don't do file system STAT calls to check to see if the templates have changed. |
36 | #config.action_view.cache_template_loading = true |
37 | |
38 | # Skip frameworks you're not going to use |
39 | config.frameworks -= [ :action_web_service, :action_mailer ] |
40 | |
41 | # Use the database for sessions instead of the file system |
42 | # (create the session table with 'rake create_sessions_table') |
43 | #config.action_controller.session_store = :active_record_store |
44 | |
45 | # Enable page/fragment caching by setting a file-based store |
46 | # (remember to create the caching directory and make it readable to the application) |
47 | config.cache_store = :file_store, "#{RAILS_ROOT}/cache" |
48 | |
49 | # Activate observers that should always be running |
50 | config.active_record.observers = :page_observer |
51 | |
52 | # Use Active Record's schema dumper instead of SQL when creating the test database |
53 | # (enables use of different database adapters for development and test environments) |
54 | config.active_record.schema_format = :sql |
55 | |
56 | File.umask(0026) |
57 | end |
58 | |
59 | #require 'jcode' |
60 | |
61 | # Miscellaneous monkey patches (here be dragons ...) |
62 | require 'caching_stuff' |
63 | require 'logging_stuff' |
64 | require 'rack_stuff' |
65 | |
66 | #Additional Mime-types |
67 | mime_types = YAML.load_file(File.join(File.dirname(__FILE__), 'mime_types.yml')) |
68 | Rack::Mime::MIME_TYPES.merge!(mime_types) |