Skip to content

Commit

Permalink
order and fix tests for travis-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerder committed Dec 12, 2014
1 parent be37095 commit d6294e8
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 46 deletions.
8 changes: 6 additions & 2 deletions .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
fixtures:
repositories:
"stdlib": "git://github.com/puppetlabs/puppetlabs-stdlib.git"
"concat": "git://github.com/puppetlabs/puppetlabs-concat.git"
stdlib:
repo: "git://github.com/puppetlabs/puppetlabs-stdlib.git"
ref: "3.2.0"
logrotate:
repo: "git://github.com/puppetlabs/puppetlabs-concat.git"
ref: "1.0.0"
symlinks:
"nfs": "#{source_dir}"
6 changes: 0 additions & 6 deletions .gitmodules

This file was deleted.

29 changes: 16 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
---
language: ruby
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- ree
before_install:
- git submodule update --init --recursive
script: "rake spec"
env:
- PUPPET_VERSION=2.7.20
- PUPPET_VERSION=3.0.2
- PUPPET_VERSION=3.1.0
- PUPPET_VERSION=3.4.3
bundler_args: --without system_tests
script: "bundle exec rake validate && bundle exec rake lint && bundle exec rake spec SPEC_OPTS='--color --format documentation'"
matrix:
fast_finish: true
include:
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
- rvm: 1.8.7
env: PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
- rvm: 1.9.3
env: PUPPET_GEM_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_GEM_VERSION="~> 3.0"
notifications:
email: false
15 changes: 4 additions & 11 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
source 'https://rubygems.org'


if ENV.key?('PUPPET_VERSION')
puppetversion = "= #{ENV['PUPPET_VERSION']}"
else
puppetversion = ['>= 2.7']
end

gem 'rake'
gem 'puppet-lint'
gem 'rspec-puppet'
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 3.3']
gem 'puppet', puppetversion
gem 'puppetlabs_spec_helper'
gem 'puppetlabs_spec_helper', '>= 0.1.0'
gem 'puppet-lint', '>= 0.3.2'
gem 'facter', '>= 1.7.0'
12 changes: 0 additions & 12 deletions Modulefile

This file was deleted.

25 changes: 23 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'

PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", 'tests/**/*.pp']
PuppetLint.configuration.fail_on_warnings
PuppetLint.configuration.send('relative')
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_class_inherits_from_params_class')
PuppetLint.configuration.send('disable_class_parameter_defaults')
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 in lib."
task :validate do
Dir['manifests/**/*.pp'].each do |manifest|
sh "puppet parser validate --noop #{manifest}"
end
Dir['lib/**/*.rb'].each do |lib_file|
sh "ruby -c #{lib_file}"
end
Dir['templates/**/*.erb'].each do |template|
sh "erb -P -x -T '-' #{template} | ruby -c"
end
end

task :test => [:spec, :lint]

task :default => :test
task :default => :test
14 changes: 14 additions & 0 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "echocat-nfs",
"version": "1.2.0",
"source": "git clone https://github.com/echocat/puppet-nfs.git",
"author": "echocat",
"license": "Apache 2.0",
"summary": "Installs and configures NFS server and clients",
"project_page": "https://github.com/echocat/puppet-nfs",
"issues_url": "https://github.com/echocat/puppet-nfs/issues",
"dependencies": [
{"name":"puppetlabs-stdlib","version_requirement":">= 3.2.0"},
{"name":"puppetlabs-concat","version_requirement":">= 1.0.0"}
]
}

0 comments on commit d6294e8

Please sign in to comment.