File: test-against-specific-rails-version.sh

package info (click to toggle)
ruby-feature 1.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 184 kB
  • sloc: ruby: 760; sh: 20; makefile: 9
file content (27 lines) | stat: -rwxr-xr-x 444 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

set -e

export BUNDLE_GEMFILE=gemfiles/rails${RAILS_VERSION}.gemfile

TESTAPP_NAME=testapp

if [ -d $TESTAPP_NAME ]; then
  rm -Rf $TESTAPP_NAME
fi

bundle install
bundle exec rails new $TESTAPP_NAME --skip-bundle

unset BUNDLE_GEMFILE

echo  "gem 'feature', path: '../../../..'" >> $TESTAPP_NAME/Gemfile

cd $TESTAPP_NAME

bundle install
bundle exec rails g feature:install
bundle exec rake db:migrate

cd ..
rm -Rf $TESTAPP_NAME