diff options
author | Thom May <thom@may.lt> | 2016-01-13 17:29:42 +0000 |
---|---|---|
committer | Thom May <thom@may.lt> | 2016-01-13 17:29:42 +0000 |
commit | 6ff26d1cad9256b124157531e3b7b54ef63f85ff (patch) | |
tree | 6fa5e29d3e5a5f178f184921ea4e470e1ae3c5f4 | |
parent | d0a9d75c7c80826a830c812ee15d1249553e4b43 (diff) | |
parent | 8e1e75da57b3c5d56abc180238440cf4e411d3ae (diff) | |
download | chef-6ff26d1cad9256b124157531e3b7b54ef63f85ff.tar.gz |
Merge pull request #4395 from chef/lcg/lint-cops-again
yet more lint cops
-rw-r--r-- | lib/chef/user_v1.rb | 7 | ||||
-rw-r--r-- | lib/chef/win32/registry.rb | 13 | ||||
-rw-r--r-- | spec/unit/mixin/securable_spec.rb | 6 |
3 files changed, 4 insertions, 22 deletions
diff --git a/lib/chef/user_v1.rb b/lib/chef/user_v1.rb index 077fca50b9..b628c76381 100644 --- a/lib/chef/user_v1.rb +++ b/lib/chef/user_v1.rb @@ -1,6 +1,6 @@ # # Author:: Steven Danna (steve@opscode.com) -# Copyright:: Copyright 2012 Opscode, Inc. +# Copyright:: Copyright 2012-2016 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -93,11 +93,6 @@ class Chef arg, :kind_of => String) end - def password(arg=nil) - set_or_return(:password, - arg, :kind_of => String) - end - def create_key(arg=nil) set_or_return(:create_key, arg, :kind_of => [TrueClass, FalseClass]) diff --git a/lib/chef/win32/registry.rb b/lib/chef/win32/registry.rb index 12ad08a965..3c1f62d9b8 100644 --- a/lib/chef/win32/registry.rb +++ b/lib/chef/win32/registry.rb @@ -256,19 +256,6 @@ class Chef end end - def get_type_from_name(val_type) - value = { - :binary => ::Win32::Registry::REG_BINARY, - :string => ::Win32::Registry::REG_SZ, - :multi_string => ::Win32::Registry::REG_MULTI_SZ, - :expand_string => ::Win32::Registry::REG_EXPAND_SZ, - :dword => ::Win32::Registry::REG_DWORD, - :dword_big_endian => ::Win32::Registry::REG_DWORD_BIG_ENDIAN, - :qword => ::Win32::Registry::REG_QWORD - }[val_type] - return value - end - def keys_missing?(key_path) missing_key_arr = key_path.split("\\") missing_key_arr.pop diff --git a/spec/unit/mixin/securable_spec.rb b/spec/unit/mixin/securable_spec.rb index 714d6dedae..33d5eb2141 100644 --- a/spec/unit/mixin/securable_spec.rb +++ b/spec/unit/mixin/securable_spec.rb @@ -1,7 +1,7 @@ # encoding: UTF-8 # # Author:: Mark Mzyk (<mmzyk@opscode.com>) -# Copyright:: Copyright (c) 2011 Opscode, Inc. +# Copyright:: Copyright (c) 2011-2016 Chef Software, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -227,9 +227,9 @@ describe Chef::Mixin::Securable do expect { @securable.mode 0111 }.not_to raise_error expect { @securable.mode 73 }.not_to raise_error - expect { @securable.mode -01 }.to raise_error(ArgumentError) + expect { @securable.mode(-01) }.to raise_error(ArgumentError) expect { @securable.mode 010000 }.to raise_error(ArgumentError) - expect { @securable.mode -1 }.to raise_error(ArgumentError) + expect { @securable.mode(-1) }.to raise_error(ArgumentError) expect { @securable.mode 4096 }.to raise_error(ArgumentError) end |