diff options
-rw-r--r-- | lib/chef/resource/powershell_script.rb | 4 | ||||
-rw-r--r-- | lib/chef/user.rb | 4 | ||||
-rw-r--r-- | lib/chef/whitelist.rb | 6 | ||||
-rw-r--r-- | lib/chef/win32/security/ace.rb | 5 | ||||
-rw-r--r-- | lib/chef/win32/security/acl.rb | 4 | ||||
-rw-r--r-- | lib/chef/win32/version.rb | 6 |
6 files changed, 17 insertions, 12 deletions
diff --git a/lib/chef/resource/powershell_script.rb b/lib/chef/resource/powershell_script.rb index a88fb5701b..a40f2e66e6 100644 --- a/lib/chef/resource/powershell_script.rb +++ b/lib/chef/resource/powershell_script.rb @@ -34,8 +34,6 @@ class Chef ) end - protected - # Allow callers evaluating guards to request default # attribute values. This is needed to allow # convert_boolean_return to be true in guard context by default, @@ -46,6 +44,8 @@ class Chef def self.get_default_attributes(opts) {:convert_boolean_return => true} end + + private_class_method :get_default_attributes end end end diff --git a/lib/chef/user.rb b/lib/chef/user.rb index 6569a97f00..42fa6b5fa1 100644 --- a/lib/chef/user.rb +++ b/lib/chef/user.rb @@ -165,8 +165,6 @@ class Chef Chef::User.from_hash(response) end - private - # Gross. Transforms an API response in the form of: # [ { "user" => { "username" => USERNAME }}, ...] # into the form @@ -179,5 +177,7 @@ class Chef end new_response end + + private_class_method :transform_ohc_list_response end end diff --git a/lib/chef/whitelist.rb b/lib/chef/whitelist.rb index 86c229d22c..587baa6a3e 100644 --- a/lib/chef/whitelist.rb +++ b/lib/chef/whitelist.rb @@ -37,8 +37,6 @@ class Chef new_data end - private - # Walk the data has according to the keys provided by the whitelisted item # and add the data to the whitelisting result. def self.add_data(data, new_data, item) @@ -68,6 +66,8 @@ class Chef new_data end + private_class_method :add_data + # Accepts a String or an Array, and returns an Array of String keys that # are used to traverse the data hash. Strings are split on "/", Arrays are # assumed to contain exact keys (that is, Array elements will not be split @@ -80,5 +80,7 @@ class Chef parts end + private_class_method :to_array + end end diff --git a/lib/chef/win32/security/ace.rb b/lib/chef/win32/security/ace.rb index 3aeae35532..e754589024 100644 --- a/lib/chef/win32/security/ace.rb +++ b/lib/chef/win32/security/ace.rb @@ -106,8 +106,6 @@ class Chef struct[:AceType] end - private - def self.create_ace_with_mask_and_sid(type, flags, mask, sid) size_needed = size_with_sid(sid) pointer = FFI::MemoryPointer.new size_needed @@ -119,6 +117,9 @@ class Chef Chef::ReservedNames::Win32::Memory.memcpy(struct.pointer + struct.offset_of(:SidStart), sid.pointer, sid.size) ACE.new(struct.pointer) end + + private_class_method :create_ace_with_mask_and_sid + end end end diff --git a/lib/chef/win32/security/acl.rb b/lib/chef/win32/security/acl.rb index fd43b75cbf..e129d5c9a0 100644 --- a/lib/chef/win32/security/acl.rb +++ b/lib/chef/win32/security/acl.rb @@ -90,11 +90,13 @@ class Chef def to_s "[#{self.collect { |ace| ace.to_s }.join(", ")}]" end - private def self.align_dword(size) (size + 4 - 1) & 0xfffffffc end + + private_class_method :align_dword + end end end diff --git a/lib/chef/win32/version.rb b/lib/chef/win32/version.rb index 6a5bd35a26..17c27e4780 100644 --- a/lib/chef/win32/version.rb +++ b/lib/chef/win32/version.rb @@ -34,18 +34,18 @@ class Chef # http://msdn.microsoft.com/en-us/library/ms724833(v=vs.85).aspx # http://msdn.microsoft.com/en-us/library/ms724358(v=vs.85).aspx - private - def self.get_system_metrics(n_index) GetSystemMetrics(n_index) end + private_class_method :get_system_metrics + def self.method_name_from_marketing_name(marketing_name) "#{marketing_name.gsub(/\s/, '_').gsub(/\./, '_').downcase}?" # "#{marketing_name.gsub(/\s/, '_').gsub(//, '_').downcase}?" end - public + private_class_method :method_name_from_marketing_name WIN_VERSIONS = { "Windows 10" => {:major => 6, :minor => 4, :callable => lambda{ |product_type, suite_mask| product_type == VER_NT_WORKSTATION }}, |