@@ -12,30 +12,17 @@ setenv() {
1212 fi
1313 if [ " $VERBOSE " = " yes" ]; then export TRACE=--trace; fi
1414 if [ ! " $VERBOSE " = " yes" ]; then export QUIET=--quiet; fi
15- if [[ " $RUBY_VERSION " < " 1.9" ]]; then export RUBYGEMS=2.1.11; fi
1615
1716 case $REDMINE in
1817 2.* .* ) export PATH_TO_PLUGINS=./plugins # for redmine 2.x.x
19- export GENERATE_SECRET=generate_secret_token
20- export MIGRATE_PLUGINS=redmine:plugins
2118 export REDMINE_TARBALL=https://github.com/edavis10/redmine/archive/$REDMINE .tar.gz
2219 ;;
23- 2.* -stable) export PATH_TO_PLUGINS=./plugins # for redmine 2.x-stable
24- export GENERATE_SECRET=generate_secret_token
25- export MIGRATE_PLUGINS=redmine:plugins
20+ * .* -stable) export PATH_TO_PLUGINS=./plugins # for redmine 2.x-stable
2621 export REDMINE_SVN_REPO=http://svn.redmine.org/redmine/branches/$REDMINE
2722 ;;
2823 master) export PATH_TO_PLUGINS=./plugins
29- export GENERATE_SECRET=generate_secret_token
30- export MIGRATE_PLUGINS=redmine:plugins
3124 export REDMINE_SVN_REPO=http://svn.redmine.org/redmine/trunk/
3225 ;;
33- v3.8.0) export PATH_TO_PLUGINS=./vendor/chiliproject_plugins
34- export GENERATE_SECRET=generate_session_store
35- export MIGRATE_PLUGINS=db:migrate:plugins
36- export REDMINE_TARBALL=https://github.com/chiliproject/chiliproject/archive/$REDMINE .tar.gz
37- export RUBYGEMS=1.8.29
38- ;;
3926 * ) echo " Unsupported platform $REDMINE "
4027 exit 1
4128 ;;
@@ -78,9 +65,6 @@ clone_redmine()
7865 mkdir -p $TARGET
7966 wget $REDMINE_TARBALL -O- | tar -C $TARGET -xz --strip=1 --show-transformed -f -
8067 fi
81-
82- # Temporarily pin down database_cleaner for bug with sqlite, see https://github.com/bmabey/database_cleaner/issues/224
83- sed -ri ' s/gem "database_cleaner"/gem "database_cleaner", "< 1.1.0"/' $TARGET /Gemfile
8468}
8569
8670install_plugin_gemfile ()
@@ -91,20 +75,6 @@ install_plugin_gemfile()
9175 ln -s " $PATH_TO_LDAPSYNC /config/Gemfile.travis" " $REDMINE_DIR /$PATH_TO_PLUGINS /redmine_ldap_sync/Gemfile"
9276}
9377
94- bundle_install ()
95- {
96- setenv
97-
98- if [ -n " ${RUBYGEMS} " ]; then
99- rvm rubygems ${RUBYGEMS} --force
100- fi
101- pushd $REDMINE_DIR 1> /dev/null
102- for i in {1..3}; do
103- gem install bundler $QUIET --no-rdoc --no-ri && \
104- bundle install $QUIET --gemfile=./Gemfile --path vendor/bundle --without development rmagick && break
105- done && popd 1> /dev/null
106- }
107-
10878prepare_redmine ()
10979{
11080 setenv
@@ -118,7 +88,7 @@ prepare_redmine()
11888 bundle exec rake redmine:load_default_data REDMINE_LANG=en $TRACE
11989
12090 trace ' Session token'
121- bundle exec rake $GENERATE_SECRET $TRACE
91+ bundle exec rake generate_secret_token $TRACE
12292
12393 popd 1> /dev/null
12494}
@@ -132,7 +102,7 @@ prepare_plugin()
132102 ln -s $PATH_TO_LDAPSYNC /* $PATH_TO_PLUGINS /redmine_ldap_sync
133103
134104 trace ' Prepare plugins'
135- bundle exec rake $MIGRATE_PLUGINS NAME=redmine_ldap_sync $TRACE
105+ bundle exec rake redmine:plugins NAME=redmine_ldap_sync $TRACE
136106
137107 popd 1> /dev/null
138108}
@@ -179,7 +149,7 @@ run_tests()
179149
180150 pushd $REDMINE_DIR 1> /dev/null
181151
182- if [ " $REDMINE " == " master" ] && [ " $RUBY_VERSION " == " 2.2.2 " ]; then
152+ if [ " $REDMINE " == " master" ] && [ " $RUBY_VERSION " == " 2.2" ]; then
183153 bundle exec rake redmine:plugins:ldap_sync:coveralls:test $TRACE
184154 else
185155 bundle exec rake redmine:plugins:ldap_sync:test $TRACE
@@ -194,15 +164,14 @@ test_uninstall()
194164
195165 pushd $REDMINE_DIR 1> /dev/null
196166
197- bundle exec rake $TRACE $MIGRATE_PLUGINS NAME=redmine_ldap_sync VERSION=0
167+ bundle exec rake $TRACE redmine:plugins NAME=redmine_ldap_sync VERSION=0
198168
199169 popd 1> /dev/null
200170}
201171
202172case " $1 " in
203173 " clone_redmine" ) shift ; clone_redmine $@ ;;
204174 " install_plugin_gemfile" ) shift ; install_plugin_gemfile $@ ;;
205- " bundle_install" ) shift ; bundle_install $@ ;;
206175 " prepare_redmine" ) shift ; prepare_redmine $@ ;;
207176 " prepare_plugin" ) shift ; prepare_plugin $@ ;;
208177 " start_ldap" ) shift ; start_ldap $@ ;;
0 commit comments