Class: Pu::Saas::SetupGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
PlutoniumGenerators::Generator
Defined in:
lib/generators/pu/saas/setup_generator.rb

Instance Method Summary collapse

Methods included from PlutoniumGenerators::Generator

derive_association_name, find_shared_namespace, included

Methods included from PlutoniumGenerators::Concerns::Logger

#debug, #error, #exception, #info, #success, #warn

Methods included from PlutoniumGenerators::Concerns::Config

#read_config, #write_config

Instance Method Details

#startObject



61
62
63
64
65
66
67
68
69
70
71
72
73
# File 'lib/generators/pu/saas/setup_generator.rb', line 61

def start
  ensure_rodauth_installed
  generate_user
  generate_entity unless options[:skip_entity]
  generate_membership unless options[:skip_membership]
  generate_portal if options[:portal] && !options[:skip_entity]
  generate_profile if options[:profile]
  generate_welcome if options[:welcome] && !options[:skip_entity] && options[:portal]
  generate_invites if options[:invites] && !options[:skip_entity] && !options[:skip_membership]
  generate_api_client if options[:api_client].present?
rescue => e
  exception "#{self.class} failed:", e
end