File tree Expand file tree Collapse file tree 5 files changed +105
-0
lines changed Expand file tree Collapse file tree 5 files changed +105
-0
lines changed Original file line number Diff line number Diff line change @@ -72,6 +72,8 @@ include software::editors::textmate
72
72
include software::entertainment::vlc
73
73
include software::idesdk::android_studio
74
74
include software::idesdk::android_tools
75
+ include software::idesdk::pdk
76
+ include software::idesdk::tfenv
75
77
include software::prefpanes::launchrocket
76
78
include software::social::skype
77
79
include software::social::slack
Original file line number Diff line number Diff line change
1
+ # pdk.pp
2
+ # Install Puppet Development Kit
3
+ # https://puppet.com/docs/pdk/1.x/pdk.html
4
+ #
5
+
6
+ class software::idesdk::pdk (
7
+ $ensure = $software::params::software_ensure,
8
+ ) inherits software::params {
9
+
10
+ case $facts [' os' ][' name' ] {
11
+ ' Darwin' : {
12
+ package { 'puppetlabs/puppet/pdk' :
13
+ ensure => $ensure ,
14
+ provider => brewcask,
15
+ }
16
+ }
17
+ ' Debian' , ' Ubuntu' : {
18
+ package { 'pdk' :
19
+ ensure => $ensure ,
20
+ }
21
+ }
22
+ ' windows' : {
23
+ package { 'pdk' :
24
+ ensure => $ensure ,
25
+ provider => chocolatey,
26
+ }
27
+ }
28
+ default: {
29
+ fail(" The ${name} class is not supported on ${facts['os']['name']}." )
30
+ }
31
+ }
32
+
33
+ }
Original file line number Diff line number Diff line change
1
+ # tfenv.pp
2
+ # Install Terraform version manager
3
+ # https://github.com/Zordrak/tfenv
4
+ #
5
+
6
+ class software::idesdk::tfenv (
7
+ $ensure = $software::params::software_ensure,
8
+ ) inherits software::params {
9
+
10
+ case $facts [' os' ][' name' ] {
11
+ ' Darwin' : {
12
+ package { 'tfenv' :
13
+ ensure => $ensure ,
14
+ provider => brew,
15
+ }
16
+ }
17
+ default: {
18
+ fail(" The ${name} class is not supported on ${facts['os']['name']}." )
19
+ }
20
+ }
21
+
22
+ }
Original file line number Diff line number Diff line change
1
+ require 'spec_helper'
2
+
3
+ describe 'software::idesdk::pdk' do
4
+ on_supported_os . each do |os , facts |
5
+ context "on #{ os } " do
6
+ let ( :facts ) do
7
+ facts
8
+ end
9
+
10
+ context 'with defaults' do
11
+ # rubocop:disable RSpec/RepeatedExample
12
+ if facts [ :os ] [ 'name' ] == 'Darwin'
13
+ it { is_expected . to compile . with_all_deps }
14
+ it { is_expected . to contain_package ( 'puppetlabs/puppet/pdk' ) . with_provider ( 'brewcask' ) }
15
+ elsif facts [ :os ] [ 'name' ] =~ %r{^(Debian|Ubuntu)$}
16
+ it { is_expected . to compile . with_all_deps }
17
+ it { is_expected . to contain_package ( 'pdk' ) }
18
+ elsif facts [ :os ] [ 'name' ] == 'windows'
19
+ it { is_expected . to compile . with_all_deps }
20
+ it { is_expected . to contain_package ( 'pdk' ) . with_provider ( 'chocolatey' ) }
21
+ else
22
+ it { is_expected . to compile . and_raise_error ( %r{is not supported on } ) }
23
+ end
24
+ # rubocop:enable RSpec/RepeatedExample
25
+ end
26
+ end
27
+ end
28
+ end
Original file line number Diff line number Diff line change
1
+ require 'spec_helper'
2
+
3
+ describe 'software::idesdk::tfenv' do
4
+ on_supported_os . each do |os , facts |
5
+ context "on #{ os } " do
6
+ let ( :facts ) do
7
+ facts
8
+ end
9
+
10
+ context 'with defaults' do
11
+ if facts [ :os ] [ 'name' ] == 'Darwin'
12
+ it { is_expected . to compile . with_all_deps }
13
+ it { is_expected . to contain_package ( 'tfenv' ) . with_provider ( 'brew' ) }
14
+ else
15
+ it { is_expected . to compile . and_raise_error ( %r{is not supported on } ) }
16
+ end
17
+ end
18
+ end
19
+ end
20
+ end
You can’t perform that action at this time.
0 commit comments