Class: Pah::Templates::Generator

Inherits:
Pah::Template
  • Object
show all
Defined in:
lib/pah/templates/generators.rb

Instance Method Summary collapse

Methods inherited from Pah::Template

#ask_unless_test, #copy_static_file, #git_commit, #static_files, #will_you_like_to?

Instance Method Details

#callObject



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/pah/templates/generators.rb', line 4

def call
  generators = "\n    # Do not generate specs for views and requests. Also, do not generate assets.\n    config.generators do |g|\ng.helper false\ng.view_specs false\ng.assets false\ng.integration_tool false\n    end\n    config.app_generators do |g|\ng.test_framework :rspec\n    end\n\n    # Prevent initializing your application and connect to the database on assets precompile.\n    config.assets.initialize_on_precompile = false\n"

  inject_into_file 'config/application.rb', generators, after: 'Rails::Application', verbose: false

  git add: 'config/application.rb'
  git_commit 'Add generators.'
end