Skip to content

Commit

Permalink
Update to use standard Gemfile, .travis.yml, and Rakefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Morgan Haskel committed Mar 3, 2015
1 parent 1d2a500 commit 132876d
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 86 deletions.
8 changes: 2 additions & 6 deletions .fixtures.yml
@@ -1,10 +1,6 @@
fixtures:
repositories:
concat:
repo: 'git://github.com/puppetlabs/puppetlabs-concat.git'
ref: '1.1.0'
stdlib:
repo: 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
ref: '4.1.0'
concat: 'git://github.com/puppetlabs/puppetlabs-concat.git'
stdlib: 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
symlinks:
dhcp: "#{source_dir}"
36 changes: 7 additions & 29 deletions .gitignore
@@ -1,31 +1,9 @@
# Default .gitignore for Ruby
*.gem
*.rbc
.bundle
.config
coverage
InstalledFiles
lib/bundler/man
pkg
rdoc
spec/reports
test/tmp
test/version_tmp
tmp

# YARD artifacts
.yardoc
_yardoc
doc/

# Vim
*.swp

# OS X
.DS_Store

# Puppet
coverage/
spec/fixtures/modules/*
pkg/
Gemfile.lock
vendor/
spec/fixtures/
.vagrant/
.bundle/
coverage/
.idea/
*.iml
42 changes: 9 additions & 33 deletions .travis.yml
@@ -1,39 +1,15 @@
---
language: ruby

rvm:
- 1.8.7
- 1.9.3
- 2.0.0
- 2.1.0

env:
matrix:
- PUPPET_GEM_VERSION="~> 3.1.0"
- PUPPET_GEM_VERSION="~> 3.2.0"
- PUPPET_GEM_VERSION="~> 3.3.0"
- PUPPET_GEM_VERSION="~> 3.4.0"
- PUPPET_GEM_VERSION="~> 3.5.1"
- PUPPET_GEM_VERSION="~> 3.6.0"
- PUPPET_GEM_VERSION="~> 3.7.0"

sudo: false

script: 'bundle exec rake validate && bundle exec rake lint && SPEC_OPTS="--format documentation" bundle exec rake spec'

bundler_args: --without system_tests
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--format documentation'"
matrix:
fast_finish: true
exclude:
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.1.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.2.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.3.0"
- rvm: 2.1.0
env: PUPPET_GEM_VERSION="~> 3.4.0"

include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0"
notifications:
email: false
28 changes: 24 additions & 4 deletions Gemfile
@@ -1,11 +1,31 @@
source 'https://rubygems.org'
source ENV['GEM_SOURCE'] || "https://rubygems.org"

group :development, :unit_tests do
gem 'rake', :require => false
gem 'rspec-core', '3.1.7', :require => false
gem 'rspec-puppet', '~> 1.0', :require => false
gem 'puppetlabs_spec_helper', :require => false
gem 'puppet-lint', :require => false
gem 'simplecov', :require => false
gem 'puppet_facts', :require => false
gem 'json', :require => false
end

group :system_tests do
gem 'beaker-rspec', :require => false
gem 'serverspec', :require => false
end

if facterversion = ENV['FACTER_GEM_VERSION']
gem 'facter', facterversion, :require => false
else
gem 'facter', :require => false
end

if puppetversion = ENV['PUPPET_GEM_VERSION']
gem 'puppet', puppetversion, :require => false
else
gem 'puppet', :require => false
end

gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 1.0.0'
gem 'facter', '>= 1.7.0'
# vim:ft=ruby
20 changes: 6 additions & 14 deletions Rakefile
@@ -1,18 +1,10 @@
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.fail_on_warnings = true
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.relative = true
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_documentation')
PuppetLint.configuration.send('disable_single_quote_string_with_variables')
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 =~ /spec\/fixtures/
end
Dir['templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c"
end
end

0 comments on commit 132876d

Please sign in to comment.