Class: MobileWorkflowCli::AppGenerator

Inherits:
Rails::Generators::AppGenerator
  • Object
show all
Defined in:
lib/mobile_workflow_cli/app_generator.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details



26
27
28
# File 'lib/mobile_workflow_cli/app_generator.rb', line 26

def self.banner
  "mwf <directory> <OpenAPI Spec file path> [options]"
end

Instance Method Details

#finish_templateObject



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/mobile_workflow_cli/app_generator.rb', line 30

def finish_template
  super
  after_bundle do
    run "spring stop"
    build :procfiles
    build :rspec_generator
    build :ability_generator
    build :active_storage if options[:s3_storage] 
    build :mobile_workflow_generator, ARGV[1]
    setup_db
    generate_administrate
    
    generate_dot_env
    initial_git_commit
    
    build :heroku if options[:heroku]
    build :dokku, options[:dokku_host] if options[:dokku]
    build :s3_backend, options[:aws_region] if options[:s3_storage]
  end
end