summaryrefslogtreecommitdiff
path: root/lib/chef/util
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-03-14 10:34:33 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2016-03-14 10:34:33 -0700
commit6705acbd7f301d1b04388043a3dfa0308655f120 (patch)
tree1e8a43b35ef1684a4b90578f1a6374758aa7e3c7 /lib/chef/util
parent365064280c93d519fdacbf032c0c21057e5549c9 (diff)
downloadchef-6705acbd7f301d1b04388043a3dfa0308655f120.tar.gz
chefstyle Style/AndOr fixes
this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
Diffstat (limited to 'lib/chef/util')
-rw-r--r--lib/chef/util/dsc/lcm_output_parser.rb2
-rw-r--r--lib/chef/util/dsc/resource_store.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb
index 2e81b363e0..bdcedff7f8 100644
--- a/lib/chef/util/dsc/lcm_output_parser.rb
+++ b/lib/chef/util/dsc/lcm_output_parser.rb
@@ -79,7 +79,7 @@ class Chef
end
when :end
# Make sure we log the last line
- if current_resource[:context] == :logging and info.include? current_resource[:name]
+ if current_resource[:context] == :logging && info.include?(current_resource[:name])
current_resource[:logs].push(info)
end
current_resource[:context] = nil
diff --git a/lib/chef/util/dsc/resource_store.rb b/lib/chef/util/dsc/resource_store.rb
index bb3480d105..be8d0b301b 100644
--- a/lib/chef/util/dsc/resource_store.rb
+++ b/lib/chef/util/dsc/resource_store.rb
@@ -74,7 +74,7 @@ class Chef
found = rs.find_all do |r|
name_matches = r["Name"].casecmp(name) == 0
if name_matches
- module_name == nil || (r["Module"] and r["Module"]["Name"].casecmp(module_name) == 0)
+ module_name == nil || (r["Module"] && r["Module"]["Name"].casecmp(module_name) == 0)
else
false
end