@@ -24,13 +24,13 @@ module IIS
24
24
# Contains functions that are used throughout this cookbook
25
25
module Processors
26
26
def default_documents ( default_document , default_documents_enabled , add = true , remove = true , specifier = '' )
27
- cmd = get_default_documents_command specifier
27
+ cmd = shell_out! get_default_documents_command specifier
28
28
return unless cmd . stderr . empty?
29
29
xml = cmd . stdout
30
- doc = Document . new xml
30
+ doc = REXML :: Document . new xml
31
31
32
32
is_new_default_documents_enabled = new_value? ( doc . root , 'CONFIG/system.webServer-defaultDocument/@enabled' , default_documents_enabled . to_s )
33
- current_default_documents = XPath . match ( doc . root , 'CONFIG/system.webServer-defaultDocument/files/add/@value' ) . map ( &:value )
33
+ current_default_documents = REXML :: XPath . match ( doc . root , 'CONFIG/system.webServer-defaultDocument/files/add/@value' ) . map ( &:value )
34
34
cmd = default_documents_command specifier
35
35
36
36
if is_new_default_documents_enabled
@@ -66,10 +66,10 @@ def mime_maps(new_resource_mime_maps, add = true, remove = true, specifier = '')
66
66
cmd = shell_out get_mime_map_command specifier
67
67
return unless cmd . stderr . empty?
68
68
xml = cmd . stdout
69
- doc = Document . new xml
70
- current_mime_maps = XPath . match ( doc . root , 'CONFIG/system.webServer-staticContent/mimeMap' ) . map { |x | "fileExtension='#{ x . attribute 'fileExtension' } ',mimeType='#{ x . attribute 'mimeType' } '" }
69
+ doc = REXML :: Document . new xml
70
+ current_mime_maps = REXML :: XPath . match ( doc . root , 'CONFIG/system.webServer-staticContent/mimeMap' ) . map { |x | "fileExtension='#{ x . attribute 'fileExtension' } ',mimeType='#{ x . attribute 'mimeType' } '" }
71
71
72
- cmd = set_mime_map_command specifier
72
+ cmd = mime_map_command specifier
73
73
74
74
if add || remove
75
75
new_resource_mime_maps . each do |mime_map |
0 commit comments