diff options
author | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
commit | 51cfbdc4d16739caac4d946fadbe678444aafe34 (patch) | |
tree | 56dfd8f1cd9fd933de27268b32402e955a43ac2b /lib/chef/win32 | |
parent | 05064423057d4cf46f4713b81b08829cf6d20af6 (diff) | |
download | chef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz |
Use double quotes by default
This is an entirely mechanically generated (chefstyle -a) change, to go
along with chef/chefstyle#5 . We should pick something and use it
consistently, and my opinion is that double quotes are the appropriate
thing.
Diffstat (limited to 'lib/chef/win32')
36 files changed, 202 insertions, 202 deletions
diff --git a/lib/chef/win32/api.rb b/lib/chef/win32/api.rb index de3381c5ba..63f7dbdab7 100644 --- a/lib/chef/win32/api.rb +++ b/lib/chef/win32/api.rb @@ -17,9 +17,9 @@ # limitations under the License. # -require 'ffi' -require 'chef/reserved_names' -require 'chef/exceptions' +require "ffi" +require "chef/reserved_names" +require "chef/exceptions" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/crypto.rb b/lib/chef/win32/api/crypto.rb index cf32287a17..9cf8387433 100644 --- a/lib/chef/win32/api/crypto.rb +++ b/lib/chef/win32/api/crypto.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -28,7 +28,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'Crypt32' + ffi_lib "Crypt32" CRYPTPROTECT_UI_FORBIDDEN = 0x1 CRYPTPROTECT_LOCAL_MACHINE = 0x4 diff --git a/lib/chef/win32/api/error.rb b/lib/chef/win32/api/error.rb index d1f9a309fe..0ea3633202 100644 --- a/lib/chef/win32/api/error.rb +++ b/lib/chef/win32/api/error.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -877,7 +877,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'kernel32', 'user32' + ffi_lib "kernel32", "user32" =begin DWORD WINAPI FormatMessage( diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb index 3618d125a1..51ae3b47c7 100644 --- a/lib/chef/win32/api/file.rb +++ b/lib/chef/win32/api/file.rb @@ -17,10 +17,10 @@ # limitations under the License. # -require 'chef/win32/api' -require 'chef/win32/api/security' -require 'chef/win32/api/system' -require 'chef/win32/unicode' +require "chef/win32/api" +require "chef/win32/api/security" +require "chef/win32/api/system" +require "chef/win32/unicode" class Chef module ReservedNames::Win32 @@ -182,7 +182,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'kernel32', 'version' + ffi_lib "kernel32", "version" # Does not map directly to a win32 struct # see https://msdn.microsoft.com/en-us/library/windows/desktop/ms647464(v=vs.85).aspx diff --git a/lib/chef/win32/api/installer.rb b/lib/chef/win32/api/installer.rb index b4851eccf1..20d021b9ab 100644 --- a/lib/chef/win32/api/installer.rb +++ b/lib/chef/win32/api/installer.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require 'chef/exceptions' -require 'chef/win32/api' -require 'chef/win32/error' -require 'pathname' +require "chef/exceptions" +require "chef/win32/api" +require "chef/win32/error" +require "pathname" class Chef module ReservedNames::Win32 @@ -37,7 +37,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'msi' + ffi_lib "msi" =begin UINT MsiOpenPackage( diff --git a/lib/chef/win32/api/memory.rb b/lib/chef/win32/api/memory.rb index abd1191718..2c3e305f08 100644 --- a/lib/chef/win32/api/memory.rb +++ b/lib/chef/win32/api/memory.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -48,7 +48,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'kernel32' + ffi_lib "kernel32" =begin HLOCAL WINAPI LocalAlloc( diff --git a/lib/chef/win32/api/net.rb b/lib/chef/win32/api/net.rb index 7a578a3833..a3710bdaf5 100644 --- a/lib/chef/win32/api/net.rb +++ b/lib/chef/win32/api/net.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require 'chef/win32/api' -require 'chef/win32/unicode' +require "chef/win32/api" +require "chef/win32/unicode" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/process.rb b/lib/chef/win32/api/process.rb index 217880b737..6c4e567f74 100644 --- a/lib/chef/win32/api/process.rb +++ b/lib/chef/win32/api/process.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -28,7 +28,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'kernel32' + ffi_lib "kernel32" safe_attach_function :GetCurrentProcess, [], :HANDLE safe_attach_function :GetProcessHandleCount, [ :HANDLE, :LPDWORD ], :BOOL diff --git a/lib/chef/win32/api/psapi.rb b/lib/chef/win32/api/psapi.rb index 3a5df3f179..347396b50a 100644 --- a/lib/chef/win32/api/psapi.rb +++ b/lib/chef/win32/api/psapi.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -41,7 +41,7 @@ class Chef :PeakPagefileUsage, :SIZE_T end - ffi_lib 'psapi' + ffi_lib "psapi" safe_attach_function :GetProcessMemoryInfo, [ :HANDLE, :pointer, :DWORD ], :BOOL diff --git a/lib/chef/win32/api/registry.rb b/lib/chef/win32/api/registry.rb index cbbf6b66bb..d01700f159 100644 --- a/lib/chef/win32/api/registry.rb +++ b/lib/chef/win32/api/registry.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -28,7 +28,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'advapi32' + ffi_lib "advapi32" # LONG WINAPI RegDeleteKeyEx( # _In_ HKEY hKey, diff --git a/lib/chef/win32/api/security.rb b/lib/chef/win32/api/security.rb index 06fdf650f4..13b86fb670 100644 --- a/lib/chef/win32/api/security.rb +++ b/lib/chef/win32/api/security.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/api/synchronization.rb b/lib/chef/win32/api/synchronization.rb index 9c148d7e2b..b541e5aaf3 100644 --- a/lib/chef/win32/api/synchronization.rb +++ b/lib/chef/win32/api/synchronization.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -24,7 +24,7 @@ class Chef module Synchronization extend Chef::ReservedNames::Win32::API - ffi_lib 'kernel32' + ffi_lib "kernel32" # Constant synchronization functions use to indicate wait # forever. diff --git a/lib/chef/win32/api/system.rb b/lib/chef/win32/api/system.rb index a485f89708..218a9b95e7 100644 --- a/lib/chef/win32/api/system.rb +++ b/lib/chef/win32/api/system.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -132,7 +132,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'kernel32', 'user32' + ffi_lib "kernel32", "user32" class OSVERSIONINFOEX < FFI::Struct layout :dw_os_version_info_size, :DWORD, diff --git a/lib/chef/win32/api/unicode.rb b/lib/chef/win32/api/unicode.rb index 2a9166aa99..29cdfba5fd 100644 --- a/lib/chef/win32/api/unicode.rb +++ b/lib/chef/win32/api/unicode.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/api' +require "chef/win32/api" class Chef module ReservedNames::Win32 @@ -92,7 +92,7 @@ class Chef # Win32 API Bindings ############################################### - ffi_lib 'kernel32', 'advapi32' + ffi_lib "kernel32", "advapi32" =begin BOOL IsTextUnicode( diff --git a/lib/chef/win32/crypto.rb b/lib/chef/win32/crypto.rb index e9c1da954b..8804872ee1 100644 --- a/lib/chef/win32/crypto.rb +++ b/lib/chef/win32/crypto.rb @@ -1,50 +1,50 @@ -#
-# Author:: Jay Mundrawala (<jdm@chef.io>)
-# Copyright:: Copyright 2015 Chef Software, Inc.
-# License:: Apache License, Version 2.0
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-require 'chef/win32/error'
-require 'chef/win32/api/memory'
-require 'chef/win32/api/crypto'
-require 'chef/win32/unicode'
-require 'digest'
-
-class Chef
- module ReservedNames::Win32
- class Crypto
- include Chef::ReservedNames::Win32::API::Crypto
- extend Chef::ReservedNames::Win32::API::Crypto
-
- def self.encrypt(str, &block)
- data_blob = CRYPT_INTEGER_BLOB.new
- unless CryptProtectData(CRYPT_INTEGER_BLOB.new(str.to_wstring), nil, nil, nil, nil, CRYPTPROTECT_LOCAL_MACHINE, data_blob)
- Chef::ReservedNames::Win32::Error.raise!
- end
- bytes = data_blob[:pbData].get_bytes(0, data_blob[:cbData])
- if block
- block.call(bytes)
- else
- Digest.hexencode(bytes)
- end
- ensure
- unless data_blob[:pbData].null?
- Chef::ReservedNames::Win32::Memory.local_free(data_blob[:pbData])
- end
- end
-
- end
- end
-end
+# +# Author:: Jay Mundrawala (<jdm@chef.io>) +# Copyright:: Copyright 2015 Chef Software, Inc. +# License:: Apache License, Version 2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +require "chef/win32/error" +require "chef/win32/api/memory" +require "chef/win32/api/crypto" +require "chef/win32/unicode" +require "digest" + +class Chef + module ReservedNames::Win32 + class Crypto + include Chef::ReservedNames::Win32::API::Crypto + extend Chef::ReservedNames::Win32::API::Crypto + + def self.encrypt(str, &block) + data_blob = CRYPT_INTEGER_BLOB.new + unless CryptProtectData(CRYPT_INTEGER_BLOB.new(str.to_wstring), nil, nil, nil, nil, CRYPTPROTECT_LOCAL_MACHINE, data_blob) + Chef::ReservedNames::Win32::Error.raise! + end + bytes = data_blob[:pbData].get_bytes(0, data_blob[:cbData]) + if block + block.call(bytes) + else + Digest.hexencode(bytes) + end + ensure + unless data_blob[:pbData].null? + Chef::ReservedNames::Win32::Memory.local_free(data_blob[:pbData]) + end + end + + end + end +end diff --git a/lib/chef/win32/error.rb b/lib/chef/win32/error.rb index c638773d2a..75b65854a9 100644 --- a/lib/chef/win32/error.rb +++ b/lib/chef/win32/error.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require 'chef/win32/api/error' -require 'chef/win32/memory' -require 'chef/win32/unicode' -require 'chef/exceptions' +require "chef/win32/api/error" +require "chef/win32/memory" +require "chef/win32/unicode" +require "chef/exceptions" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/eventlog.rb b/lib/chef/win32/eventlog.rb index 24af2da0d6..a056900101 100644 --- a/lib/chef/win32/eventlog.rb +++ b/lib/chef/win32/eventlog.rb @@ -25,7 +25,7 @@ if Chef::Platform::windows? and not Chef::Platform::windows_server_2003? end end - require 'win32/eventlog' + require "win32/eventlog" Chef::Win32EventLogLoaded = true end end diff --git a/lib/chef/win32/file.rb b/lib/chef/win32/file.rb index abfad91fdb..3279e22ecf 100644 --- a/lib/chef/win32/file.rb +++ b/lib/chef/win32/file.rb @@ -17,11 +17,11 @@ # limitations under the License. # -require 'chef/mixin/wide_string' -require 'chef/win32/api/file' -require 'chef/win32/api/security' -require 'chef/win32/error' -require 'chef/win32/unicode' +require "chef/mixin/wide_string" +require "chef/win32/api/file" +require "chef/win32/api/security" +require "chef/win32/error" +require "chef/win32/unicode" class Chef module ReservedNames::Win32 @@ -214,5 +214,5 @@ class Chef end end -require 'chef/win32/file/info' -require 'chef/win32/file/version_info' +require "chef/win32/file/info" +require "chef/win32/file/version_info" diff --git a/lib/chef/win32/file/info.rb b/lib/chef/win32/file/info.rb index 0f07428106..70d04df9b8 100644 --- a/lib/chef/win32/file/info.rb +++ b/lib/chef/win32/file/info.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/file' +require "chef/win32/file" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/file/version_info.rb b/lib/chef/win32/file/version_info.rb index 30e9604ad1..bd7ed511a5 100644 --- a/lib/chef/win32/file/version_info.rb +++ b/lib/chef/win32/file/version_info.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'chef/win32/file' +require "chef/win32/file" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/handle.rb b/lib/chef/win32/handle.rb index 21a8fdf339..66a06f45ad 100644 --- a/lib/chef/win32/handle.rb +++ b/lib/chef/win32/handle.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require 'chef/win32/api/process' -require 'chef/win32/api/psapi' -require 'chef/win32/api/system' -require 'chef/win32/error' +require "chef/win32/api/process" +require "chef/win32/api/psapi" +require "chef/win32/api/system" +require "chef/win32/error" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/memory.rb b/lib/chef/win32/memory.rb index 8a61d27ef0..9c52b59b68 100644 --- a/lib/chef/win32/memory.rb +++ b/lib/chef/win32/memory.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require 'chef/win32/error' -require 'chef/win32/api/memory' +require "chef/win32/error" +require "chef/win32/api/memory" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/mutex.rb b/lib/chef/win32/mutex.rb index 0d8eba1b3c..b7b9f8fd51 100644 --- a/lib/chef/win32/mutex.rb +++ b/lib/chef/win32/mutex.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require 'chef/win32/api/synchronization' -require 'chef/win32/unicode' +require "chef/win32/api/synchronization" +require "chef/win32/unicode" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/net.rb b/lib/chef/win32/net.rb index 9e4f90b1b7..c3c57e7009 100644 --- a/lib/chef/win32/net.rb +++ b/lib/chef/win32/net.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'chef/win32/api/net' -require 'chef/win32/error' -require 'chef/mixin/wide_string' +require "chef/win32/api/net" +require "chef/win32/error" +require "chef/mixin/wide_string" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/process.rb b/lib/chef/win32/process.rb index 767d4f390c..9df686cc5f 100644 --- a/lib/chef/win32/process.rb +++ b/lib/chef/win32/process.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require 'chef/win32/api/process' -require 'chef/win32/api/psapi' -require 'chef/win32/error' -require 'chef/win32/handle' -require 'ffi' +require "chef/win32/api/process" +require "chef/win32/api/psapi" +require "chef/win32/error" +require "chef/win32/handle" +require "ffi" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb index af8de59d0f..e55539167a 100644 --- a/lib/chef/win32/registry.rb +++ b/lib/chef/win32/registry.rb @@ -16,15 +16,15 @@ # See the License for the specific language governing permissions and # limitations under the License. # -require 'chef/reserved_names' -require 'chef/win32/api' -require 'chef/mixin/wide_string' +require "chef/reserved_names" +require "chef/win32/api" +require "chef/mixin/wide_string" if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - require 'chef/monkey_patches/win32/registry' - require 'chef/win32/api/registry' - require 'win32/registry' - require 'win32/api' + require "chef/monkey_patches/win32/registry" + require "chef/win32/api/registry" + require "win32/registry" + require "win32/api" end class Chef diff --git a/lib/chef/win32/security.rb b/lib/chef/win32/security.rb index 38694c9fec..31128ad083 100644 --- a/lib/chef/win32/security.rb +++ b/lib/chef/win32/security.rb @@ -16,13 +16,13 @@ # limitations under the License. # -require 'chef/win32/api/security' -require 'chef/win32/error' -require 'chef/win32/memory' -require 'chef/win32/process' -require 'chef/win32/unicode' -require 'chef/win32/security/token' -require 'chef/mixin/wide_string' +require "chef/win32/api/security" +require "chef/win32/error" +require "chef/win32/memory" +require "chef/win32/process" +require "chef/win32/unicode" +require "chef/win32/security/token" +require "chef/mixin/wide_string" class Chef module ReservedNames::Win32 @@ -659,8 +659,8 @@ class Chef end end -require 'chef/win32/security/ace' -require 'chef/win32/security/acl' -require 'chef/win32/security/securable_object' -require 'chef/win32/security/security_descriptor' -require 'chef/win32/security/sid' +require "chef/win32/security/ace" +require "chef/win32/security/acl" +require "chef/win32/security/securable_object" +require "chef/win32/security/security_descriptor" +require "chef/win32/security/sid" diff --git a/lib/chef/win32/security/ace.rb b/lib/chef/win32/security/ace.rb index 1f54b1cafb..f23db2abcc 100644 --- a/lib/chef/win32/security/ace.rb +++ b/lib/chef/win32/security/ace.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require 'chef/win32/security' -require 'chef/win32/security/sid' -require 'chef/win32/memory' +require "chef/win32/security" +require "chef/win32/security/sid" +require "chef/win32/memory" -require 'ffi' +require "ffi" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/security/acl.rb b/lib/chef/win32/security/acl.rb index e129d5c9a0..aecf17ad1c 100644 --- a/lib/chef/win32/security/acl.rb +++ b/lib/chef/win32/security/acl.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'chef/win32/security' -require 'chef/win32/security/ace' -require 'ffi' +require "chef/win32/security" +require "chef/win32/security/ace" +require "ffi" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/security/securable_object.rb b/lib/chef/win32/security/securable_object.rb index 00655c9bab..73d4a695e0 100644 --- a/lib/chef/win32/security/securable_object.rb +++ b/lib/chef/win32/security/securable_object.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'chef/win32/security' -require 'chef/win32/security/acl' -require 'chef/win32/security/sid' +require "chef/win32/security" +require "chef/win32/security/acl" +require "chef/win32/security/sid" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/security/security_descriptor.rb b/lib/chef/win32/security/security_descriptor.rb index 658e9104b4..87ef90ecd5 100644 --- a/lib/chef/win32/security/security_descriptor.rb +++ b/lib/chef/win32/security/security_descriptor.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'chef/win32/security' -require 'chef/win32/security/acl' -require 'chef/win32/security/sid' +require "chef/win32/security" +require "chef/win32/security/acl" +require "chef/win32/security/sid" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/security/sid.rb b/lib/chef/win32/security/sid.rb index f8bd934876..5e7edf2733 100644 --- a/lib/chef/win32/security/sid.rb +++ b/lib/chef/win32/security/sid.rb @@ -16,11 +16,11 @@ # limitations under the License. # -require 'chef/win32/security' -require 'chef/win32/api/net' -require 'chef/win32/api/error' +require "chef/win32/security" +require "chef/win32/api/net" +require "chef/win32/api/error" -require 'wmi-lite/wmi' +require "wmi-lite/wmi" class Chef module ReservedNames::Win32 @@ -78,115 +78,115 @@ class Chef # Well-known SIDs def self.Null - SID.from_string_sid('S-1-0') + SID.from_string_sid("S-1-0") end def self.Nobody - SID.from_string_sid('S-1-0-0') + SID.from_string_sid("S-1-0-0") end def self.World - SID.from_string_sid('S-1-1') + SID.from_string_sid("S-1-1") end def self.Everyone - SID.from_string_sid('S-1-1-0') + SID.from_string_sid("S-1-1-0") end def self.Local - SID.from_string_sid('S-1-2') + SID.from_string_sid("S-1-2") end def self.Creator - SID.from_string_sid('S-1-3') + SID.from_string_sid("S-1-3") end def self.CreatorOwner - SID.from_string_sid('S-1-3-0') + SID.from_string_sid("S-1-3-0") end def self.CreatorGroup - SID.from_string_sid('S-1-3-1') + SID.from_string_sid("S-1-3-1") end def self.CreatorOwnerServer - SID.from_string_sid('S-1-3-2') + SID.from_string_sid("S-1-3-2") end def self.CreatorGroupServer - SID.from_string_sid('S-1-3-3') + SID.from_string_sid("S-1-3-3") end def self.NonUnique - SID.from_string_sid('S-1-4') + SID.from_string_sid("S-1-4") end def self.Nt - SID.from_string_sid('S-1-5') + SID.from_string_sid("S-1-5") end def self.Dialup - SID.from_string_sid('S-1-5-1') + SID.from_string_sid("S-1-5-1") end def self.Network - SID.from_string_sid('S-1-5-2') + SID.from_string_sid("S-1-5-2") end def self.Batch - SID.from_string_sid('S-1-5-3') + SID.from_string_sid("S-1-5-3") end def self.Interactive - SID.from_string_sid('S-1-5-4') + SID.from_string_sid("S-1-5-4") end def self.Service - SID.from_string_sid('S-1-5-6') + SID.from_string_sid("S-1-5-6") end def self.Anonymous - SID.from_string_sid('S-1-5-7') + SID.from_string_sid("S-1-5-7") end def self.Proxy - SID.from_string_sid('S-1-5-8') + SID.from_string_sid("S-1-5-8") end def self.EnterpriseDomainControllers - SID.from_string_sid('S-1-5-9') + SID.from_string_sid("S-1-5-9") end def self.PrincipalSelf - SID.from_string_sid('S-1-5-10') + SID.from_string_sid("S-1-5-10") end def self.AuthenticatedUsers - SID.from_string_sid('S-1-5-11') + SID.from_string_sid("S-1-5-11") end def self.RestrictedCode - SID.from_string_sid('S-1-5-12') + SID.from_string_sid("S-1-5-12") end def self.TerminalServerUsers - SID.from_string_sid('S-1-5-13') + SID.from_string_sid("S-1-5-13") end def self.LocalSystem - SID.from_string_sid('S-1-5-18') + SID.from_string_sid("S-1-5-18") end def self.NtLocal - SID.from_string_sid('S-1-5-19') + SID.from_string_sid("S-1-5-19") end def self.NtNetwork - SID.from_string_sid('S-1-5-20') + SID.from_string_sid("S-1-5-20") end def self.BuiltinAdministrators - SID.from_string_sid('S-1-5-32-544') + SID.from_string_sid("S-1-5-32-544") end def self.BuiltinUsers - SID.from_string_sid('S-1-5-32-545') + SID.from_string_sid("S-1-5-32-545") end def self.Guests - SID.from_string_sid('S-1-5-32-546') + SID.from_string_sid("S-1-5-32-546") end def self.PowerUsers - SID.from_string_sid('S-1-5-32-547') + SID.from_string_sid("S-1-5-32-547") end def self.AccountOperators - SID.from_string_sid('S-1-5-32-548') + SID.from_string_sid("S-1-5-32-548") end def self.ServerOperators - SID.from_string_sid('S-1-5-32-549') + SID.from_string_sid("S-1-5-32-549") end def self.PrintOperators - SID.from_string_sid('S-1-5-32-550') + SID.from_string_sid("S-1-5-32-550") end def self.BackupOperators - SID.from_string_sid('S-1-5-32-551') + SID.from_string_sid("S-1-5-32-551") end def self.Replicators - SID.from_string_sid('S-1-5-32-552') + SID.from_string_sid("S-1-5-32-552") end def self.Administrators - SID.from_string_sid('S-1-5-32-544') + SID.from_string_sid("S-1-5-32-544") end def self.None diff --git a/lib/chef/win32/security/token.rb b/lib/chef/win32/security/token.rb index 8d4e54ad8c..3184bc449a 100644 --- a/lib/chef/win32/security/token.rb +++ b/lib/chef/win32/security/token.rb @@ -16,10 +16,10 @@ # limitations under the License. # -require 'chef/win32/security' -require 'chef/win32/api/security' -require 'chef/win32/unicode' -require 'ffi' +require "chef/win32/security" +require "chef/win32/api/security" +require "chef/win32/unicode" +require "ffi" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/system.rb b/lib/chef/win32/system.rb index cdd063f174..e91285568c 100755 --- a/lib/chef/win32/system.rb +++ b/lib/chef/win32/system.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'chef/win32/api/system' -require 'chef/win32/error' -require 'ffi' +require "chef/win32/api/system" +require "chef/win32/error" +require "ffi" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/unicode.rb b/lib/chef/win32/unicode.rb index d63b9790b9..da38e92cdd 100644 --- a/lib/chef/win32/unicode.rb +++ b/lib/chef/win32/unicode.rb @@ -17,8 +17,8 @@ # limitations under the License. # -require 'chef/mixin/wide_string' -require 'chef/win32/api/unicode' +require "chef/mixin/wide_string" +require "chef/win32/api/unicode" class Chef module ReservedNames::Win32 diff --git a/lib/chef/win32/version.rb b/lib/chef/win32/version.rb index ca715dd604..85a71491df 100644 --- a/lib/chef/win32/version.rb +++ b/lib/chef/win32/version.rb @@ -16,9 +16,9 @@ # limitations under the License. # -require 'chef/win32/api' -require 'chef/win32/api/system' -require 'wmi-lite/wmi' +require "chef/win32/api" +require "chef/win32/api/system" +require "wmi-lite/wmi" class Chef module ReservedNames::Win32 @@ -123,13 +123,13 @@ class Chef # http://msdn.microsoft.com/en-us/library/windows/desktop/ms724439(v=vs.85).aspx wmi = WmiLite::Wmi.new - os_info = wmi.first_of('Win32_OperatingSystem') - os_version = os_info['version'] + os_info = wmi.first_of("Win32_OperatingSystem") + os_version = os_info["version"] # The operating system version is a string in the following form # that can be split into components based on the '.' delimiter: # MajorVersionNumber.MinorVersionNumber.BuildNumber - os_version.split('.').collect { | version_string | version_string.to_i } + os_version.split(".").collect { | version_string | version_string.to_i } end def get_version_ex |