diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
| commit | e0a7e0fec760ba12c8067a37e10c96f1f05876e2 (patch) | |
| tree | d0cf745592a46aee4d4913911fd34c7c24515220 /config/environment.rb | |
| parent | 6424e10be5a89f175a74c71c55660412a169b8b8 (diff) | |
Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgrade
- Converted plugins to gems (Gemfile)
- Updated config structure (application.rb, boot.rb, environment.rb)
- Converted routes to Rails 3 DSL
- Converted named_scope to scope throughout models
- Converted find(:all, :conditions) to where() chains
- Fixed has_many :order to use ordering scope
- Updated session store and secret token configuration
- Fixed exception_notification middleware configuration
- Patched Ruby 2.4 / Rails 3.2 incompatibilities:
- Integer/Float duration arithmetic (ActiveSupport)
- Arel visit_Integer for PostgreSQL adapter
- create_database String/Integer coercion
- ActionController consider_all_requests_local
- Migrated taggings schema for acts-as-taggable-on
- Replaced dynamic_form gem with custom form_error_messages helper
- Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for)
- Fixed admin layout yield
- Updated test suite for Rails 3 APIs
Diffstat (limited to 'config/environment.rb')
| -rw-r--r-- | config/environment.rb | 88 |
1 files changed, 2 insertions, 86 deletions
diff --git a/config/environment.rb b/config/environment.rb index 57b9ef2..6fdeb06 100644 --- a/config/environment.rb +++ b/config/environment.rb | |||
| @@ -1,86 +1,2 @@ | |||
| 1 | # Be sure to restart your server when you modify this file | 1 | require File.expand_path('../application', __FILE__) |
| 2 | 2 | Cccms::Application.initialize! | |
| 3 | # Specifies gem version of Rails to use when vendor/rails is not present | ||
| 4 | RAILS_GEM_VERSION = '2.3.15' unless defined? RAILS_GEM_VERSION | ||
| 5 | |||
| 6 | # Bootstrap the Rails environment, frameworks, and default configuration | ||
| 7 | require File.join(File.dirname(__FILE__), 'boot') | ||
| 8 | |||
| 9 | # monkey patch for 2.0. Will ignore vendor gems. | ||
| 10 | if RUBY_VERSION >= "2.0.0" | ||
| 11 | module Gem | ||
| 12 | def self.source_index | ||
| 13 | sources | ||
| 14 | end | ||
| 15 | |||
| 16 | def self.cache | ||
| 17 | sources | ||
| 18 | end | ||
| 19 | |||
| 20 | SourceIndex = Specification | ||
| 21 | |||
| 22 | class SourceList | ||
| 23 | # If you want vendor gems, this is where to start writing code. | ||
| 24 | def search( *args ); []; end | ||
| 25 | def each( &block ); end | ||
| 26 | include Enumerable | ||
| 27 | end | ||
| 28 | end | ||
| 29 | end | ||
| 30 | |||
| 31 | Rails::Initializer.run do |config| | ||
| 32 | # Settings in config/environments/* take precedence over those specified here. | ||
| 33 | # Application configuration should go into files in config/initializers | ||
| 34 | # -- all .rb files in that directory are automatically loaded. | ||
| 35 | |||
| 36 | # Add additional load paths for your own custom dirs | ||
| 37 | # config.load_paths += %W( #{RAILS_ROOT}/extras ) | ||
| 38 | |||
| 39 | # Specify gems that this application depends on and have them installed with rake gems:install | ||
| 40 | # config.gem "bj" | ||
| 41 | # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net" | ||
| 42 | # config.gem "sqlite3-ruby", :lib => "sqlite3" | ||
| 43 | # config.gem "aws-s3", :lib => "aws/s3" | ||
| 44 | |||
| 45 | # config.gem "rake", :version => ">= 0.8.3" | ||
| 46 | # config.gem "rack", :version => ">= 0.9.1" | ||
| 47 | config.gem "pg" | ||
| 48 | config.gem "thinking-sphinx", :lib => 'thinking_sphinx', :version => '1.5.0' | ||
| 49 | config.gem "libxml-ruby", :lib => 'xml' | ||
| 50 | config.gem "erdgeist-chaos_calendar", :lib => "chaos_calendar", :source => "http://gems.github.com" | ||
| 51 | |||
| 52 | # Only load the plugins named here, in the order given (default is alphabetical). | ||
| 53 | # :all can be used as a placeholder for all plugins not explicitly named | ||
| 54 | # config.plugins = [ :exception_notification, :ssl_requirement, :all ] | ||
| 55 | |||
| 56 | # Allowed Tags | ||
| 57 | # strong em b i p code pre tt samp kbd var sub sup dfn cite big small | ||
| 58 | # address hr br div span h1 h2 h3 h4 h5 h6 ul ol li dt dd abbr | ||
| 59 | # acronym a img blockquote del ins | ||
| 60 | |||
| 61 | # Allowed Attributes: | ||
| 62 | # href src width height alt cite datetime title class name xml:lang abbr)) | ||
| 63 | |||
| 64 | # Add tags to whitelist with: | ||
| 65 | # config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td' | ||
| 66 | |||
| 67 | # Add attributes to whitelist with: | ||
| 68 | # config.action_view.sanitized_allowed_attributes = 'id', 'class', 'style' | ||
| 69 | |||
| 70 | # Activate observers that should always be running | ||
| 71 | # config.active_record.observers = :cacher, :garbage_collector, :forum_observer | ||
| 72 | |||
| 73 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | ||
| 74 | # Run "rake -D time" for a list of tasks for finding time zone names. | ||
| 75 | config.time_zone = 'Berlin' | ||
| 76 | |||
| 77 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | ||
| 78 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] | ||
| 79 | config.i18n.default_locale = :de | ||
| 80 | |||
| 81 | end | ||
| 82 | |||
| 83 | require 'awesome_patch' | ||
| 84 | |||
| 85 | ExceptionNotifier.exception_recipients = %w(erdgeist@ccc.de) | ||
| 86 | ExceptionNotifier.sender_address = %("CCCMS Error" <error@www.ccc.de>) | ||
