forked from bookmate/simhash
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
38 lines (30 loc) · 800 Bytes
/
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
require 'rake'
require 'simhash'
desc 'Default: run unit tests.'
task :default => [:test]
Rake::ExtensionTask.new('string_hashing')
desc 'Start an IRB session with all necessary files required.'
task :shell do |t|
chdir File.dirname(__FILE__)
exec 'irb -I lib/ -I lib/simhash -I lib/string -I lib/integer -r rubygems'
end
desc 'Build the gemspec.'
task :gemspec do |t|
exec 'gem build simhash.gemspec'
end
desc "Print a list of the files to be put into the gem"
task :manifest do
spec.files.each do |file|
puts file
end
end
desc "Generate a gemspec file for GitHub"
task :gemspec do
File.open("#{spec.name}.gemspec", 'w') do |f|
f.write spec.to_ruby
end
end
desc "Build the gem into the current directory"
task :gem => :gemspec do
`gem build #{spec.name}.gemspec`
end