0
|
1 |
#!/usr/bin/env rake
|
|
2 |
|
|
3 |
begin
|
|
4 |
require 'hoe'
|
|
5 |
rescue LoadError
|
|
6 |
abort "This Rakefile requires hoe (gem install hoe)"
|
|
7 |
end
|
|
8 |
|
|
9 |
GEMSPEC = 'thingfish-metastore-pggraph.gemspec'
|
|
10 |
|
|
11 |
|
|
12 |
Hoe.plugin :mercurial
|
|
13 |
Hoe.plugin :signing
|
|
14 |
Hoe.plugin :deveiate
|
|
15 |
Hoe.plugin :bundler
|
|
16 |
|
|
17 |
Hoe.plugins.delete :rubyforge
|
|
18 |
Hoe.plugins.delete :gemcutter
|
|
19 |
|
|
20 |
hoespec = Hoe.spec 'thingfish-metastore-pggraph' do |spec|
|
|
21 |
spec.readme_file = 'README.rdoc'
|
|
22 |
spec.history_file = 'History.rdoc'
|
|
23 |
spec.extra_rdoc_files = FileList[ '*.rdoc' ]
|
|
24 |
spec.license 'BSD'
|
|
25 |
|
|
26 |
if File.directory?( '.hg' )
|
|
27 |
spec.spec_extras[:rdoc_options] = ['-f', 'fivefish', '-t', 'Thingfish-Metastore-PgGraph']
|
|
28 |
end
|
|
29 |
|
|
30 |
spec.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
|
31 |
spec.developer 'Mahlon E. Smith', 'mahlon@martini.nu'
|
|
32 |
|
|
33 |
spec.dependency 'loggability', '~> 0.10'
|
|
34 |
|
|
35 |
spec.dependency 'rspec', '~> 3.0', :developer
|
|
36 |
|
|
37 |
spec.require_ruby_version( '>=2.0.0' )
|
|
38 |
spec.hg_sign_tags = true if spec.respond_to?( :hg_sign_tags= )
|
|
39 |
end
|
|
40 |
|
|
41 |
|
|
42 |
ENV['VERSION'] ||= hoespec.spec.version.to_s
|
|
43 |
|
|
44 |
# Run the tests before checking in
|
|
45 |
task 'hg:precheckin' => [ :check_history, :check_manifest, :spec ]
|
|
46 |
|
|
47 |
# Rebuild the ChangeLog immediately before release
|
|
48 |
task :prerelease => 'ChangeLog'
|
|
49 |
CLOBBER.include( 'ChangeLog' )
|
|
50 |
|
|
51 |
desc "Build a coverage report"
|
|
52 |
task :coverage do
|
|
53 |
ENV["COVERAGE"] = 'yes'
|
|
54 |
Rake::Task[:spec].invoke
|
|
55 |
end
|
|
56 |
|
|
57 |
|
|
58 |
task :gemspec => GEMSPEC
|
|
59 |
file GEMSPEC => __FILE__ do |task|
|
|
60 |
spec = $hoespec.spec
|
|
61 |
spec.files.delete( '.gemtest' )
|
|
62 |
spec.signing_key = nil
|
|
63 |
spec.version = "#{spec.version}.pre#{Time.now.strftime("%Y%m%d%H%M%S")}"
|
|
64 |
File.open( task.name, 'w' ) do |fh|
|
|
65 |
fh.write( spec.to_ruby )
|
|
66 |
end
|
|
67 |
end
|
|
68 |
|
|
69 |
task :default => :gemspec
|
|
70 |
|