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 |
|
|
19 |
hoespec = Hoe.spec 'thingfish-metastore-pggraph' do |spec|
|
9
|
20 |
spec.readme_file = 'README.md'
|
|
21 |
spec.history_file = 'History.md'
|
0
|
22 |
spec.extra_rdoc_files = FileList[ '*.rdoc' ]
|
9
|
23 |
spec.license 'BSD-3-Clause'
|
|
24 |
spec.urls = {
|
|
25 |
home: 'https://bitbucket.org/mahlon/thingfish-metastore-pggraph',
|
|
26 |
code: 'https://bitbucket.org/mahlon/thingfish-metastore-pggraph'
|
|
27 |
}
|
0
|
28 |
|
|
29 |
if File.directory?( '.hg' )
|
|
30 |
spec.spec_extras[:rdoc_options] = ['-f', 'fivefish', '-t', 'Thingfish-Metastore-PgGraph']
|
|
31 |
end
|
|
32 |
|
|
33 |
spec.developer 'Michael Granger', 'ged@FaerieMUD.org'
|
|
34 |
spec.developer 'Mahlon E. Smith', 'mahlon@martini.nu'
|
|
35 |
|
9
|
36 |
spec.dependency 'thingfish', '~> 0.5'
|
|
37 |
spec.dependency 'loggability', '~> 0.11'
|
|
38 |
spec.dependency 'configurability', '~> 2.2'
|
|
39 |
spec.dependency 'sequel', '~> 4.35'
|
|
40 |
spec.dependency 'pg', '~> 0.19'
|
0
|
41 |
|
9
|
42 |
spec.dependency 'hoe-deveiate', '~> 0.8', :development
|
|
43 |
spec.dependency 'rspec', '~> 3.0', :development
|
0
|
44 |
|
9
|
45 |
spec.require_ruby_version( '>=2.3.0' )
|
0
|
46 |
spec.hg_sign_tags = true if spec.respond_to?( :hg_sign_tags= )
|
|
47 |
end
|
|
48 |
|
|
49 |
|
|
50 |
ENV['VERSION'] ||= hoespec.spec.version.to_s
|
|
51 |
|
|
52 |
# Run the tests before checking in
|
|
53 |
task 'hg:precheckin' => [ :check_history, :check_manifest, :spec ]
|
|
54 |
|
|
55 |
# Rebuild the ChangeLog immediately before release
|
|
56 |
task :prerelease => 'ChangeLog'
|
|
57 |
CLOBBER.include( 'ChangeLog' )
|
|
58 |
|
|
59 |
desc "Build a coverage report"
|
|
60 |
task :coverage do
|
|
61 |
ENV["COVERAGE"] = 'yes'
|
|
62 |
Rake::Task[:spec].invoke
|
|
63 |
end
|
|
64 |
|
|
65 |
|
|
66 |
task :gemspec => GEMSPEC
|
|
67 |
file GEMSPEC => __FILE__ do |task|
|
|
68 |
spec = $hoespec.spec
|
|
69 |
spec.files.delete( '.gemtest' )
|
|
70 |
spec.signing_key = nil
|
9
|
71 |
spec.version = "#{spec.version.bump}.0.pre#{Time.now.strftime("%Y%m%d%H%M%S")}"
|
0
|
72 |
File.open( task.name, 'w' ) do |fh|
|
|
73 |
fh.write( spec.to_ruby )
|
|
74 |
end
|
|
75 |
end
|
|
76 |
|
|
77 |
task :default => :gemspec
|
9
|
78 |
CLOBBER.include( GEMSPEC.to_s )
|
0
|
79 |
|