Sha256: b1d9b54dea44f042921e85379141ae1b280d922b8ced72a2871153bf6fb36bd4
Contents?: true
Size: 1.41 KB
Versions: 1
Compression:
Stored size: 1.41 KB
Contents
require 'bundler' require "rails/generators" require "rails/generators/rails/app/app_generator" module Flame module Generators class App < Rails::Generators::AppGenerator hide! def finish_template invoke :custom_template invoke :generators super end def custom_template build :configure_generators end def generators run "spring stop > /dev/null 2>&1 || true" template "Gemfile.erb", "Gemfile", force: true Bundler.with_unbundled_env { run "bundle install" } invoke "flame:haml" rails_command "db:create" invoke "flame:testing" invoke "flame:cors" invoke "flame:devise" invoke "flame:vite" if yes?("\nDo you want to run migrations? [y/n]") rails_command("db:migrate") generate("annotate:install") end rails_command("db:seed") if yes?("\nDo you want to run seed? [y/n]") template("rubocop.yml", ".rubocop.yml") template("solargraph.yml", ".solargraph.yml") run("bundle exec standardrb --fix-unsafely") welcome_message exit 0 end protected def welcome_message say "Flame app successfully created!", :green say "Run `foreman start -f Procfile.dev` to start the server", :green end def get_builder_class Flame::AppBuilder end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flamerb-0.3.0 | lib/flame/generators/app.rb |