Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Parameterise the xquartz class
Browse files Browse the repository at this point in the history
Allows module users to specify their own version of xquartz without
having to bump the module version.
  • Loading branch information
dgoodlad committed Jun 10, 2014
1 parent e8ddb7f commit 3aea4da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 4 additions & 2 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
}
2 changes: 2 additions & 0 deletions spec/classes/xquartz_spec.rb
Original file line number Diff line number Diff line change
@@ -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',
Expand Down

0 comments on commit 3aea4da

Please sign in to comment.