-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathRakefile
More file actions
30 lines (26 loc) · 710 Bytes
/
Rakefile
File metadata and controls
30 lines (26 loc) · 710 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
require 'rubygems'
require 'bundler/gem_tasks'
require 'rake'
require 'rake/testtask'
%w(install release).each do |task|
Rake::Task[task].enhance do
sh "rm -rf pkg"
end
end
desc "Bump version on github"
task :bump do
if `git status -s`.strip == ""
puts "\e[31mNothing to commit (working directory clean)\e[0m"
else
version = Bundler.load_gemspec(Dir[File.expand_path('../*.gemspec', __FILE__)].first).version
sh "git add .; git commit -a -m \"Bump to version #{version}\""
end
end
task :release => :bump
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
test.test_files = Dir['test/**/test_*.rb']
test.verbose = true
end
task :default => :test
task :spec => :test