File: Rakefile

package info (click to toggle)
ruby-jira 2.1.5-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 968 kB
  • sloc: ruby: 5,125; makefile: 12
file content (28 lines) | stat: -rw-r--r-- 696 bytes parent folder | download | duplicates (2)
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
require 'rspec/core/rake_task'
require 'rdoc/task'

Dir.glob('lib/tasks/*.rake').each { |r| import r }

task default: [:test]

task test: %i[prepare spec]

desc 'Prepare and run rspec tests'
task :prepare do
  rsa_key = File.expand_path('rsakey.pem')
  unless File.exist?(rsa_key)
    raise 'rsakey.pem does not exist, tests will fail.  Run `rake jira:generate_public_cert` first'
  end
end

desc 'Run RSpec tests'
# RSpec::Core::RakeTask.new(:spec)
RSpec::Core::RakeTask.new(:spec) do |task|
  task.rspec_opts = ['--color', '--format', 'doc']
end

Rake::RDocTask.new(:doc) do |rd|
  rd.main       = 'README.rdoc'
  rd.rdoc_dir   = 'doc'
  rd.rdoc_files.include('README.rdoc', 'lib/**/*.rb')
end