fix(rubocop): add fixes using rubocop --safe-auto-correct

This commit is contained in:
Imran Iqbal 2019-10-08 00:26:29 +01:00
parent 8d8c766660
commit 484ce2459d
No known key found for this signature in database
GPG key ID: 6D8629439D2B7819
6 changed files with 21 additions and 16 deletions

View file

@ -1,6 +1,7 @@
source "https://rubygems.org"
# frozen_string_literal: true
source 'https://rubygems.org'
gem 'kitchen-docker', '>= 2.9'
gem 'kitchen-salt', '>= 0.6.0'
gem 'kitchen-inspec', '>= 1.1'
gem 'kitchen-salt', '>= 0.6.0'

View file

@ -8,11 +8,11 @@
# this file is here to facilitate running it.
#
require "pathname"
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
Pathname.new(__FILE__).realpath)
require 'pathname'
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile',
Pathname.new(__FILE__).realpath)
bundle_binstub = File.expand_path("../bundle", __FILE__)
bundle_binstub = File.expand_path('bundle', __dir__)
if File.file?(bundle_binstub)
if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
@ -23,7 +23,7 @@ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this
end
end
require "rubygems"
require "bundler/setup"
require 'rubygems'
require 'bundler/setup'
load Gem.bin_path("test-kitchen", "kitchen")
load Gem.bin_path('test-kitchen', 'kitchen')

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
control 'template configuration' do
title 'should match desired lines'

View file

@ -1,8 +1,8 @@
# frozen_string_literal: true
# Overide by OS
package_name = 'bash'
if os[:name] == 'centos' and os[:release].start_with?('6')
package_name = 'cronie'
end
package_name = 'cronie' if (os[:name] == 'centos') && os[:release].start_with?('6')
control 'template package' do
title 'should be installed'

View file

@ -1,8 +1,8 @@
# frozen_string_literal: true
# Overide by OS
service_name = 'systemd-udevd'
if os[:name] == 'centos' and os[:release].start_with?('6')
service_name = 'crond'
end
service_name = 'crond' if (os[:name] == 'centos') && os[:release].start_with?('6')
control 'template service' do
impact 0.5

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
control 'template subcomponent configuration' do
title 'should match desired lines'