class Schienenzeppelin::AppGenerator

Public Class Methods

banner() click to toggle source
new(*args) click to toggle source
Calls superclass method
# File lib/schienenzeppelin/app_generator.rb, line 12
def initialize(*args)
  super

  return unless options[:api]

  self.options = options.merge(
    skip_errors: true,
    skip_high_voltage: true,
    skip_stimulus: true,
    skip_tailwind: true,
    skip_views: true
  ).freeze
end

Public Instance Methods

after_install() click to toggle source
# File lib/schienenzeppelin/app_generator.rb, line 62
def after_install
  add(:tailwind, :stimulus, :stimulus_components)
  add(:devise)
  add(:capistrano)
end
create_root_files() click to toggle source
Calls superclass method
# File lib/schienenzeppelin/app_generator.rb, line 26
def create_root_files
  super

  add(:irbrc)
  add(:foreman)
  add(:dotenv)
  add(:docker)
  add(:docker_compose)
  add(:rubocop)
end
create_test_files() click to toggle source
Calls superclass method
# File lib/schienenzeppelin/app_generator.rb, line 37
def create_test_files
  return if options[:skip_test]

  super if options[:testing_framework] == 'minitest'

  add(:rspec) if options[:testing_framework] == 'rspec'
end
finish_template() click to toggle source
Calls superclass method
# File lib/schienenzeppelin/app_generator.rb, line 45
def finish_template
  super
  # These require the presence of config/controllers, so they must be done after everything else
  add(:annotate)
  add(:continuous_integration)
  add(:high_voltage)
  add(:generators)
  add(:lograge)
  add(:pundit)
  add(:services)
  add(:sidekiq)
  add(:views, :errors, :scaffold)

  add(:factory_bot)
  add(:shoulda)
end
uses?(addon) click to toggle source
# File lib/schienenzeppelin/app_generator.rb, line 69
def uses?(addon)
  return false if options["skip_#{addon}".to_sym]

  addon = AddOn.get(addon)
  Dependencies.new(addon, context).satisfied?
end

Protected Instance Methods

get_builder_class() click to toggle source
# File lib/schienenzeppelin/app_generator.rb, line 83
def get_builder_class
  Schienenzeppelin::AppBuilder
end