File: Rakefile

package info (click to toggle)
ruby-shoulda-matchers 2.8.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 1,460 kB
  • ctags: 1,747
  • sloc: ruby: 14,127; sh: 31; makefile: 6
file content (36 lines) | stat: -rw-r--r-- 873 bytes parent folder | download
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
require 'bundler/setup'
require 'bundler/gem_tasks'
require 'rspec/core/rake_task'
require 'appraisal'
require_relative 'tasks/documentation'

RSpec::Core::RakeTask.new('spec:unit') do |t|
  t.ruby_opts = '-w -r ./spec/report_warnings'
  t.pattern = "spec/unit/**/*_spec.rb"
  t.rspec_opts = '--color --format progress'
  t.verbose = false
end

RSpec::Core::RakeTask.new('spec:acceptance') do |t|
  t.ruby_opts = '-w -r ./spec/report_warnings'
  t.pattern = "spec/acceptance/**/*_spec.rb"
  t.rspec_opts = '--color --format progress'
  t.verbose = false
end

task :default do
  if ENV['BUNDLE_GEMFILE'] =~ /gemfiles/
    sh 'rake spec:unit'
    sh 'rake spec:acceptance'
  else
    Rake::Task['appraise'].invoke
  end
end

task :appraise do
  exec 'appraisal install && appraisal rake'
end

Shoulda::Matchers::DocumentationTasks.create

task release: 'docs:publish_latest'