Skip to content
This repository has been archived by the owner on Jun 11, 2019. It is now read-only.

Commit

Permalink
Enabling Travis integration
Browse files Browse the repository at this point in the history
  • Loading branch information
alvagante committed Mar 7, 2013
1 parent 345ee40 commit 1bf38b9
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 42 deletions.
10 changes: 10 additions & 0 deletions .fixtures.yml
@@ -0,0 +1,10 @@
fixtures:
repositories:
"puppi": "git://github.com/example42/puppi.git"
"monitor": "git://github.com/example42/puppet-monitor.git"
"firewall": "git://github.com/example42/puppet-firewall.git"
"iptables": "git://github.com/example42/puppet-iptables.git"
"concat": "git://github.com/example42/puppet-concat.git"
symlinks:
"puppet": "#{source_dir}"

6 changes: 6 additions & 0 deletions .gemfile
@@ -0,0 +1,6 @@
source :rubygems

puppetversion = ENV['PUPPET_VERSION']
gem 'puppet', puppetversion, :require => false
gem 'puppet-lint'
gem 'puppetlabs_spec_helper', '>= 0.1.0'
24 changes: 14 additions & 10 deletions .travis.yml
@@ -1,17 +1,21 @@
language: ruby
rvm:
- 1.8.7
before_script:
after_script:
script: "rake spec"
branches:
only:
- master
- 1.9.3
script:
- "rake spec SPEC_OPTS='--format documentation'"
env:
- PUPPET_VERSION=2.7.13
- PUPPET_VERSION=2.7.6
- PUPPET_VERSION=2.6.9
- PUPPET_VERSION="~> 2.6.0"
- PUPPET_VERSION="~> 2.7.0"
- PUPPET_VERSION="~> 3.0.0"
- PUPPET_VERSION="~> 3.1.0"
matrix:
exclude:
- rvm: 1.9.3
env: PUPPET_VERSION="~> 2.6.0"
gemfile: .gemfile

gemfile: .gemfile
notifications:
email:
- al@lab42.it
gemfile: .gemfile
14 changes: 5 additions & 9 deletions Rakefile
@@ -1,9 +1,5 @@
require 'rake'
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:test) do |t|
t.rspec_opts = ["--format", "doc", "--color"]
t.pattern = 'spec/*/*_spec.rb'
end

task :default => :test
require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint'
PuppetLint.configuration.send("disable_80chars")
PuppetLint.configuration.send('disable_class_parameter_defaults')
24 changes: 1 addition & 23 deletions spec/spec_helper.rb
@@ -1,23 +1 @@
# Based on https://github.com/puppetlabs/puppetlabs-ntp/blob/master/spec/spec_helper.rb
# Thanks to Ken Barber for advice about http://projects.puppetlabs.com/issues/11191
require 'puppet'
require 'rspec-puppet'
require 'tmpdir'

RSpec.configure do |c|
c.before :each do
# Create a temporary puppet confdir area and temporary site.pp so
# when rspec-puppet runs we don't get a puppet error.
@puppetdir = Dir.mktmpdir("puppet")
manifestdir = File.join(@puppetdir, "manifests")
Dir.mkdir(manifestdir)
FileUtils.touch(File.join(manifestdir, "site.pp"))
Puppet[:confdir] = @puppetdir
end

c.after :each do
FileUtils.remove_entry_secure(@puppetdir)
end

c.module_path = File.join(File.dirname(__FILE__), '../../')
end
require 'puppetlabs_spec_helper/module_spec_helper'

0 comments on commit 1bf38b9

Please sign in to comment.