Class: Scoby::AppGenerator

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

Instance Method Summary collapse

Instance Method Details

#configure_generatorsObject



53
54
55
56
# File 'lib/scoby/generators/app_generator.rb', line 53

def configure_generators
  say "Configuring generators"
  build :configure_generators
end

#customize_gemfileObject



41
42
43
44
# File 'lib/scoby/generators/app_generator.rb', line 41

def customize_gemfile
  build :set_ruby_to_version_being_used
  bundle_command 'install'
end

#finish_templateObject



27
28
29
30
# File 'lib/scoby/generators/app_generator.rb', line 27

def finish_template
  invoke :scoby_customization
  super
end

#outroObject



84
85
86
# File 'lib/scoby/generators/app_generator.rb', line 84

def outro
  say "G8! You're primed and ready to go!"
end

#scoby_customizationObject



32
33
34
35
36
37
38
39
# File 'lib/scoby/generators/app_generator.rb', line 32

def scoby_customization
  invoke :customize_gemfile
  invoke :setup_template_view_structure
  invoke :configure_generators
  invoke :setup_test_environment
  invoke :setup_dotfiles
  invoke :outro
end

#setup_dotfilesObject

def setup_flux? redux?

say "Setting up React"
# TODO

end



80
81
82
# File 'lib/scoby/generators/app_generator.rb', line 80

def setup_dotfiles
  build :copy_dotfiles
end

#setup_template_view_structureObject



46
47
48
49
50
51
# File 'lib/scoby/generators/app_generator.rb', line 46

def setup_template_view_structure
  say "Setting up template/view structure"
  build :create_templates_directory
  build :remove_layout_from_views
  build :support_templates_and_views_in_application_rb
end

#setup_test_environmentObject



58
59
60
61
62
63
64
65
66
67
68
# File 'lib/scoby/generators/app_generator.rb', line 58

def setup_test_environment
  say "Setting up test environment"
  build :setup_factory_girl_for_rspec
  build :generate_rspec
  build :configure_rspec
  build :configure_database_cleaner_in_specs
  build :configure_shoulda_matchers_in_specs
  build :configure_action_mailer_in_specs
  build :configure_simple_cov_in_specs
  build :setup_default_rspec_directories
end