Commit 232a8c23 authored by James T. Lee's avatar James T. Lee
Browse files

Remove old module skeleton artifacts

parent 5f98115a
--format documentation
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'
gem 'rspec-puppet-facts', '~> 1.7', :require => false
# 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
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
require 'spec_helper'
describe 'nest' do
on_supported_os(facterversion: '2.4').each do |os, facts|
context "on #{os}" do
let(:facts) { facts }
it { should compile.with_all_deps }
end
end
end
---
:backends:
- yaml
:yaml:
:datadir: './spec/fixtures/hieradata'
:hierarchy:
- 'default'
---
nest::nestfs_hostname: 'nestfs.example.com'
nest::openvpn_hostname: 'openvpn.example.com'
nest::nullmailer_config: ''
nest::root_mail_alias: 'root@example.com'
nest::ssh_private_key: ''
nest::pw_hash: ''
ENV['STRICT_VARIABLES'] ||= 'no'
require 'puppetlabs_spec_helper/module_spec_helper'
require 'rspec-puppet-facts'
include RspecPuppetFacts
add_custom_fact :memory, {'system' => {'total_bytes' => '8589934592'}}
add_custom_fact :nest, {}
add_custom_fact :portage_cflags, '', :confine => 'gentoo-3-x86_64'
add_custom_fact :portage_cpu_flags_x86, '', :confine => 'gentoo-3-x86_64'
add_custom_fact :mountpoints, {}, :confine => 'gentoo-3-x86_64'
RSpec.configure do |c|
c.hiera_config = File.expand_path(File.join(__FILE__, '../fixtures/hiera.yaml'))
end
Markdown is supported
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