Rakefile 787 Bytes
Newer Older
1
require "bundler/gem_tasks"
2 3
require "date"
require "ohai/version"
4 5

begin
6
  require "rspec/core/rake_task"
7 8

  RSpec::Core::RakeTask.new do |t|
9
    t.pattern = "spec/**/*_spec.rb"
10 11 12 13 14 15 16 17 18
  end
rescue LoadError
  desc "rspec is not installed, this task is disabled"
  task :spec do
    abort "rspec is not installed. `(sudo) gem install rspec` to run unit tests"
  end
end

task :default => :spec
19 20 21 22 23 24

require "chefstyle"
require "rubocop/rake_task"
RuboCop::RakeTask.new(:style) do |task|
  task.options += ["--display-cop-names", "--no-color"]
end
25

26 27
begin
  require "github_changelog_generator/task"
28

29 30 31 32 33 34
  GitHubChangelogGenerator::RakeTask.new :changelog do |config|
    config.future_release = Ohai::VERSION
    config.max_issues = 0
    config.add_issues_wo_labels = false
  end
rescue LoadError
35
end