Method: Jets::Generator#config

Defined in:
lib/jets/generator.rb

#configObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/jets/generator.rb', line 23

def config
  g = Rails::Configuration::Generators.new
  g.orm             :active_record, migration: true, timestamps: true
  # TODO: support g.orm :dynamodb
  g.test_framework  false #:test_unit, fixture: false
  # g.test_framework :rspec # need to
  # TODO: load rspec configuration to use rspec
  g.stylesheets     false
  g.javascripts     false
  g.assets          false
  if Jets.config.mode == 'api'
    g.api_only = true
    g.template_engine nil
  else
    g.template_engine :erb
  end
  g.resource_route  true
  g.templates.unshift(template_paths)
  g
end