Skip to content

Commit

Permalink
support rails-2.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hsbt committed Jun 30, 2009
1 parent 8e22f17 commit 8c848c6
Show file tree
Hide file tree
Showing 10 changed files with 794 additions and 683 deletions.
File renamed without changes.
15 changes: 8 additions & 7 deletions fastladder/config/boot.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ def vendor_rails?
File.exist?("#{RAILS_ROOT}/vendor/rails")
end

# FIXME : Ruby 1.9
def preinitialize
load(preinitializer_path) if File.exists?(preinitializer_path)
load(preinitializer_path) if File.exist?(preinitializer_path)
end

def preinitializer_path
Expand All @@ -44,6 +43,8 @@ def run
class VendorBoot < Boot
def load_initializer
require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
Rails::Initializer.run(:install_gem_spec_stubs)
Rails::GemDependency.add_frozen_gem_path
end
end

Expand All @@ -67,7 +68,7 @@ def load_rails_gem

class << self
def rubygems_version
Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
Gem::RubyGemsVersion rescue nil
end

def gem_version
Expand All @@ -82,14 +83,14 @@ def gem_version

def load_rubygems
require 'rubygems'

unless rubygems_version >= '0.9.4'
$stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
min_version = '1.3.1'
unless rubygems_version >= min_version
$stderr.puts %Q(Rails requires RubyGems >= #{min_version} (you have #{rubygems_version}). Please `gem update --system` and try again.)
exit 1
end

rescue LoadError
$stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
$stderr.puts %Q(Rails requires RubyGems >= #{min_version}. Please install RubyGems and try again: http://rubygems.rubyforge.org)
exit 1
end

Expand Down
9 changes: 5 additions & 4 deletions fastladder/config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# ENV['RAILS_ENV'] ||= 'production'

# Specifies gem version of Rails to use when vendor/rails is not present
RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION
RAILS_GEM_VERSION = '2.3.2' unless defined? RAILS_GEM_VERSION

# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
Expand Down Expand Up @@ -50,7 +50,10 @@
:session_key => '_fastladder_session',
:secret => secret
}
config.gem 'gettext', :lib => 'gettext/rails', :version => '~>1.93'
config.gem "locale_rails"
config.gem "gettext_activerecord"
config.gem "gettext_rails"
# config.gem 'gettext', :lib => 'gettext/rails', :version => '~>1.93'

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
Expand Down Expand Up @@ -84,5 +87,3 @@
#config.read_timeout = 60
#config.crawler_user_agent = "Fastladder FeedFetcher/#{Fastladder::Version} (http://fastladder.org/)"
end

require 'gettext/rails'
2 changes: 1 addition & 1 deletion fastladder/config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_view.cache_template_extensions = false
#config.action_view.cache_template_extensions = false

# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
2 changes: 2 additions & 0 deletions fastladder/lib/string_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ class String
# for strip_tags
#include ActionView::Helpers::TextHelper
include ActionView::Helpers::SanitizeHelper
extend ActionView::Helpers::SanitizeHelper::ClassMethods

LAME_CHARS = [0x200c, 0x200d, 0x200e, 0x200f, 0x2028, 0x2029, 0x202a, 0x202b, 0x202c,0x202d, 0x202e, 0x206a, 0x206b, 0x206c, 0x206d, 0x206e, 0x206f, 0xfeff].pack("U*")

def utf8_roundtrip
Expand Down
Loading

0 comments on commit 8c848c6

Please sign in to comment.