forked from padrino/padrino-contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRakefile
29 lines (24 loc) · 741 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
require 'rubygems' unless defined?(Gem)
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
%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`.chomp != ""
version = Bundler.load_gemspec(Dir[File.expand_path('../*.gemspec', __FILE__)].first).version
sh "git add .; git commit -a -m \"Bump to version #{version}\""
else
puts "\e[31mNothing to commit (working directory clean)\e[0m"
end
end
task :release => :bump
desc "Run complete application spec suite"
RSpec::Core::RakeTask.new(:spec) do |t|
t.pattern = './spec/**/*_spec.rb'
t.rspec_opts = %w(-fs --color --fail-fast)
end
task :default => :spec