Skip to content

Commit

Permalink
Update setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhardikjoshi committed Jan 12, 2024
1 parent cc846ac commit d568973
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions e2e_tests/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,25 @@ else
sed 's/.*gem '"'"'activegraph'"'"'.*/gem '"'"'activegraph'"'"', github: "neo4jrb\/activegraph", ref: "'"$(git rev-parse "$GITHUB_SHA")"'"/' docs/activegraph.rb > template.tmp
fi
rails _7.1.2_ new myapp -O -m ./template.tmp
rm -f ./template.tmp
cd myapp

if [[ -n "$E2E_PORT" ]]
then
sed 's/7687/'$E2E_PORT'/' config/environments/development.rb > dev_env.tmp
mv dev_env.tmp config/environments/development.rb
fi

if [[ -n "$E2E_NO_CRED" ]]
then
sed "s/'neo4j'/''/" config/environments/development.rb > dev_env.tmp
mv dev_env.tmp config/environments/development.rb
sed "s/'password'/''/" config/environments/development.rb > dev_env.tmp
mv dev_env.tmp config/environments/development.rb
fi

bundle exec rails generate model User name:string
bundle exec rails generate migration BlahMigration
bundle exec rake neo4j:migrate
if echo 'puts "hi"' | bundle exec rails c
then
Expand All @@ -21,5 +38,3 @@ fi
bundle exec rails s -d
while [ $((curl localhost:3000/ > /dev/null 2>&1); echo $?) -ne 0 ]; do sleep 1; done
kill `cat tmp/pids/server.pid`

0 comments on commit d568973

Please sign in to comment.