From 93c387ac6b122c184281761f76c9aeb6f3271b55 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Wed, 22 Jul 2015 13:59:36 +0100 Subject: [PATCH 1/5] make array matching ignore order for bindings Signed-off-by: Stephen Gran --- lib/puppet/type/iis_site.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/puppet/type/iis_site.rb b/lib/puppet/type/iis_site.rb index aa477c1..63c16b4 100644 --- a/lib/puppet/type/iis_site.rb +++ b/lib/puppet/type/iis_site.rb @@ -359,5 +359,8 @@ newproperty(:bindings, :array_matching => :all) do desc "" + def in_sync?(is) + is.to_a.flatten.sort == @should.sort + end end end From d24c4efd8eae86baa3cb422a472354d8e504db16 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Tue, 28 Jul 2015 15:22:36 +0100 Subject: [PATCH 2/5] make this a piksel module Signed-off-by: Stephen Gran --- Modulefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Modulefile b/Modulefile index b357216..d2706c5 100644 --- a/Modulefile +++ b/Modulefile @@ -1,8 +1,8 @@ -name 'simondean-iis' -version '0.1.3' +name 'piksel-iis' +version '0.1.4' summary 'IIS module. Configures app pools, sites, applications and virtual directories.' description 'IIS module. Configures app pools, sites, applications and virtual directories.' -project_page 'https://github.com/simondean/puppet-iis' +project_page 'https://github.com/pikselpalette/puppet-iis' license 'Apache License, Version 2.0' author 'Simon Dean' -source 'https://github.com/simondean/puppet-iis' +source 'https://github.com/pikselpalette/puppet-iis' From 3525a5267e89c61cb539cbfc8ec01a25e7ba8cb9 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Tue, 28 Jul 2015 16:18:14 +0100 Subject: [PATCH 3/5] set default iis_app for iis_vdir Signed-off-by: Stephen Gran --- lib/puppet/type/iis_vdir.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/puppet/type/iis_vdir.rb b/lib/puppet/type/iis_vdir.rb index 22f1b4f..dc3fb64 100644 --- a/lib/puppet/type/iis_vdir.rb +++ b/lib/puppet/type/iis_vdir.rb @@ -46,8 +46,9 @@ end validate do - iis_app = self[:iis_app] name = self[:name] + self[:iis_app] ||= name + iis_app = self[:iis_app] raise Puppet::Error, "name should start with '#{iis_app.chomp('/')}'" unless ensure_trailing_slash(name).start_with?(ensure_trailing_slash(iis_app)) From 5030dcc30480bae67241a06b434e5e8b918494f8 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Tue, 28 Jul 2015 16:21:26 +0100 Subject: [PATCH 4/5] change author field Signed-off-by: Stephen Gran --- Modulefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modulefile b/Modulefile index d2706c5..76c636e 100644 --- a/Modulefile +++ b/Modulefile @@ -4,5 +4,5 @@ summary 'IIS module. Configures app pools, sites, applications and virtual direc description 'IIS module. Configures app pools, sites, applications and virtual directories.' project_page 'https://github.com/pikselpalette/puppet-iis' license 'Apache License, Version 2.0' -author 'Simon Dean' +author 'piksel' source 'https://github.com/pikselpalette/puppet-iis' From 4c9335d2af186f319d698fbbc2afebee1ef944ae Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Thu, 5 Nov 2015 11:54:53 +0000 Subject: [PATCH 5/5] Fix array comparison method the method to call is insync, not in_sync. --- lib/puppet/type/iis_site.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/puppet/type/iis_site.rb b/lib/puppet/type/iis_site.rb index 63c16b4..a3bb464 100644 --- a/lib/puppet/type/iis_site.rb +++ b/lib/puppet/type/iis_site.rb @@ -359,8 +359,12 @@ newproperty(:bindings, :array_matching => :all) do desc "" - def in_sync?(is) - is.to_a.flatten.sort == @should.sort + def insync?(is) + is.to_a.flatten.sort == @should.to_a.flatten.sort + end + + def should_to_s(s) + s.inspect end end end