-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRakefile
69 lines (60 loc) · 1.5 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
#!/usr/bin/env ruby
require 'pathname'
$root = Pathname(__FILE__).dirname
require 'rubygems'
require 'rake'
require 'rake/clean'
require 'rake/packagetask'
require 'rake/gempackagetask'
require 'rake/testtask'
require 'rake/rdoctask'
task :spec do
load $root.join('spec', 'spec_base.rb')
end
task :default => [ :spec ]
CLEAN.include('pkg', 'tmp')
gemspec = Gem::Specification.new do |s|
s.name = 'fast_hash_ring'
s.version = '0.1.2'
s.authors = [ 'Flinn' ]
s.email = '[email protected]'
s.homepage = 'http://github.com/actsasflinn/fast_hash_ring/'
s.platform = Gem::Platform::RUBY
s.summary = 'A Ruby C Extension based on the pure Ruby HashRing gem'
s.require_path = 'ext'
s.test_file = 'spec/spec_base.rb'
s.has_rdoc = true
s.extra_rdoc_files = %w{ README.rdoc }
s.files = ['CREDITS',
'LICENSE',
'Rakefile',
'README.rdoc'] +
Dir['ext/**/*.[rb|c|h]'] +
Dir['spec/**/*'] +
Dir['benchmarks/**/*']
s.extensions << "ext/extconf.rb"
end
task :gemspec do
File.open('fast_hash_ring.gemspec', 'w') do |f|
f.write(gemspec.to_ruby)
end
end
Rake::GemPackageTask.new(gemspec) do |pkg|
pkg.need_tar = true
end
Rake::PackageTask.new('fast_hash_ring', '0.1.2') do |pkg|
pkg.need_zip = true
pkg.package_files = FileList[
'COPYING',
'Rakefile',
'README.rdoc',
'ext/**/*',
'spec/**/*',
'benchmarks/**/*'
].to_a
class << pkg
def package_name
"#{@name}-#{@version}-src"
end
end
end