From 3aea4da7bfe7fdddc7ece6d2f74880489594d22e Mon Sep 17 00:00:00 2001 From: David Goodlad Date: Tue, 10 Jun 2014 13:12:59 +0200 Subject: [PATCH 1/2] Parameterise the xquartz class Allows module users to specify their own version of xquartz without having to bump the module version. --- manifests/init.pp | 6 ++++-- spec/classes/xquartz_spec.rb | 2 ++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index 9b87915..5e12a22 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -3,9 +3,11 @@ # Examples # # include xquartz -class xquartz { +class xquartz ( + $version = '2.7.5', +) { package { 'XQuartz': provider => 'pkgdmg', - source => 'http://xquartz.macosforge.org/downloads/SL/XQuartz-2.7.5.dmg', + source => "http://xquartz.macosforge.org/downloads/SL/XQuartz-${version}.dmg", } } diff --git a/spec/classes/xquartz_spec.rb b/spec/classes/xquartz_spec.rb index c84b00b..2849fa6 100644 --- a/spec/classes/xquartz_spec.rb +++ b/spec/classes/xquartz_spec.rb @@ -1,6 +1,8 @@ require 'spec_helper' describe 'xquartz' do + let(:params) { {:version => '2.7.5'} } + it do should contain_package('XQuartz').with({ :provider => 'pkgdmg', From f7b7f229ff14f0536065b79efc4dc3a43c735ca2 Mon Sep 17 00:00:00 2001 From: David Goodlad Date: Tue, 10 Jun 2014 13:13:58 +0200 Subject: [PATCH 2/2] Bump to XQuartz 2.7.6 by default --- manifests/init.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 5e12a22..8cb8a08 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -4,7 +4,7 @@ # # include xquartz class xquartz ( - $version = '2.7.5', + $version = '2.7.6', ) { package { 'XQuartz': provider => 'pkgdmg',