-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.rb
67 lines (49 loc) · 1.3 KB
/
template.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
def source_paths
[File.join(__dir__, 'files')]
end
copy_file 'Brewfile'
gem_group :development, :test do
# help identify and catch n+1 queries
# gem 'bullet'
gem 'factory_bot_rails'
gem 'faker'
gem 'rubocop', '~> 0.64.0', require: false
gem 'rubocop-rspec', require: false
end
gem_group :development, :test do
gem 'rspec-rails', '~> 3.8'
end
after_bundle do
run "spring stop"
generate 'rspec:install'
end
gem 'bugsnag'
gem 'puma'
gem 'dotenv-rails'
copy_file '.env.example'
run 'cp .env.example .env'
copy_file 'docker-compose.yml'
template 'config/database.yml.erb', 'config/database.yml'
%w(bootstrap console serve setup test update).each do |script_name|
copy_file "script/#{script_name}"
run "chmod +x script/#{script_name}"
end
after_bundle do
generate :controller, "home index --no-view-specs --no-helper-specs --skip-routes --no-helper --test-framework=rspec"
route "root to: 'home#index'"
end
gem 'devise'
after_bundle do
generate 'devise:install'
environment(
'config.action_mailer.default_url_options = {host: "localhost", port: 3000}',
env: 'development'
)
generate :devise, "User"
end
template 'README.md.erb', 'README.md'
copy_file 'docs/README.md'
template '.rubocop.yml.erb', '.rubocop.yml'
after_bundle do
run 'bundle exec rubocop --auto-correct'
end