Sha256: f3ad5b20e873b782577747eb13580425984dcb9dc6cd74e5e28cb75c3e9694d7
Contents?: true
Size: 941 Bytes
Versions: 5
Compression:
Stored size: 941 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-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 bin/rails webpacker:install 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
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
opal-rails-2.0.4 | bin/sandbox |
opal-rails-2.0.3 | bin/sandbox |
opal-rails-2.0.2 | bin/sandbox |
opal-rails-2.0.1 | bin/sandbox |
opal-rails-2.0.0 | bin/sandbox |