-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
/
sandbox.sh
executable file
·38 lines (33 loc) · 770 Bytes
/
sandbox.sh
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
28
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
# Used in the sandbox rake task in Rakefile
case "$DB" in
postgres|postgresql)
RAILSDB="postgresql"
;;
mysql)
RAILSDB="mysql"
;;
*)
RAILSDB="sqlite3"
;;
esac
rm -rf ./sandbox
bundle exec rails new sandbox --skip-bundle --database="$RAILSDB"
if [ ! -d "sandbox" ]; then
echo 'sandbox rails application failed'
exit 1
fi
cd ./sandbox
echo "gem 'solidus', :path => '..'" >> Gemfile
echo "gem 'solidus_auth_devise'" >> Gemfile
cat <<RUBY >> Gemfile
group :test, :development do
platforms :mri do
gem 'pry-byebug'
end
end
RUBY
bundle install --gemfile Gemfile
bundle exec rake db:drop db:create
bundle exec rails g spree:install --auto-accept --user_class=Spree::User --enforce_available_locales=true
bundle exec rails g solidus:auth:install