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')
|
|
|
|
if !File.exists?(tmp_path)
|
|
|
|
Dir.mkdir(tmp_path)
|
|
|
|
end
|
|
|
|
|
2015-10-30 03:32:02 +00:00
|
|
|
module Rails
|
|
|
|
class << self
|
|
|
|
def root
|
|
|
|
Pathname.new(File.join(File.dirname(__FILE__), '..'))
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-10-26 13:55:46 +00:00
|
|
|
RuCaptcha.configure do
|
|
|
|
self.len = 2
|
2015-11-05 10:20:41 +00:00
|
|
|
self.font_size = 48
|
2015-10-26 13:55:46 +00:00
|
|
|
self.implode = 0.111
|
|
|
|
end
|