@@ -12,30 +12,17 @@ setenv() {
12
12
fi
13
13
if [ " $VERBOSE " = " yes" ]; then export TRACE=--trace; fi
14
14
if [ ! " $VERBOSE " = " yes" ]; then export QUIET=--quiet; fi
15
- if [[ " $RUBY_VERSION " < " 1.9" ]]; then export RUBYGEMS=2.1.11; fi
16
15
17
16
case $REDMINE in
18
17
2.* .* ) export PATH_TO_PLUGINS=./plugins # for redmine 2.x.x
19
- export GENERATE_SECRET=generate_secret_token
20
- export MIGRATE_PLUGINS=redmine:plugins
21
18
export REDMINE_TARBALL=https://github.com/edavis10/redmine/archive/$REDMINE .tar.gz
22
19
;;
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
26
21
export REDMINE_SVN_REPO=http://svn.redmine.org/redmine/branches/$REDMINE
27
22
;;
28
23
master) export PATH_TO_PLUGINS=./plugins
29
- export GENERATE_SECRET=generate_secret_token
30
- export MIGRATE_PLUGINS=redmine:plugins
31
24
export REDMINE_SVN_REPO=http://svn.redmine.org/redmine/trunk/
32
25
;;
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
- ;;
39
26
* ) echo " Unsupported platform $REDMINE "
40
27
exit 1
41
28
;;
@@ -78,9 +65,6 @@ clone_redmine()
78
65
mkdir -p $TARGET
79
66
wget $REDMINE_TARBALL -O- | tar -C $TARGET -xz --strip=1 --show-transformed -f -
80
67
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
84
68
}
85
69
86
70
install_plugin_gemfile ()
@@ -91,20 +75,6 @@ install_plugin_gemfile()
91
75
ln -s " $PATH_TO_LDAPSYNC /config/Gemfile.travis" " $REDMINE_DIR /$PATH_TO_PLUGINS /redmine_ldap_sync/Gemfile"
92
76
}
93
77
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
-
108
78
prepare_redmine ()
109
79
{
110
80
setenv
@@ -118,7 +88,7 @@ prepare_redmine()
118
88
bundle exec rake redmine:load_default_data REDMINE_LANG=en $TRACE
119
89
120
90
trace ' Session token'
121
- bundle exec rake $GENERATE_SECRET $TRACE
91
+ bundle exec rake generate_secret_token $TRACE
122
92
123
93
popd 1> /dev/null
124
94
}
@@ -132,7 +102,7 @@ prepare_plugin()
132
102
ln -s $PATH_TO_LDAPSYNC /* $PATH_TO_PLUGINS /redmine_ldap_sync
133
103
134
104
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
136
106
137
107
popd 1> /dev/null
138
108
}
@@ -179,7 +149,7 @@ run_tests()
179
149
180
150
pushd $REDMINE_DIR 1> /dev/null
181
151
182
- if [ " $REDMINE " == " master" ] && [ " $RUBY_VERSION " == " 2.2.2 " ]; then
152
+ if [ " $REDMINE " == " master" ] && [ " $RUBY_VERSION " == " 2.2" ]; then
183
153
bundle exec rake redmine:plugins:ldap_sync:coveralls:test $TRACE
184
154
else
185
155
bundle exec rake redmine:plugins:ldap_sync:test $TRACE
@@ -194,15 +164,14 @@ test_uninstall()
194
164
195
165
pushd $REDMINE_DIR 1> /dev/null
196
166
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
198
168
199
169
popd 1> /dev/null
200
170
}
201
171
202
172
case " $1 " in
203
173
" clone_redmine" ) shift ; clone_redmine $@ ;;
204
174
" install_plugin_gemfile" ) shift ; install_plugin_gemfile $@ ;;
205
- " bundle_install" ) shift ; bundle_install $@ ;;
206
175
" prepare_redmine" ) shift ; prepare_redmine $@ ;;
207
176
" prepare_plugin" ) shift ; prepare_plugin $@ ;;
208
177
" start_ldap" ) shift ; start_ldap $@ ;;
0 commit comments