|
3 | 3 | require 'bundler/gem_tasks' |
4 | 4 | require 'rspec/core/rake_task' |
5 | 5 |
|
6 | | -def gem_present(name) |
7 | | - !Bundler.rubygems.find_name(name).empty? |
| 6 | +RSpec::Core::RakeTask.new(:spec) do |t| |
| 7 | + t.exclude_pattern = "spec/acceptance/**/*.rb" |
8 | 8 | end |
9 | 9 |
|
10 | | -RSpec::Core::RakeTask.new(:spec) do |spec| |
11 | | - spec.pattern = FileList['spec/**/*_spec.rb'].exclude('spec/fixtures/**/*_spec.rb') |
| 10 | +RSpec::Core::RakeTask.new(:acceptance) do |t| |
| 11 | + t.pattern = "spec/acceptance/**/*.rb" |
12 | 12 | end |
13 | 13 |
|
14 | 14 | require 'yard' |
15 | 15 | YARD::Rake::YardocTask.new |
16 | | - |
17 | | -default_tasks = [:spec] |
18 | | - |
19 | | -if gem_present 'rubocop' |
20 | | - require 'rubocop/rake_task' |
21 | | - RuboCop::RakeTask.new |
22 | | - default_tasks.unshift(:rubocop) |
23 | | -end |
24 | | - |
25 | | -task default: default_tasks |
26 | | - |
27 | | -#### CHANGELOG #### |
28 | | -begin |
29 | | - require 'github_changelog_generator/task' |
30 | | - GitHubChangelogGenerator::RakeTask.new :changelog do |config| |
31 | | - require 'puppetlabs_spec_helper/version' |
32 | | - config.since_tag = 'v2.8.0' |
33 | | - config.future_release = "v#{PuppetlabsSpecHelper::VERSION}" |
34 | | - config.header = "# Changelog\n\n" \ |
35 | | - "All significant changes to this repo will be summarized in this file.\n" |
36 | | - # config.include_labels = %w[enhancement bug] |
37 | | - config.user = 'puppetlabs' |
38 | | - config.project = 'puppetlabs_spec_helper' |
39 | | - end |
40 | | -rescue LoadError |
41 | | - desc 'Install github_changelog_generator to get access to automatic changelog generation' |
42 | | - task :changelog do |
43 | | - raise 'Install github_changelog_generator to get access to automatic changelog generation' |
44 | | - end |
45 | | -end |
0 commit comments