@@ -5,43 +5,45 @@ test -z "${DEBUG+empty_string}" || set -x
55
66test " $DB " = " sqlite" && export DB=" sqlite3"
77
8- if [ -z " $SOLIDUS_BRANCH " ]
8+ if [ -z " $PAYMENT_METHOD " ]
99then
10- echo " ~~> Use 'export SOLIDUS_BRANCH=[main|v3.2|...]' to control the Solidus branch"
11- SOLIDUS_BRANCH=" main"
10+ PAYMENT_METHOD=" none"
1211fi
13- echo " ~~> Using branch $SOLIDUS_BRANCH of solidus"
1412
15- if [ -z " $SOLIDUS_FRONTEND " ]
13+ if [ -z " $SOLIDUS_BRANCH " ]
1614then
17- echo " ~~> Use 'export SOLIDUS_FRONTEND=[solidus_frontend|solidus_starter_frontend ]' to control the Solidus frontend "
18- SOLIDUS_FRONTEND= " solidus_frontend "
15+ echo " ~~> Use 'export SOLIDUS_BRANCH=[main|v4.0|... ]' to control the Solidus branch "
16+ SOLIDUS_BRANCH= " main "
1917fi
20- echo " ~~> Using branch $SOLIDUS_FRONTEND as the solidus frontend "
18+ echo " ~~> Using branch $SOLIDUS_BRANCH of solidus"
2119
2220extension_name=" <%= file_name %>"
2321
2422# Stay away from the bundler env of the containing extension.
2523function unbundled {
26- ruby -rbundler -e' b = proc {system *ARGV}; Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&b) : Bundler.with_clean_env(&b)' -- $@
24+ ruby -rbundler -e'
25+ Bundler.with_unbundled_env {system *ARGV}' -- \
26+ env BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES=true $@
2727}
2828
29+ echo " ~~~> Removing the old sandbox"
2930rm -rf ./sandbox
30- unbundled bundle exec rails new sandbox \
31+
32+ echo " ~~~> Creating a pristine Rails app"
33+ rails new sandbox \
3134 --database=" ${DB:- sqlite3} " \
32- --skip-bundle \
3335 --skip-git \
3436 --skip-keeps \
3537 --skip-rc \
36- --skip-spring \
37- --skip-test \
38- --skip-javascript
38+ --skip-bootsnap \
39+ --skip-test
3940
4041if [ ! -d " sandbox" ]; then
4142 echo ' sandbox rails application failed'
4243 exit 1
4344fi
4445
46+ echo " ~~~> Adding solidus (with i18n) to the Gemfile"
4547cd ./sandbox
4648cat << RUBY >> Gemfile
4749gem ' solidus' , github: ' solidusio/solidus' , branch: ' $SOLIDUS_BRANCH'
@@ -63,11 +65,6 @@ unbundled bundle exec rake db:drop db:create
6365
6466unbundled bundle exec rails generate solidus:install \
6567 --auto-accept \
66- --user_class=Spree::User \
67- --enforce_available_locales=true \
68- --with-authentication=< %= file_name ! = ' solidus_auth_devise' %> \
69- --payment-method=none \
70- --frontend=${SOLIDUS_FRONTEND} \
7168 $@
7269
7370unbundled bundle exec rails generate solidus:auth:install --auto-run-migrations
0 commit comments