lib/specinfra/backend/cmd.rb in specinfra-1.0.1 vs lib/specinfra/backend/cmd.rb in specinfra-1.0.2

- old
+ new

@@ -36,17 +36,17 @@ end private def powershell - architecture = @example.metadata[:architecture] || SpecInfra.configuration.architecture + architecture = @example.metadata[:architecture] || SpecInfra.configuration.architecture - case architecture - when :i386 then x86_powershell - when :x86_64 then x64_powershell - else raise ArgumentError, "invalid architecture [#{architecture}]" - end + case architecture + when :i386 then x86_powershell + when :x86_64 then x64_powershell + else raise ArgumentError, "invalid architecture [#{architecture}]" + end end def x64_powershell find_powershell(%w(sysnative system32)) end @@ -54,11 +54,10 @@ def x86_powershell find_powershell(%w(syswow64 system32)) end def find_powershell(dirs) - dirs.map { |dir| "#{ENV['WINDIR']}\\#{dir}\\WindowsPowerShell\\v1.0\\powershell.exe" } - .find { |exe| File.exists?(exe) } || 'powershell' + ( dirs.map { |dir| "#{ENV['WINDIR']}\\#{dir}\\WindowsPowerShell\\v1.0\\powershell.exe" } ).find { |exe| File.exists?(exe) } || 'powershell' end end end end