From a0c32511bc6634538374ca4b433032b8acd05f96 Mon Sep 17 00:00:00 2001 From: Lamont Granquist Date: Wed, 17 Aug 2016 12:15:26 -0700 Subject: fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgrade Signed-off-by: Lamont Granquist --- lib/chef/mixin/command/unix.rb | 4 ++-- lib/chef/mixin/powershell_type_coercions.rb | 2 +- lib/chef/mixin/securable.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/chef/mixin') diff --git a/lib/chef/mixin/command/unix.rb b/lib/chef/mixin/command/unix.rb index bfd507979f..aa541c3637 100644 --- a/lib/chef/mixin/command/unix.rb +++ b/lib/chef/mixin/command/unix.rb @@ -64,7 +64,7 @@ class Chef $VERBOSE = nil ps.last.fcntl(Fcntl::F_SETFD, Fcntl::FD_CLOEXEC) - cid = fork { + cid = fork do pw.last.close STDIN.reopen pw.first pw.first.close @@ -111,7 +111,7 @@ class Chef end ps.last.close unless ps.last.closed? exit! - } + end ensure $VERBOSE = verbose end diff --git a/lib/chef/mixin/powershell_type_coercions.rb b/lib/chef/mixin/powershell_type_coercions.rb index 381cbed637..6159c87948 100644 --- a/lib/chef/mixin/powershell_type_coercions.rb +++ b/lib/chef/mixin/powershell_type_coercions.rb @@ -63,7 +63,7 @@ class Chef end def unsafe?(s) - ["'", '#', "`", '"'].any? do |x| + ["'", "#", "`", '"'].any? do |x| s.include? x end end diff --git a/lib/chef/mixin/securable.rb b/lib/chef/mixin/securable.rb index a88d534b37..55b4e0a6d1 100644 --- a/lib/chef/mixin/securable.rb +++ b/lib/chef/mixin/securable.rb @@ -43,7 +43,7 @@ class Chef :mode, arg, :callbacks => { - "not in valid numeric range" => lambda { |m| + "not in valid numeric range" => lambda do |m| if m.kind_of?(String) m =~ /^0/ || m = "0#{m}" end @@ -54,7 +54,7 @@ class Chef else Integer(m) <= 07777 && Integer(m) >= 0 end - }, + end, } ) end -- cgit v1.2.1