-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
58 lines (51 loc) · 1.28 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
$:.unshift('lib')
require 'rubygems'
require 'rake/clean'
require 'rake/gempackagetask'
require 'rake/rdoctask'
require 'spec/rake/spectask'
require 'lib/poiyer/version'
NAME = "poiyer"
AUTHOR = "Brian Tatnall"
VERS = Poiyer::VERSION
PKG = "#{NAME}-#{VERS}"
PKG_FILES = FileList[
"[A-Z]*",
"lib/**/*.rb",
"vendor/*.jar"
]
DEVELOPMENT_DEPENDENCIES = { 'rspec' => '>= 1.1.4' }
CLEAN.include ['*.gem']
rd = Rake::RDocTask.new do |rdoc|
rdoc.rdoc_dir = File.dirname(__FILE__) + '/doc'
rdoc.options << 'README'
rdoc.rdoc_files.include('README', 'lib/**/*.rb')
end
SPEC = Gem::Specification.new do |s|
s.name = NAME
s.version = VERS
s.platform = Gem::Platform::CURRENT
s.summary = "JRuby wrapper for the Apache POI Project."
s.description = s.summary
s.author = AUTHOR
s.email = "[email protected]"
s.files = PKG_FILES
s.has_rdoc = true
s.rdoc_options = rd.options
DEVELOPMENT_DEPENDENCIES.each do |gem, requirements|
s.add_development_dependency(gem, *requirements)
end
end
task :package => [:clean] do
Gem::Builder.new(SPEC).build
end
task :default => :spec
task :gem_debug do
puts SPEC.to_ruby
end
desc "Run all specs"
Spec::Rake::SpecTask.new do |t|
t.libs << "lib"
t.spec_files = FileList['spec/**/*_spec.rb']
t.spec_opts = ['--options', 'spec/spec.opts']
end