-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathRakefile
48 lines (37 loc) · 937 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
39
40
41
42
43
44
45
46
47
48
require 'rubygems'
gem 'rspec'
gem 'reek'
require 'rspec'
require 'rdoc/task'
require 'rspec/core/rake_task'
require 'reek/rake/task'
task :default => :spec
namespace :gem do
desc 'Builds the gem'
task :build do
system 'gem build *.gemspec && mkdir -p pkg/ && mv *.gem pkg/'
end
desc 'Builds and installs the gem'
task :install => :build do
system 'gem install pkg/'
end
end
Reek::Rake::Task.new do |task|
task.fail_on_error = true
end
desc 'Generate the rdoc'
Rake::RDocTask.new do |rdoc|
rdoc.rdoc_files.add %w{README.rdoc lib/**/*.rb}
rdoc.main = 'README.rdoc'
rdoc.title = ''
end
desc 'Run all specs in spec directory'
RSpec::Core::RakeTask.new do |task|
task.pattern = 'spec/lib/**/*_spec.rb'
end
namespace :spec do
desc 'Run all integration specs in spec/acceptance directory'
RSpec::Core::RakeTask.new(:acceptance) do |task|
task.pattern = 'spec/acceptance/**/*_spec.rb'
end
end