forked from calculate/calculate-overlay
parent
6813331392
commit
5e4f1e630f
@ -1,2 +1,7 @@
|
||||
AUX 10_redmine_vhost.conf 523 RMD160 080c5afc8cef54f2fbdf24b1ff262cc155d85ac5 SHA1 cac48370ffc7756173c0a759366ee8a7d3d7c716 SHA256 439017a65fabb0bd7cb49abd94864be372b73a4b953e31dc0db8449790406205
|
||||
EBUILD redmine-9999.ebuild 4455 RMD160 f41c67ee21ecd3de52840092242247795c42a654 SHA1 f81c5eec6ed0ae3b7a51f7c5edb07fd5c8146a9c SHA256 8104242a9d314bfe05b1b87709b2b68f920269ecf1b807344e41b3b7d178bfb8
|
||||
AUX install.sh 156 RMD160 84d0800e4fc9762a1438d721afe63b87899874c5 SHA1 8217fbd04e42e5c455469bd06cf923b2df8e9abc SHA256 115def32b307a837f1fe2677d02ba4f8f0d1b40e19fce1426d334f42d0edc8f5
|
||||
AUX openid.patch 11280 RMD160 0bb3b8a5d1a9de9aa70373f1f4a87ee00ce14192 SHA1 2d3a39e3387fc623bfd117c1973b0aa449d94f44 SHA256 dbe97644be53dcc14c82c0dfb13c76ebb8f966c7f3340fab376612fb4a621fe1
|
||||
AUX openid_install.sh 259 RMD160 a5b37ce91355a3bd56ee63f1d1f133974e381561 SHA1 b4016d8226cd6615e8c08268c99bf19a97ca16bf SHA256 3fa8bb9f624fa28c157f0346155a66eddadcb44d3a380caf13e0b89c9b0dcf8b
|
||||
AUX simple_captcha.patch 1126 RMD160 a5316ed4d9b057eb4b6388c7cd0b4cd5d4d6f990 SHA1 ae8c7b66e6da4240bfae350826742636a1afa31a SHA256 b8e0f65c7ea2743a1c5cdd5e762f7b191a6ea0e9d499ed98c6d2479d3edb5027
|
||||
AUX simple_captcha_install.sh 469 RMD160 4897fab0b702e0d784b3cda49cd2288f49cf00f0 SHA1 2ee407104659559917c0c35404f17188cf985220 SHA256 ef77c9c8dd2c7d34974e125bcb88d2d48516f0ed1c5bf3635cbb06bced406e87
|
||||
EBUILD redmine-9999.ebuild 4582 RMD160 8a32a16519b79c7cc4015ba85fcbde331cc4fec8 SHA1 c870436c232744305389b016ea34f986cd9abe7e SHA256 7c55a778e464eadcd7c27590ffdc196b90bd1b414e3b2fbda435b510d918415b
|
||||
|
@ -0,0 +1,8 @@
|
||||
#!/usr/bin/bash
|
||||
BASE=`dirname $0`
|
||||
if [[ "$0" != /* ]]
|
||||
then
|
||||
BASE=`pwd`/$BASE
|
||||
fi
|
||||
bash $BASE/simple_captcha_install.sh || exit 1
|
||||
bash $BASE/openid_install.sh
|
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
REDMINE_DIR=/var/lib/redmine
|
||||
|
||||
if [[ $BASE == '' ]]
|
||||
then
|
||||
BASE=`dirname $0`
|
||||
if [[ "$0" != /* ]]
|
||||
then
|
||||
BASE=`pwd`/$BASE
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -d $REDMINE_DIR ]
|
||||
then
|
||||
cd $REDMINE_DIR
|
||||
patch -p0 -i $BASE/openid.patch
|
||||
else
|
||||
echo "Redmine not found."
|
||||
fi
|
@ -0,0 +1,30 @@
|
||||
--- app/controllers/application_controller.rb
|
||||
+++ app/controllers/application_controller.rb
|
||||
@@ -19,6 +19,7 @@ require 'uri'
|
||||
require 'cgi'
|
||||
|
||||
class ApplicationController < ActionController::Base
|
||||
+ include SimpleCaptcha::ControllerHelpers
|
||||
include Redmine::I18n
|
||||
|
||||
layout 'base'
|
||||
--- config/routes.rb
|
||||
+++ config/routes.rb
|
||||
@@ -269,4 +269,6 @@ ActionController::Routing::Routes.draw do |map|
|
||||
map.connect 'robots.txt', :controller => 'welcome', :action => 'robots'
|
||||
# Used for OpenID
|
||||
map.root :controller => 'account', :action => 'login'
|
||||
+ # Captcha
|
||||
+ map.simple_captcha '/simple_captcha/:action', :controller => 'simple_captcha'
|
||||
end
|
||||
--- vendor/plugins/simple_captcha/lib/simple_captcha_config.rb
|
||||
+++ vendor/plugins/simple_captcha/lib/simple_captcha_config.rb
|
||||
@@ -12,7 +12,7 @@ module SimpleCaptcha #:nodoc
|
||||
end
|
||||
|
||||
def simple_captcha_key #:nodoc
|
||||
- session[:simple_captcha] ||= Digest::SHA1.hexdigest(Time.now.to_s + session.session_id.to_s)
|
||||
+ session[:simple_captcha] ||= Digest::SHA1.hexdigest(Time.now.to_s)
|
||||
end
|
||||
|
||||
def simple_captcha_value(key = simple_captcha_key) #:nodoc
|
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
REDMINE_DIR="/var/lib/redmine"
|
||||
PLUGIN_REP="svn://rubyforge.org/var/svn/expressica/plugins/simple_captcha"
|
||||
|
||||
if [[ $BASE == '' ]]
|
||||
then
|
||||
BASE=`dirname $0`
|
||||
if [[ "$0" != /* ]]
|
||||
then
|
||||
BASE=`pwd`/$BASE
|
||||
fi
|
||||
fi
|
||||
echo $BASE
|
||||
|
||||
if [ -d $REDMINE_DIR ]
|
||||
then
|
||||
cd $REDMINE_DIR
|
||||
ruby script/plugin install $PLUGIN_REP || exit 1
|
||||
rake simple_captcha:setup || exit 1
|
||||
rake db:migrate || exit 1
|
||||
patch -p0 -i $BASE/simple_captcha.patch
|
||||
else
|
||||
echo "Redmine not found."
|
||||
fi
|
Loading…
Reference in new issue