Permalink
Browse files

update rake and gemfile

Signed-off-by: Patrick Münch <patrick.muench1111@gmail.com>
  • Loading branch information...
atomic111 committed Jun 16, 2016
1 parent 8fc6e20 commit edf57b0d9239a1ea63aece593f748271f2d42943
Showing with 17 additions and 15 deletions.
  1. +1 −0 .rubocop.yml
  2. +16 −15 Rakefile
View
@@ -5,6 +5,7 @@ AllCops:
- test/**/*
- metadata.rb
- Berksfile
- Guardfile
Documentation:
Enabled: false
AlignParameters:
View
@@ -9,20 +9,15 @@ require 'rubocop/rake_task'
# Rubocop before rspec so we don't lint vendored cookbooks
desc 'Run all tests except Kitchen (default task)'
task integration: %w(rubocop foodcritic spec)
task default: :integration
# Lint the cookbook
desc 'Run linters'
task lint: [:rubocop, :foodcritic]
task default: [:lint, :spec]
# Lint the cookbook
desc 'Run all linters: rubocop and foodcritic'
task run_all_linters: [:rubocop, :foodcritic]
task lint: [:rubocop, :foodcritic]
# Run the whole shebang
desc 'Run all tests'
task test: [:lint, :integration]
task test: [:lint, :integration, :spec]
# RSpec
desc 'Run chefspec tests'
@@ -51,13 +46,19 @@ task :rubocop do
RuboCop::RakeTask.new
end
# Automatically generate a changelog for this project. Only loaded if
# the necessary gem is installed.
begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
desc 'Alias for kitchen:all'
task acceptance: 'kitchen:all'
require 'github_changelog_generator/task'
GitHubChangelogGenerator::RakeTask.new :changelog
rescue LoadError
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
puts '>>>>> GitHub Changelog Generator not loaded, omitting tasks'
end
namespace :test do
task :integration do
concurrency = ENV['CONCURRENCY'] || 1
os = ENV['OS'] || ''
sh('sh', '-c', "bundle exec kitchen test -c #{concurrency} #{os}")
end
end

0 comments on commit edf57b0

Please sign in to comment.