-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.rb
92 lines (78 loc) · 1.87 KB
/
setup.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
if yes?('Run scripts from github.com?')
@remote = true
apply("http://github.com/blahutka/rails-templates/raw/master/template_helper.rb")
else
inside destination_root do
apply(File.join(File.dirname(__FILE__), 'template_helper.rb'))
end
end
initialize_templater
if yes?('New app setup? (public clean, git setup)')
load_template 'basic.rb'
end
if yes?('Databases?: ')
if yes?('MongoDB?: ')
load_template 'db/mongo.rb'
end
if yes?('Postgres?: ')
load_template 'db/postgres.rb'
end
end
if yes?('Plugins?')
if yes?('Plugin: WillPaginate')
load_template 'plugin/will_paginate.rb'
end
if yes?('Plugin: SimpleForms')
load_template 'plugin/simple_forms.rb'
end
if yes?('Plugin: InheritedResources')
load_template 'plugin/inherited_resources.rb'
end
if yes?('Plugin: InheritedResourcesViews')
load_template 'plugin/inherited_resources_views.rb'
end
if yes?('Plugin rails_admin')
load_template 'plugin/rails_admin.rb'
end
end
if yes?('Permissions?:')
if yes?('Device, CenCan, Mongoid')
load_template 'permission/cream.rb'
end
end
if yes?('Javascripts?')
if yes?('jQuery?')
load_template 'javascript/jquery.rb'
end
if yes?('Jelly Pivotal')
load_template 'javascript/jelly.rb'
end
end
if yes?('Stylesheets')
if yes?('Compass ruby stylesheet tools')
load_template 'stylesheet/compass.rb'
end
if yes?('Elastic css framework')
load_template 'stylesheet/elastic.rb'
end
end
if yes?('Testing?')
if yes?('Rspec, Cucumber')
load_template 'testing/rspec.rb'
end
end
if yes?('Debugging?')
if yes?('console default ?')
load_template 'debugging/console.rb'
end
end
if yes? 'RUN ALL? :'
in_root do
gsub_file 'Gemfile', /gem "".*/, '' #remove empty gem
run 'bundle install'
#run 'bundle update'
end
if yes? 'now run BUNDEL INSTALL then continue :'
execute_stategies
end
end