Project /lib cleanup
This commit is contained in:
parent
d656cb74f7
commit
8e3a2def8a
4 changed files with 0 additions and 74 deletions
31
lib/color.rb
31
lib/color.rb
|
@ -1,31 +0,0 @@
|
|||
module Color
|
||||
extend self
|
||||
|
||||
def colorize(text, color_code)
|
||||
"\033[#{color_code}#{text}\033[0m"
|
||||
end
|
||||
|
||||
def red(text)
|
||||
colorize(text, "31m")
|
||||
end
|
||||
|
||||
def green(text)
|
||||
colorize(text, "32m")
|
||||
end
|
||||
|
||||
def yellow(text)
|
||||
colorize(text, "93m")
|
||||
end
|
||||
|
||||
def command(string)
|
||||
`#{string}`
|
||||
if $?.to_i > 0
|
||||
puts red " == #{string} - FAIL"
|
||||
puts red " == Error during configure"
|
||||
exit
|
||||
else
|
||||
puts green " == #{string} - OK"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
namespace :dev do
|
||||
desc "Prepare for development (run dev_user.sh first)"
|
||||
task :repos => :environment do
|
||||
key = `sudo -u gitlabdev -H cat /home/gitlabdev/.ssh/id_rsa.pub`
|
||||
raise "\n *** Run ./lib/tasks/dev/user.sh first *** \n" if key.empty?
|
||||
Key.create(:user_id => User.first, :key => key, :title => "gitlabdev")
|
||||
|
||||
puts "\n *** Clone diaspora from github"
|
||||
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/diaspora/diaspora.git /home/gitlabdev/diaspora"`
|
||||
|
||||
puts "\n *** Push diaspora source to gitlab"
|
||||
`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"`
|
||||
|
||||
puts "\n *** Clone rails from github"
|
||||
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/rails/rails.git /home/gitlabdev/rails"`
|
||||
|
||||
puts "\n *** Push rails source to gitlab"
|
||||
`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"`
|
||||
|
||||
puts "\n *** Clone rubinius from github"
|
||||
`sudo -u gitlabdev -H sh -c "cd /home/gitlabdev; git clone git://github.com/rubinius/rubinius.git /home/gitlabdev/rubinius"`
|
||||
|
||||
puts "\n *** Push rubinius source to gitlab"
|
||||
`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"`
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
namespace :dev do
|
||||
desc "DEV | Run cucumber and rspec"
|
||||
task :tests do
|
||||
["cucumber", "rspec spec"].each do |cmd|
|
||||
puts "Starting to run #{cmd}..."
|
||||
system("export DISPLAY=:99.0 && bundle exec #{cmd}")
|
||||
raise "#{cmd} failed!" unless $?.exitstatus == 0
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,7 +0,0 @@
|
|||
sudo adduser \
|
||||
--gecos 'gitlab dev user' \
|
||||
--disabled-password \
|
||||
--home /home/gitlabdev \
|
||||
gitlabdev
|
||||
|
||||
sudo -i -u gitlabdev -H sh -c "ssh-keygen -t rsa"
|
Loading…
Add table
Reference in a new issue