Class: Generapp::AppBuilder
Overview
Rails app builder customizations
Instance Method Summary
collapse
#create_database, #use_postgres_config_template
#set_up_procfile, #set_up_version, #setup_default_rake_task
#create_application_layout, #create_humans_txt, #create_manifest, #create_shared_directory, #create_shared_flashes, #create_shared_head, #create_shared_javascripts
#configure_newrelic, #configure_rack_timeout
#configure_ci, #configure_coverage, #configure_rspec, #enable_database_cleaner, #enable_devise_tests, #generate_rspec, #provide_shoulda_matchers_config, #spec_folders
#add_bullet_gem_configuration, #add_rubocop, #add_secrets, #configure_generators, #generate_annotate, #provide_setup_script, #raise_on_delivery_errors
Instance Method Details
#gemfile ⇒ Object
24
25
26
|
# File 'lib/generapp/app_builder.rb', line 24
def gemfile
template 'Gemfile.erb', 'Gemfile'
end
|
#generate_spring_binstubs ⇒ Object
54
55
56
57
|
# File 'lib/generapp/app_builder.rb', line 54
def generate_spring_binstubs
return unless spring_install?
bundle_command 'exec spring binstub --all'
end
|
#gitignore ⇒ Object
20
21
22
|
# File 'lib/generapp/app_builder.rb', line 20
def gitignore
copy_file 'generapp_gitignore', '.gitignore'
end
|
#init_git ⇒ Object
38
39
40
|
# File 'lib/generapp/app_builder.rb', line 38
def init_git
git :init
end
|
#readme ⇒ Object
14
15
16
17
18
|
# File 'lib/generapp/app_builder.rb', line 14
def readme
template 'README.md.erb', 'README.md'
copy_file 'RELEASING.md', 'RELEASING.md'
copy_file 'CONTRIBUTING.md', 'CONTRIBUTING.md'
end
|
#set_ruby_version ⇒ Object
28
29
30
|
# File 'lib/generapp/app_builder.rb', line 28
def set_ruby_version
create_file '.ruby-version', "#{Generapp::RUBY_VERSION}\n"
end
|
#setup_bundler_audit ⇒ Object
42
43
44
45
46
|
# File 'lib/generapp/app_builder.rb', line 42
def setup_bundler_audit
copy_file 'tasks/bundler_audit.rake',
'lib/tasks/bundler_audit.rake'
append_file 'Rakefile', "\ntask default: 'bundler:audit'\n"
end
|
#setup_rubocop ⇒ Object
48
49
50
51
52
|
# File 'lib/generapp/app_builder.rb', line 48
def setup_rubocop
copy_file 'tasks/rubocop.rake',
'lib/tasks/rubocop.rake'
append_file 'Rakefile', "\ntask default: 'rubocop'\n"
end
|
#setup_stylesheets ⇒ Object
32
33
34
35
36
|
# File 'lib/generapp/app_builder.rb', line 32
def setup_stylesheets
remove_file 'app/assets/stylesheets/application.css'
copy_file 'application.scss',
'app/assets/stylesheets/application.scss'
end
|