-
Notifications
You must be signed in to change notification settings - Fork 4
/
Rakefile
86 lines (66 loc) · 2.12 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
require 'rake/gempackagetask'
require "rake/contrib/rubyforgepublisher"
require "rake/rdoctask"
require "rake/testtask"
require 'rbconfig'
include Config
PKG_NAME = 'gcalapi'
PKG_VERSION = File.read('VERSION').chomp
PKG_FILES = FileList["**/*"].exclude(".svn").exclude("pkg").exclude("test/temp_*.rb").exclude("test/parameters.rb").exclude("*.log").exclude("test/*.log")
Rake::TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/*_test.rb']
t.verbose = true
end
desc "Removing generated files"
task :clean do
rm_rf 'html'
rm_rf 'pkg'
end
desc "Generate RDoc documentation"
Rake::RDocTask.new do |rdoc|
rdoc.options << '--line-numbers'
rdoc.options << '--inline-source'
rdoc.options << '--all'
rdoc.rdoc_files.include 'README'
rdoc.rdoc_files.include 'lib/googlecalendar/*.rb'
end
spec = Gem::Specification.new do |s|
#### Basic information.
s.name = PKG_NAME
s.version = PKG_VERSION
s.summary = "Google Calendar API"
s.description = ""
#### Dependencies and requirements.
s.files = PKG_FILES
#### C code extensions.
#s.extensions << "ext/extconf.rb"
#### Load-time details: library and application (you will need one or both).
s.require_path = 'lib' # Use these for libraries.
s.autorequire = "googlecalendar/calendar"
#### Documentation and testing.
s.has_rdoc = true
#s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
s.extra_rdoc_files = 'README'
s.rdoc_options << '--line-numbers' << '--inline-source'
#s.rdoc_options <<
# '--title' << 'Rake -- Ruby Make' <<
# '--main' << 'README' <<
# '--line-numbers'
s.test_files = Dir.glob('test/*_test.rb')
#### Author and project details.
s.author = "zorio"
s.email = "[email protected]"
s.homepage = "http://gcalapi.rubyforge.net"
s.rubyforge_project = "gcalapi"
end
Rake::GemPackageTask.new(spec) do |pkg|
#pkg.need_tar = true
#pkg.need_zip = true
#pkg.package_files += PKG_FILES
end
task :release => [ :clean, :rdoc, :package ]
desc "Publish to RubyForge"
task :rubyforge => [:rdoc, :package] do
Rake::RubyForgePublisher.new(PKG_NAME, "zorio").upload
end