forked from jeremyevans/ruby-american_date
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
43 lines (37 loc) · 999 Bytes
/
Rakefile
File metadata and controls
43 lines (37 loc) · 999 Bytes
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
require "rake"
require "rake/clean"
CLEAN.include ["*.gem", "rdoc"]
RDOC_OPTS = ['--inline-source', '--line-numbers', '--title', '', '--main', 'README.rdoc']
rdoc_task_class = begin
require "rdoc/task"
RDOC_OPTS.concat(['-f', 'hanna'])
RDoc::Task
rescue LoadError
require "rake/rdoctask"
Rake::RDocTask
end
rdoc_task_class.new do |rdoc|
rdoc.rdoc_dir = "rdoc"
rdoc.options += RDOC_OPTS
rdoc.rdoc_files.add %w"lib/american_date.rb MIT-LICENSE CHANGELOG README.rdoc"
end
begin
require "spec/rake/spectask"
spec_class = Spec::Rake::SpecTask
spec_files_meth = :spec_files=
rescue LoadError
# RSpec 2
require "rspec/core/rake_task"
spec_class = RSpec::Core::RakeTask
spec_files_meth = :pattern=
end
desc "Run specs"
spec_class.new("spec") do |t|
t.send(spec_files_meth, ["spec/american_date_spec.rb"])
end
task :default=>[:spec]
desc "Package american_date"
task :gem=>[:clean] do
load './american_date.gemspec'
Gem::Builder.new(AMERICAN_DATE_GEMSPEC).build
end