-
Notifications
You must be signed in to change notification settings - Fork 174
/
Rakefile
38 lines (30 loc) · 878 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
# encoding: utf-8
require 'yard'
require 'rspec/core'
require "rspec/core/rake_task"
# Yard task (rake yard)
YARD::Rake::YardocTask.new do |task|
version = File.read("VERSION").strip
task.options += ["--title", "bugsnag-ruby v#{version} API Documentation"]
end
# RSpec tasks
RSpec::Core::RakeTask.new(:spec) do |task|
integration_exclusions = []
begin
require 'sidekiq/testing'
rescue LoadError
puts "Skipping sidekiq tests, missing dependencies"
integration_exclusions << 'sidekiq'
end
begin
require 'delayed_job'
rescue LoadError
puts "Skipping delayed_job tests, missing dependencies"
integration_exclusions << 'delayed_job'
end
if integration_exclusions.length > 0
pattern = integration_exclusions.join(',')
task.rspec_opts = " --exclude-pattern **/integrations/{#{pattern}}_spec.rb"
end
end
task default: :spec