public
Description: The source code of http://usericons.relucks.org/
Homepage: http://usericons.relucks.org/
Clone URL: git://github.com/swdyh/usericons.relucks.org.git
Click here to lend your support to: usericons.relucks.org and make a donation at www.pledgie.com !
100644 44 lines (33 sloc) 0.924 kb
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
require 'rubygems'
require 'rake/clean'
require 'fileutils'
 
REMOTE_HOST = 'relucks.org'
 
task :default => :test
 
desc 'Run specs with story style output'
task :spec do
  sh 'specrb --specdox -Ilib:test test/*_test.rb'
end
 
desc 'Run specs with unit test style output'
task :test => FileList['test/*_test.rb'] do |t|
  suite = t.prerequisites.map{|f| "-r#{f.chomp('.rb')}"}.join(' ')
  sh "ruby -Ilib:test #{suite} -e ''", :verbose => false
end
 
desc 'update siteinfo.json'
task :update_siteinfo do
  load 'update.rb'
end
 
namespace :remote do
  desc 'update usericons.relucks.org'
  task :update do
    sh "ssh #{REMOTE_HOST} 'cd www/usericons.relucks.org/ && git pull && sudo /etc/init.d/apache2 restart'"
  end
 
  desc 'passenger-memory-stats'
  task :pmem do
    sh "ssh #{REMOTE_HOST} passenger-memory-stats"
  end
 
  desc 'free -m'
  task :free do
    sh "ssh #{REMOTE_HOST} free -m"
  end
end
 
CLEAN.include 'tmp/*'