-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathRakefile
109 lines (80 loc) · 1.82 KB
/
Rakefile
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/testtask'
RUFUS_SQS_VERSION = '0.8'
#
# GEM SPEC
spec = Gem::Specification.new do |s|
s.name = 'rufus-sqs'
s.version = RUFUS_SQS_VERSION
s.authors = [ 'John Mettraux' ]
s.email = '[email protected]'
s.homepage = 'http://rufus.rubyforge.org/rufus-sqs/'
s.platform = Gem::Platform::RUBY
s.summary = 'A Ruby gem for Amazon SQS'
#s.license = 'MIT'
s.description = %{A Ruby gem for Amazon SQS}
s.require_path = 'lib'
#s.autorequire = "rufus-decision"
s.test_file = 'test/test.rb'
s.has_rdoc = true
s.extra_rdoc_files = [ 'README.txt' ]
%w[ rufus-verbs ].each do |d|
s.requirements << d
s.add_dependency d
end
files = FileList['"{bin,docs,lib,test}/**/*' ]
files.exclude 'html'
s.files = files.to_a
end
#
# tasks
CLEAN.include('pkg', 'html')
task :default => [ :clean, :repackage ]
#
# TESTING
Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.test_files = FileList['test/test.rb']
t.verbose = true
end
#
# PACKAGING
Rake::GemPackageTask.new(spec) do |pkg|
#pkg.need_tar = true
end
Rake::PackageTask.new("rufus-sqs", RUFUS_SQS_VERSION) do |pkg|
pkg.need_zip = true
pkg.package_files = FileList[
"Rakefile",
"*.txt",
"lib/**/*",
"test/**/*"
].to_a
#pkg.package_files.delete("MISC.txt")
class << pkg
def package_name
"#{@name}-#{@version}-src"
end
end
end
#
# DOCUMENTATION
task :rdoc do
sh %{
rm -fR rdoc
yardoc 'lib/**/*.rb' \
-o html/rufus-sqs \
--title 'rufus-sqs'
}
end
#
# WEBSITE
task :upload_website => [ :clean, :rdoc ] do
account = "[email protected]"
webdir = "/var/www/gforge-projects/rufus"
sh "rsync -azv -e ssh html/rufus-sqs #{account}:#{webdir}/"
end