--- /dev/null
+source ENV['GEM_SOURCE'] || 'https://rubygems.org'
+
+puppetversion = ENV.key?('PUPPET_VERSION') ? ENV['PUPPET_VERSION'] : ['>= 3.3']
+gem 'metadata-json-lint'
+gem 'puppet', puppetversion
+gem 'puppetlabs_spec_helper', '>= 1.2.0'
+gem 'puppet-lint', '>= 1.0.0'
+gem 'facter', '>= 1.7.0'
+gem 'rspec-puppet'
+
+# rspec must be v2 for ruby 1.8.7
+if RUBY_VERSION >= '1.8.7' && RUBY_VERSION < '1.9'
+ gem 'rspec', '~> 2.0'
+ gem 'rake', '~> 10.0'
+else
+ # rubocop requires ruby >= 1.9
+ gem 'rubocop'
+end
--- /dev/null
+require 'puppetlabs_spec_helper/rake_tasks'
+require 'puppet-lint/tasks/puppet-lint'
+require 'metadata-json-lint/rake_task'
+
+if RUBY_VERSION >= '1.9'
+ require 'rubocop/rake_task'
+ RuboCop::RakeTask.new
+end
+
+PuppetLint.configuration.send('disable_80chars')
+PuppetLint.configuration.relative = true
+PuppetLint.configuration.ignore_paths = ['spec/**/*.pp', 'pkg/**/*.pp']
+
+desc 'Validate manifests, templates, and ruby files'
+task :validate do
+ Dir['manifests/**/*.pp'].each do |manifest|
+ sh "puppet parser validate --noop #{manifest}"
+ end
+ Dir['spec/**/*.rb', 'lib/**/*.rb'].each do |ruby_file|
+ sh "ruby -c #{ruby_file}" unless ruby_file =~ %r{spec/fixtures}
+ end
+ Dir['templates/**/*.erb'].each do |template|
+ sh "erb -P -x -T '-' #{template} | ruby -c"
+ end
+end
+
+desc 'Run lint, validate, and spec tests.'
+task :test do
+ [:lint, :validate, :spec].each do |test|
+ Rake::Task[test].invoke
+ end
+end
--- /dev/null
+# The baseline for module testing used by Puppet Inc. is that each manifest
+# should have a corresponding test manifest that declares that class or defined
+# type.
+#
+# Tests are then run by using puppet apply --noop (to check for compilation
+# errors and view a log of events) or by fully applying the test in a virtual
+# environment (to compare the resulting system state to the desired state).
+#
+# Learn more about module testing here:
+# https://puppet.com/docs/puppet/latest/bgtm.html#testing-your-module
+#
+include ::sudo
--- /dev/null
+{
+ "name": "madduck-sudo",
+ "version": "0.1.0",
+ "author": "madduck",
+ "summary": "Manage sudo settings/aliases/rules in sudoers.d files",
+ "license": "Apache-2.0",
+ "source": "https://git.madduck.net/puppet/sudo.git",
+ "project_page": "https://git.madduck.net/puppet/sudo.git/blob/HEAD:/README.md",
+ "issues_url": "mailto:patches@git.madduck.net",
+ "dependencies": [
+ {
+ "name": "puppetlabs-stdlib",
+ "version_requirement": ">= 1.0.0"
+ }
+ ],
+ "data_provider": null
+}
--- /dev/null
+require 'spec_helper'
+describe 'sudo' do
+ context 'with default values for all parameters' do
+ it { should contain_class('sudo') }
+ end
+end
--- /dev/null
+require 'puppetlabs_spec_helper/module_spec_helper'