Debian Codegraph @

Rakefile

raw
1 begin
2 require 'simplecov'
3 require 'simplecov-console'
4 require 'codecov'
5 rescue LoadError
6 else
7 SimpleCov.start do
8 track_files 'lib/**/*.rb'
9
10 add_filter '/spec'
11
12 enable_coverage :branch
13
14 # do not track vendored files
15 add_filter '/vendor'
16 add_filter '/.vendor'
17 end
18
19 SimpleCov.formatters = [
20 SimpleCov::Formatter::Console,
21 SimpleCov::Formatter::Codecov,
22 ]
23 end
24
25 # https://cucumber.io/docs/tools/ruby/
26 # https://stackoverflow.com/questions/6473419/using-simplecov-to-display-cucumber-code-coverage
27 require 'cucumber/rake/task'
28 Cucumber::Rake::Task.new(:features) do |t|
29 t.cucumber_opts = %w[--format progress] # Any valid command line option can go here.
30 end
31
32 begin
33 require 'github_changelog_generator/task'
34 rescue LoadError
35 # Do nothing if no required gem installed
36 else
37 GitHubChangelogGenerator::RakeTask.new :changelog do |config|
38 version = Hiera::Backend::Eyaml::VERSION
39 config.future_release = "v#{version}" if /^\d+\.\d+.\d+$/.match?(version)
40 config.header = "# Changelog\n\nAll notable changes to this project will be documented in this file."
41 config.exclude_labels = %w[duplicate question invalid wontfix wont-fix skip-changelog github_actions]
42 config.user = 'voxpupuli'
43 config.project = 'hiera-eyaml'
44 end
45 end
46
47 begin
48 require 'voxpupuli/rubocop/rake'
49 rescue LoadError
50 # the voxpupuli-rubocop gem is optional
51 end