-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathRakefile
More file actions
36 lines (28 loc) · 714 Bytes
/
Rakefile
File metadata and controls
36 lines (28 loc) · 714 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
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.test_files = FileList['test/**/test_*.rb']
t.verbose = true
end
desc "Run tests"
task :default => :test
desc "Run simple benchmark"
task :benchmark do
ruby 'simple_benchmark.rb'
end
desc "Run comparative benchmark (requires bson gem)"
task :benchmark_full do
ruby '-I', 'lib', 'benchmark.rb'
end
desc "Build and publish gem to RubyGems"
task :publish do
spec = Gem::Specification.load('ruby_xid.gemspec')
gem_file = "ruby_xid-#{spec.version}.gem"
# Clean up old gem files
sh "rm -f *.gem"
# Build the gem
sh "gem build ruby_xid.gemspec"
# Push to RubyGems
sh "gem push #{gem_file}"
end