Sha256: 6ebe9fc366820aa116797192bb0d54ffaa8def72243d8315b987c487c1662559

Contents?: true

Size: 1.24 KB

Versions: 4

Compression:

Stored size: 1.24 KB

Contents

# frozen_string_literal: true

require 'bundler/gem_tasks'
require 'rspec/core/rake_task'

def gem_present(name)
  !Bundler.rubygems.find_name(name).empty?
end

RSpec::Core::RakeTask.new(:spec) do |spec|
  spec.pattern = FileList['spec/**/*_spec.rb'].exclude('spec/fixtures/**/*_spec.rb')
end

require 'yard'
YARD::Rake::YardocTask.new

default_tasks = [:spec]

if gem_present 'rubocop'
  require 'rubocop/rake_task'
  RuboCop::RakeTask.new
  default_tasks.unshift(:rubocop)
end

task default: default_tasks

#### CHANGELOG ####
begin
  require 'github_changelog_generator/task'
  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
    require 'puppetlabs_spec_helper/version'
    config.since_tag = 'v2.8.0'
    config.future_release = "v#{PuppetlabsSpecHelper::VERSION}"
    config.header = "# Changelog\n\n" \
      "All significant changes to this repo will be summarized in this file.\n"
    # config.include_labels = %w[enhancement bug]
    config.user = 'puppetlabs'
    config.project = 'puppetlabs_spec_helper'
  end
rescue LoadError
  desc 'Install github_changelog_generator to get access to automatic changelog generation'
  task :changelog do
    raise 'Install github_changelog_generator to get access to automatic changelog generation'
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
puppetlabs_spec_helper-4.0.1 Rakefile
puppetlabs_spec_helper-4.0.0 Rakefile
puppetlabs_spec_helper-3.0.0 Rakefile
puppetlabs_spec_helper-2.16.0 Rakefile