Commit d57929dc authored by Tim Smith's avatar Tim Smith
Browse files

Testing updates

parent 0be18db2
......@@ -15,15 +15,19 @@ Encoding:
Enabled: false
Style/FileName:
Enabled: false
Style/Alias:
Enabled: false
Style/SpaceBeforeFirstArg:
Enabled: false
LineLength:
Enabled: false
MethodLength:
Enabled: false
Metrics/AbcSize:
Enabled: false
Metrics/ModuleLength:
Enabled: false
PerceivedComplexity:
Enabled: false
Style/ClassAndModuleChildren:
Enabled: false
Style/FileName:
Enabled: false
......@@ -30,6 +30,6 @@ script:
- /opt/chefdk/embedded/bin/rubocop --version
- /opt/chefdk/embedded/bin/rubocop
- /opt/chefdk/embedded/bin/foodcritic --version
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec
- /opt/chefdk/embedded/bin/foodcritic . --exclude spec -f any
- /opt/chefdk/embedded/bin/rspec
- KITCHEN_YAML=.kitchen.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
......@@ -6,30 +6,23 @@ group :rake do
end
group :lint do
gem 'foodcritic', '~> 5.0'
gem 'rubocop', '~> 0.34'
gem 'foodcritic', '~> 6.0'
gem 'rubocop', '~> 0.38'
end
group :unit do
gem 'berkshelf', '~> 4.0'
gem 'chefspec', '~> 4.4'
gem 'berkshelf', '~> 4.3'
gem 'chefspec', '~> 4.6'
end
group :kitchen_common do
gem 'test-kitchen', '~> 1.4'
gem 'test-kitchen', '~> 1.6'
end
group :kitchen_vagrant do
gem 'kitchen-vagrant', '~> 0.19'
end
group :development do
gem 'ruby_gntp'
gem 'growl'
gem 'rb-fsevent'
gem 'guard', '~> 2.4'
gem 'guard-kitchen'
gem 'guard-foodcritic'
gem 'guard-rspec'
gem 'guard-rubocop'
group :kitchen_inspec do
gem 'kitchen-inspec'
end
# More info at https://github.com/guard/guard#readme
guard 'foodcritic', cookbook_paths: '.', cli: '-t ~FC023 -t ~FC005', all_on_start: false do
watch(/attributes\/.+\.rb$/)
watch(/providers\/.+\.rb$/)
watch(/recipes\/.+\.rb$/)
watch(/resources\/.+\.rb$/)
watch('metadata.rb')
end
guard 'rubocop' do
watch(/attributes\/.+\.rb$/)
watch(/providers\/.+\.rb$/)
watch(/recipes\/.+\.rb$/)
watch(/resources\/.+\.rb$/)
watch('metadata.rb')
end
guard :rspec, cmd: 'chef exec /opt/chefdk/embedded/bin/rspec', all_on_start: false, notification: false do
watch(/^libraries\/(.+)\.rb$/)
watch(/^spec\/(.+)_spec\.rb$/)
watch(/^(recipes)\/(.+)\.rb$/) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { 'spec' }
end
This diff is collapsed.
......@@ -13,8 +13,7 @@ namespace :style do
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
t.options = {
fail_tags: ['any'],
tags: ['~FC005']
fail_tags: ['any']
}
end
end
......@@ -41,4 +40,4 @@ desc 'Run all tests on Travis'
task travis: ['style', 'spec', 'integration:cloud']
# Default
task default: ['style', 'spec', 'integration:vagrant']
task default: %w(style spec)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment