-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.rb
104 lines (83 loc) · 1.89 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Don't give me your garbage, Rails
def coffee_gemfile_entry ; end
def create_test_files ; end
def database_gemfile_entry ; end
def javascript_gemfile_entry ; end
def run_bundle ; end
# I'll bring my own, thanks
run "rm Gemfile"
file "Gemfile", <<-Gemfile
source 'https://rubygems.org'
ruby '2.0.0'
#{rails_gemfile_entry.map {|gem| "gem '#{gem.name}', '#{gem.version}'#{"\n# #{gem.comment}" if gem.comment}" }.join("\n") }
gem 'bcrypt'
gem 'slim-rails'
gem 'pg'
# Assets
gem 'bourbon'
gem 'jquery-rails'
gem 'sass-rails'
gem 'uglifier'
group :development do
gem 'mailcatcher', require: false
end
group :development, :test do
gem 'fabrication'
gem 'faker'
gem 'launchy'
gem 'pry-rails'
gem 'rspec-rails'
end
group :test do
gem 'capybara', require: false
gem 'database_cleaner'
gem 'guard-spring'
gem 'poltergeist', require: 'capybara/poltergeist'
end
Gemfile
run "rm README.rdoc"
run "touch README.md"
run "rm -rf app/assets/stylesheets"
run "mkdir app/assets/fonts"
run "touch app/assets/fonts/.gitkeep"
run "cp -r #{File.dirname(__FILE__)}/src app/assets/stylesheets"
run "rm config/database.yml"
file "config/database.yml.sample", <<-DB
default: &default
adapter: postgresql
host: localhost
min_messages: warning
development:
<<: *default
database: #{app_name}_development
test:
<<: *default
database: #{app_name}_test
production:
<<: *default
database: #{app_name}_production
DB
run "rm .gitignore"
file ".gitignore", <<-Gitignore
.bundle
.DS_Store
*.swp
config/database.yml
log/*.log
public/assets
Procfile
tmp
Gitignore
file "Procfile.local", <<-Procfile
web: spring rails s
Procfile
file ".ruby-version", "2.0.0-p247"
run "rm -rf test/"
run "bundle install"
run "bundle exec guard init spring"
generate "rspec:install"
file "spec/support/capybara.rb", "require 'capybara'
require 'capybara/poltergeist'
Capybara.javascript_driver = :poltergeist"
git :init
git add: "."