Sha256: cf7230851d910c9ac9725c8b1da1452902a21de5b99dd6b3ac333f58becf9830
Contents?: true
Size: 970 Bytes
Versions: 4
Compression:
Stored size: 970 Bytes
Contents
#!/usr/bin/env bash gem_name="$(ruby -rpathname -e"puts Pathname(ARGV.first).join('../..').expand_path.glob('*.gemspec').first.basename('.gemspec')" -- $0)" # 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 unbundled bundle exec rails new sandbox \ --skip-bundle \ --skip-git \ --skip-javascript \ --skip-keeps \ --skip-rc \ --skip-spring \ --skip-test \ $@ if [ ! -d "sandbox" ]; then echo 'sandbox rails application failed' exit 1 fi cd ./sandbox cat <<RUBY >> Gemfile gem '$gem_name', path: '..' RUBY unbundled bundle install --gemfile Gemfile unbundled bundle exec rake db:drop db:create cd .. # Back to the project root. bin/sandbox-setup # Run any custom setup. echo echo "🚀 Sandbox app successfully created for $gem_name!"
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
deface-1.7.0 | bin/sandbox |
deface-1.6.2 | bin/sandbox |
deface-1.6.1 | bin/sandbox |
deface-1.6.0 | bin/sandbox |