[go: up one dir, main page]

File: test-rails3.sh

package info (click to toggle)
unicorn 4.3.1-4
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 1,828 kB
  • sloc: ruby: 8,393; ansic: 3,931; sh: 2,062; makefile: 4
file content (27 lines) | stat: -rw-r--r-- 591 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
. ./test-lib.sh
RAILS_VERSION=${RAILS_VERSION-3.0.0}
case $RUBY_VERSION in
1.8.7|1.9.2) ;;
*)
	t_info "RUBY_VERSION=$RUBY_VERSION unsupported for Rails 3"
	exit 0
	;;
esac

arch_gems=../tmp/isolate/ruby-$RUBY_VERSION/gems
rails_gems=../tmp/isolate/rails-$RAILS_VERSION/gems
rails_bin="$rails_gems/rails-$RAILS_VERSION/bin/rails"
if ! test -d "$arch_gems" || ! test -d "$rails_gems" || ! test -x "$rails_bin"
then
	( cd ../ && ./script/isolate_for_tests )
fi

for i in $arch_gems/*-* $rails_gems/*-*
do
	if test -d $i/lib
	then
		RUBYLIB=$(cd $i/lib && pwd):$RUBYLIB
	fi
done

export RUBYLIB