Stubbed out another new ActiveRecord dependency

This commit is contained in:
Alexey Verkhovsky 2005-04-04 06:48:42 +00:00
parent e9c4948d0a
commit 0ad1b746f0
2 changed files with 22 additions and 14 deletions

View file

@ -51,8 +51,9 @@ require 'rubygems' unless File.directory?("#{RAILS_ROOT}/vendor/rails")
require 'active_support'
require 'action_controller'
require 'active_record_stub'
require 'instiki_errors'
require_dependency 'instiki_errors'
require_dependency 'active_record_stub'
# Environment specific configuration
require_dependency "environments/#{RAILS_ENV}"

View file

@ -2,22 +2,29 @@
# Since ActiveRecord may not be present in Instiki runtime environment, this
# file provides a stub replacement for it
unless defined? ActiveRecord::Base
module ActiveRecord
class Base
# dependency in railties/lib/dispatcher.rb
def self.reset_column_information_and_inheritable_attributes_for_all_subclasses
# noop
end
# dependency in actionpack/lib/action_controller/benchmarking.rb
def self.connected?
false
end
def self.reset_column_information_and_inheritable_attributes_for_all_subclasses
# noop
end
# dependency in actionpack/lib/action_controller/benchmarking.rb
def self.connected?
false
end
# dependency in actionpack/lib/action_controller/benchmarking.rb
def self.connection
return ConnectionStub
end
end
end
module ConnectionStub
def self.reset_runtime
end
end
end