-
Notifications
You must be signed in to change notification settings - Fork 5
/
Rakefile
48 lines (39 loc) · 1.01 KB
/
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
# frozen_string_literal: true
begin
require 'bundler/setup'
rescue LoadError
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
end
require 'rake'
require 'rake/release/task'
require 'rspec/core/rake_task'
Rake::Release::Task.new do |spec|
spec.sign_tag = true
end
# Delegate spec task task to spec:all to run all specs.
task spec: 'spec:all'
desc 'Run all specs'
namespace :spec do
desc 'Run all msgr specs and all integration specs.'
task all: %i[unit integration]
desc 'Run all unit specs.'
RSpec::Core::RakeTask.new(:unit) do |t|
t.ruby_opts = '-Ispec/unit'
t.pattern = 'spec/unit/**/*_spec.rb'
end
desc 'Run all integration specs.'
RSpec::Core::RakeTask.new(:integration) do |t|
t.ruby_opts = '-Ispec/integration'
t.pattern = 'spec/integration/**/*_spec.rb'
end
end
begin
require 'yard'
require 'yard/rake/yardoc_task'
YARD::Rake::YardocTask.new do |t|
t.files = %w[lib/**/*.rb]
t.options = %w[--output-dir doc/]
end
rescue LoadError
nil
end