linux-baseline/Rakefile
Michée lengronne b5284b923e
use input instead of attribute (#166)
* use input instead of attribute

In the last versions of Inspec and cinc-auditor, attribute is deprecated and input should be used.

https://docs.chef.io/workstation/cookstyle/inspec_deprecations_attributehelper/
Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>

* Update sysctl_spec.rb

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>

* Update inspec.yml

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>

* Update Rakefile

Signed-off-by: Michée Lengronne <michee.lengronne@coppint.com>
2022-01-12 17:17:16 +01:00

27 lines
615 B
Ruby

# frozen_string_literal: true
require 'rake/testtask'
require 'rubocop/rake_task'
# Rubocop
desc 'Run Rubocop lint checks'
task :rubocop do
RuboCop::RakeTask.new
end
# lint the project
desc 'Run robocop linter'
task lint: [:rubocop]
# run tests
task default: [:lint, 'test:check']
namespace :test do
# run inspec check to verify that the profile is properly configured
task :check do
require 'inspec'
puts "Checking profile with InSpec Version: #{Inspec::VERSION}"
profile = Inspec::Profile.for_target('.', backend: Inspec::Backend.create(Inspec::Config.mock))
pp profile.check
end
end