forked from git-commit-notifier/git-commit-notifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRakefile
More file actions
48 lines (38 loc) · 1.11 KB
/
Rakefile
File metadata and controls
48 lines (38 loc) · 1.11 KB
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
require 'rubygems'
require 'rake'
APP_ROOT = File.dirname(__FILE__).freeze
begin
require 'bundler'
Bundler::GemHelper.install_tasks
rescue LoadError
puts "Bundler not available. Install it with: gem install bundler"
end
begin
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new
RSpec::Core::RakeTask.new(:rcov) do |t|
t.rcov = true
t.ruby_opts = '-w'
t.rcov_opts = %q[-Ilib --exclude "spec/*,gems/*"]
end
rescue LoadError
$stderr.puts "RSpec not available. Install it with: gem install rspec-core rspec-expectations"
end
task :default => :spec
require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
version = File.exists?('VERSION') ? IO.read('VERSION') : ""
rdoc.rdoc_dir = 'rdoc'
rdoc.title = "git-commit-notifier #{version}"
rdoc.rdoc_files.include('README*')
rdoc.rdoc_files.include('lib/**/*.rb')
end
begin
gem 'code-cleaner'
desc 'Clean code for whitespaces and tabs'
task :'code:clean' do
system('code-cleaner lib spec Rakefile bin/git-commit-notifier')
end
rescue LoadError
$stderr.puts "code-cleaner not available. Install it with: gem install code-cleaner"
end