-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
63 lines (51 loc) · 1.94 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
require 'rubygems' if RUBY_VERSION < '1.9'
require 'rake'
require 'rake/gempackagetask'
require 'spec/rake/spectask'
require 'rake/rdoctask'
$:.unshift( File.dirname( __FILE__ ) + '/lib' )
require 'package_manager'
TITLE = 'A package manager abstraction'
ADMIN_FILES = FileList[ 'Rakefile', 'README.rdoc' ]
EXECUTABLES = FileList[ 'bin/*' ]
SOURCE_FILES = FileList[ 'lib/**/*.rb' ]
SPEC_FILES = FileList[ 'spec/**/*' ]
RDOC_FILES = FileList[ 'README.rdoc' ] + EXECUTABLES + SOURCE_FILES
RDOC_OPTS = [ '--quiet', '--main', 'README.rdoc', '--inline-source' ]
EXECUTABLE_FILENAMES = EXECUTABLES.collect { | file | file.gsub( %r(^bin/), '' ) }
spec = Gem::Specification.new do |s|
s.name = 'package_manager'
s.summary = TITLE
s.description = 'Unifies the command interface for using yum and apt on Linux, Fink and MacPorts on OS X'
s.version = PackageManager::VERSION::STRING
s.homepage = 'http://github.com/joeyates/package_manager'
s.author = 'Joe Yates'
s.email = 'joe.g.yates@gmail.com'
s.rubyforge_project = "nowarning"
s.files = ADMIN_FILES +
EXECUTABLES +
SOURCE_FILES
s.executables += EXECUTABLE_FILENAMES
s.require_paths = [ 'lib' ]
s.add_dependency( 'rake', '>= 0.8.7' )
s.has_rdoc = true
s.rdoc_options += RDOC_OPTS
s.extra_rdoc_files = RDOC_FILES
s.test_files = SPEC_FILES
end
Rake::GemPackageTask.new( spec ) {}
Spec::Rake::SpecTask.new do |t|
t.spec_files = FileList[ 'spec/**/*_spec.rb' ]
t.spec_opts += [ '--color', '--format specdoc' ]
end
Spec::Rake::SpecTask.new( 'spec:rcov' ) do |t|
t.spec_files = FileList[ 'spec/**/*_spec.rb' ]
t.rcov = true
t.rcov_opts = [ '--exclude spec' ]
end
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = 'html'
rdoc.options += RDOC_OPTS
rdoc.title = TITLE
rdoc.rdoc_files.add RDOC_FILES
end