-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_initialize.rb
35 lines (33 loc) · 1.02 KB
/
test_initialize.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
#----------------------------------------------------------------------------
# Gems
#----------------------------------------------------------------------------
puts "=" * 80
puts "Setup Gemfile"
puts "=" * 80
remove_file "Gemfile"
create_file "Gemfile"
gem 'faker'
#----------------------------------------------------------------------------
# Setup RVM
#----------------------------------------------------------------------------
which_ruby = ask("Which rvm Ruby do you want to use?\r\n\r\n=>")
puts "=" * 80
puts "Setup RVM"
puts "=" * 80
run "rvm use #{which_ruby}"
run "rvm gemset create #{app_name}"
create_file ".rvmrc", <<-RVM
rvm use #{which_ruby}@#{app_name}
RVM
#----------------------------------------------------------------------------
# Bundle Gems
#----------------------------------------------------------------------------
puts "=" * 80
puts "Bundle Gems"
puts "=" * 80
run "rvm use #{which_ruby}@#{app_name}"
run "rvmsudo gem install rake"
run "rvmsudo gem install bundler"
inside app_name do
run "bundle install"
end