This repository was archived by the owner on Mar 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.rb
More file actions
50 lines (34 loc) · 1.34 KB
/
template.rb
File metadata and controls
50 lines (34 loc) · 1.34 KB
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
# >----------------------------[ Initial Setup ]------------------------------<
git clone: 'git@github.com:e-lam/RailsTemplate.git'
initializer 'generators.rb', <<-RUBY
Rails.application.config.generators do |g|
end
RUBY
require destination_root.to_s + '/RailsTemplate/lib/helpers'
# Add Ruby Version for rbenv
file '.ruby-version', <<-CODE
2.2.0
CODE
def source_paths
# File.expand_path(File.dirname(__FILE__)),
[destination_root.to_s + '/RailsTemplate/']
end
# >----------------------------[ Gems ]------------------------------<
apply destination_root.to_s + '/RailsTemplate/lib/gems.rb'
# >-----------------------------[ Procfile ]-------------------------------<
file 'Procfile', <<-BASH
web: bundle exec puma -C config/puma.rb
BASH
# >-----------------------------[ Buildpacks 4 Heroku ]-------------------------------<
file '.buildpacks', <<-BASH
https://github.com/heroku/heroku-buildpack-nodejs.git
https://github.com/heroku/heroku-buildpack-ruby.git
BASH
# >---------------------------------[ Load all Recipes ]---------------------------------<
Dir[destination_root.to_s + '/RailsTemplate/recipes/*.rb'].each do |file|
say_recipe File.basename(file, File.extname(file))
apply file
end
# >---------------------------------[ Post-Recipes ]---------------------------------<
rake 'db:migrate'
remove_dir destination_root.to_s + '/RailsTemplate'