Class: RiderKick::CleanArchGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/rider_kick/clean_arch_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_gem_dependenciesObject



11
12
13
14
# File 'lib/generators/rider_kick/clean_arch_generator.rb', line 11

def create_gem_dependencies
  append_to_file('Gemfile', gem_dependencies)
  say 'Gems added to Gemfile', :green
end

#setup_configurationObject



16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/generators/rider_kick/clean_arch_generator.rb', line 16

def setup_configuration
  setup_domain_structure

  setup_initializers
  setup_dotenv
  setup_gitignore
  setup_rubocop
  setup_init_migration
  setup_models
  setup_active_storage
  setup_rspec
  setup_readme
end

#validate_setup_optionObject

Raises:

  • (Thor::Error)


7
8
9
# File 'lib/generators/rider_kick/clean_arch_generator.rb', line 7

def validate_setup_option
  raise Thor::Error, 'The --setup option must be specified to create the domain structure.' unless options.setup
end