-
Notifications
You must be signed in to change notification settings - Fork 2
/
Rakefile
51 lines (43 loc) · 1.49 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
require 'rubygems'
require "rake/testtask"
require "rake/gempackagetask"
require "rake/rdoctask"
dir = File.dirname(__FILE__)
lib = File.join(dir, "lib", "sigslot.rb")
version = File.read(lib)[/^\s*VERSION\s*=\s*(['"])(\d\.\d\.\d)\1/, 2]
task :default => [:all]
task :all => [:test]
task :test => [:unit]
desc "Lauches all unit tests"
Rake::TestTask.new(:unit) do |test|
test.libs = [ "lib" ]
test.test_files = ['test/test_unit.rb']
test.verbose = true
end
desc "Generates rdoc documentation"
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.include( "README.textile", "LICENCE.textile", "CHANGELOG.textile", "TODO.textile", "lib/" )
rdoc.main = "README.textile"
rdoc.rdoc_dir = "doc/api"
rdoc.title = "SigSlot Documentation"
end
desc "Generates gem package"
gemspec = Gem::Specification.new do |s|
s.name = 'sigslot'
s.version = version
s.summary = "Signal And Slots for ruby"
s.description = %{An attempt to provide signals and slots in ruby (as Qt's concept)}
s.files = Dir['lib/**/*'] + Dir['test/**/*']
s.require_path = 'lib'
s.has_rdoc = true
s.extra_rdoc_files = ["README.textile", "LICENCE.textile"]
s.rdoc_options << '--title' << 'SigSlot - Signals and Slots for ruby' <<
'--main' << 'README.textile' <<
'--line-numbers'
s.author = "Louis Lambeau"
s.email = "[email protected]"
s.homepage = "https://github.com/llambeau/sigslot"
end
Rake::GemPackageTask.new(gemspec) do |pkg|
pkg.need_tar = true
end