2015-10-26 13:55:46 +00:00
|
|
|
require 'rubygems'
|
|
|
|
|
|
|
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
|
|
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
|
|
|
|
|
|
|
require 'rucaptcha'
|
|
|
|
|
2015-10-29 10:22:27 +00:00
|
|
|
tmp_path = File.join(File.dirname(__FILE__), '../tmp')
|
2016-05-23 07:11:04 +00:00
|
|
|
Dir.mkdir(tmp_path) unless File.exist?(tmp_path)
|
2015-10-29 10:22:27 +00:00
|
|
|
|
2015-10-30 03:32:02 +00:00
|
|
|
module Rails
|
|
|
|
class << self
|
|
|
|
def root
|
|
|
|
Pathname.new(File.join(File.dirname(__FILE__), '..'))
|
|
|
|
end
|
2016-10-29 02:48:05 +00:00
|
|
|
|
|
|
|
def cache
|
|
|
|
@cache ||= ActiveSupport::Cache::MemoryStore.new
|
|
|
|
end
|
2015-10-30 03:32:02 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-10-26 13:55:46 +00:00
|
|
|
RuCaptcha.configure do
|
2018-11-13 03:42:55 +00:00
|
|
|
self.cache_store = :memory_store
|
2015-10-26 13:55:46 +00:00
|
|
|
end
|