summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-01-13 08:07:08 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-01-13 08:07:08 -0800
commit8e1e75da57b3c5d56abc180238440cf4e411d3ae (patch)
treee62802d28c41124f9db3be507ff37e5df8d95996
parent5e5cbe6df61ae69b9a5942ce51a7ad1f8bb6ea3a (diff)
downloadchef-lcg/lint-cops-again.tar.gz
yet more lint copslcg/lint-cops-again
fixes: Lint/AmbiguousOperator Lint/DuplicateMethods
-rw-r--r--lib/chef/user_v1.rb7
-rw-r--r--lib/chef/win32/registry.rb13
-rw-r--r--spec/unit/mixin/securable_spec.rb6
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