From 7457de47248a116fc4982cc96088319d9d124068 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Tue, 28 Jan 2020 12:06:51 +0200 Subject: [PATCH] Please rubocop --- Rakefile | 2 +- attributes/default.rb | 4 ++-- libraries/default.rb | 1 + recipes/service.rb | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Rakefile b/Rakefile index 24f4c72..7eafbe0 100644 --- a/Rakefile +++ b/Rakefile @@ -8,4 +8,4 @@ end RuboCop::RakeTask.new(:rubocop) FoodCritic::Rake::LintTask.new(:foodcritic) -task default: [:foodcritic, :rubocop, :spec] +task default: %i[foodcritic rubocop spec] diff --git a/attributes/default.rb b/attributes/default.rb index 7606525..439bde5 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -4,7 +4,7 @@ default['xvfb']['args'] = nil default['xvfb']['packages']['debian'] = - %w(xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-xorg-core xvfb) + %w[xfonts-100dpi xfonts-75dpi xfonts-scalable xserver-xorg-core xvfb] default['xvfb']['packages']['rhel'] = - %w(xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 xorg-x11-server-Xvfb mesa-libGL) + %w[xorg-x11-fonts-100dpi xorg-x11-fonts-75dpi xorg-x11-fonts-Type1 xorg-x11-server-Xvfb mesa-libGL] diff --git a/libraries/default.rb b/libraries/default.rb index 9cd9f73..9f7734c 100644 --- a/libraries/default.rb +++ b/libraries/default.rb @@ -2,5 +2,6 @@ def xvfb_systype return 'systemd' if ::File.exist?('/proc/1/comm') && ::File.open('/proc/1/comm').gets.chomp == 'systemd' return 'upstart' if platform?('ubuntu') && ::File.exist?('/sbin/initctl') + 'sysvinit' end diff --git a/recipes/service.rb b/recipes/service.rb index e6cf690..97f534b 100644 --- a/recipes/service.rb +++ b/recipes/service.rb @@ -23,5 +23,5 @@ end service 'xvfb' do - action [:enable, :start] + action %i[enable start] end