From c4296b59a7f9d667d295f9c37b71f7849b818fb3 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Tue, 28 Jan 2025 22:47:15 +0100 Subject: Big overhaul patch and style changes --- config/boot.rb | 1 + config/environment.rb | 31 +++++++++++++++++++++++++++---- config/environments/production.rb | 3 ++- config/sphinx.yml | 3 ++- 4 files changed, 32 insertions(+), 6 deletions(-) (limited to 'config') diff --git a/config/boot.rb b/config/boot.rb index dd5e3b69..9834fc42 100644 --- a/config/boot.rb +++ b/config/boot.rb @@ -2,6 +2,7 @@ # Configure your app in config/environment.rb and config/environments/*.rb RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT) +ENV['NLS_LANG'] = 'de_DE.UTF8' module Rails class << self diff --git a/config/environment.rb b/config/environment.rb index ec7ffa90..57b9ef2a 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -1,11 +1,33 @@ # Be sure to restart your server when you modify this file # Specifies gem version of Rails to use when vendor/rails is not present -RAILS_GEM_VERSION = '2.3.11' unless defined? RAILS_GEM_VERSION +RAILS_GEM_VERSION = '2.3.15' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') +# monkey patch for 2.0. Will ignore vendor gems. +if RUBY_VERSION >= "2.0.0" + module Gem + def self.source_index + sources + end + + def self.cache + sources + end + + SourceIndex = Specification + + class SourceList + # If you want vendor gems, this is where to start writing code. + def search( *args ); []; end + def each( &block ); end + include Enumerable + end + end +end + Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here. # Application configuration should go into files in config/initializers @@ -23,7 +45,7 @@ Rails::Initializer.run do |config| # config.gem "rake", :version => ">= 0.8.3" # config.gem "rack", :version => ">= 0.9.1" config.gem "pg" - config.gem "thinking-sphinx", :lib => 'thinking_sphinx', :version => '1.4.3' + config.gem "thinking-sphinx", :lib => 'thinking_sphinx', :version => '1.5.0' config.gem "libxml-ruby", :lib => 'xml' config.gem "erdgeist-chaos_calendar", :lib => "chaos_calendar", :source => "http://gems.github.com" @@ -55,9 +77,10 @@ Rails::Initializer.run do |config| # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] config.i18n.default_locale = :de + end require 'awesome_patch' -ExceptionNotifier.exception_recipients = %w(hukl@berlin.ccc.de) -ExceptionNotifier.sender_address = %("CCCMS Error" ) +ExceptionNotifier.exception_recipients = %w(erdgeist@ccc.de) +ExceptionNotifier.sender_address = %("CCCMS Error" ) diff --git a/config/environments/production.rb b/config/environments/production.rb index 68ceccd4..3195745c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -32,4 +32,5 @@ ActionMailer::Base.sendmail_settings = { :arguments => '-i -t' } ActionMailer::Base.perform_deliveries = true -ActionMailer::Base.raise_delivery_errors = true \ No newline at end of file +ActionMailer::Base.raise_delivery_errors = true + diff --git a/config/sphinx.yml b/config/sphinx.yml index a01c2167..3dc91951 100644 --- a/config/sphinx.yml +++ b/config/sphinx.yml @@ -8,4 +8,5 @@ production: config_file: "/usr/local/etc/sphinx.conf" searchd_log_file: "/var/log/searchd.log" query_log_file: "/var/log/searchd.query.log" - pid_file: "/var/run/sphinxsearch/searchd.pid" \ No newline at end of file + max_matches: 10000 + pid_file: "/var/run/sphinxsearch/searchd.pid" -- cgit v1.3