Sha256: 3bf35f4e7070d2f7b02ef9bcd018a823a03b7367a06b207af2816e35d861e24b
Contents?: true
Size: 1.51 KB
Versions: 3
Compression:
Stored size: 1.51 KB
Contents
#!/usr/bin/env bash set -e case "$DB" in postgres|postgresql) RAILSDB="postgresql" ;; mysql) RAILSDB="mysql" ;; sqlite|'') RAILSDB="sqlite3" ;; *) echo "Invalid DB specified: $DB" exit 1 ;; esac if [ ! -z $SOLIDUS_BRANCH ] then BRANCH=$SOLIDUS_BRANCH else BRANCH="main" fi extension_name="solidus_braintree" # Stay away from the bundler env of the containing extension. function unbundled { ruby -rbundler -e'b = proc {system *ARGV}; Bundler.respond_to?(:with_unbundled_env) ? Bundler.with_unbundled_env(&b) : Bundler.with_clean_env(&b)' -- "$@" } rm -rf ./sandbox rails new sandbox \ --database="$RAILSDB" \ --skip-git \ --skip-keeps \ --skip-rc \ --skip-bootsnap \ --skip-test if [ ! -d "sandbox" ]; then echo 'sandbox rails application failed' exit 1 fi cd ./sandbox unbundled bundle add solidus --github solidusio/solidus --branch "${BRANCH:-main}" --version '> 0.a' unbundled bundle exec rake db:drop db:create unbundled bundle exec rails generate solidus:install --payment-method=none --auto-accept "$@" unbundled bundle add ${extension_name} --path '../' unbundled bundle exec rails generate ${extension_name}:install --frontend=starter --migrate=true echo echo "🚀 Sandbox app successfully created for ${extension_name}!" echo "🚀 Using $RAILSDB and Solidus $BRANCH" echo "🚀 Use 'export DB=[postgres|mysql|sqlite]' to control the DB adapter" echo "🚀 Use 'export SOLIDUS_BRANCH=<BRANCH-NAME>' to control the Solidus version" echo "🚀 This app is intended for test purposes."
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
solidus_braintree-3.3.0 | bin/sandbox |
solidus_braintree-3.2.0 | bin/sandbox |
solidus_braintree-3.1.0 | bin/sandbox |