Commit 8e3a2def8af612689ddc830a3eab9e463b8bc205
1 parent
d656cb74
Exists in
master
and in
4 other branches
Project /lib cleanup
Showing
4 changed files
with
0 additions
and
74 deletions
Show diff stats
lib/color.rb
... | ... | @@ -1,31 +0,0 @@ |
1 | -module Color | |
2 | - extend self | |
3 | - | |
4 | - def colorize(text, color_code) | |
5 | - "\033[#{color_code}#{text}\033[0m" | |
6 | - end | |
7 | - | |
8 | - def red(text) | |
9 | - colorize(text, "31m") | |
10 | - end | |
11 | - | |
12 | - def green(text) | |
13 | - colorize(text, "32m") | |
14 | - end | |
15 | - | |
16 | - def yellow(text) | |
17 | - colorize(text, "93m") | |
18 | - end | |
19 | - | |
20 | - def command(string) | |
21 | - `#{string}` | |
22 | - if $?.to_i > 0 | |
23 | - puts red " == #{string} - FAIL" | |
24 | - puts red " == Error during configure" | |
25 | - exit | |
26 | - else | |
27 | - puts green " == #{string} - OK" | |
28 | - end | |
29 | - end | |
30 | -end | |
31 | - |
lib/tasks/dev/repo.rake
... | ... | @@ -1,26 +0,0 @@ |
1 | -namespace :dev do | |
2 | - desc "Prepare for development (run dev_user.sh first)" | |
3 | - task :repos => :environment do | |
4 | - key = `sudo -u gitlabdev -H cat /home/gitlabdev/.ssh/id_rsa.pub` | |
5 | - raise "\n *** Run ./lib/tasks/dev/user.sh first *** \n" if key.empty? | |
6 | - Key.create(:user_id => User.first, :key => key, :title => "gitlabdev") | |
7 | - | |
8 | - puts "\n *** Clone diaspora from github" | |
9 | - `sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/diaspora/diaspora.git /home/gitlabdev/diaspora"` | |
10 | - | |
11 | - puts "\n *** Push diaspora source to gitlab" | |
12 | - `sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/diaspora; git remote add local git@localhost:diaspora.git; git push local master; git push local --tags; git checkout -b api origin/api; git push local api; git checkout -b heroku origin/heroku; git push local heroku"` | |
13 | - | |
14 | - puts "\n *** Clone rails from github" | |
15 | - `sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/rails/rails.git /home/gitlabdev/rails"` | |
16 | - | |
17 | - puts "\n *** Push rails source to gitlab" | |
18 | - `sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/rails; git remote add local git@localhost:ruby_on_rails.git; git push local master; git push local --tags"` | |
19 | - | |
20 | - puts "\n *** Clone rubinius from github" | |
21 | - `sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/rubinius/rubinius.git /home/gitlabdev/rubinius"` | |
22 | - | |
23 | - puts "\n *** Push rubinius source to gitlab" | |
24 | - `sudo -u gitlabdev -H sh -c "cd /home/gitlabdev/rubinius; git remote add local git@localhost:rubinius.git; git push local master; git push local --tags"` | |
25 | - end | |
26 | -end |
lib/tasks/dev/tests.rake
... | ... | @@ -1,10 +0,0 @@ |
1 | -namespace :dev do | |
2 | - desc "DEV | Run cucumber and rspec" | |
3 | - task :tests do | |
4 | - ["cucumber", "rspec spec"].each do |cmd| | |
5 | - puts "Starting to run #{cmd}..." | |
6 | - system("export DISPLAY=:99.0 && bundle exec #{cmd}") | |
7 | - raise "#{cmd} failed!" unless $?.exitstatus == 0 | |
8 | - end | |
9 | - end | |
10 | -end |