Skip to content

Commit

Permalink
fix(rubocop): add fixes using rubocop --safe-auto-correct
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 8, 2019
1 parent 666d69c commit 2fe3475
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 16 deletions.
7 changes: 4 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -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'
14 changes: 7 additions & 7 deletions bin/kitchen
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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')
2 changes: 2 additions & 0 deletions test/integration/default/controls/config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

control 'template configuration' do
title 'should match desired lines'

Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/controls/packages_spec.rb
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
6 changes: 3 additions & 3 deletions test/integration/default/controls/services_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/integration/default/controls/subcomponent_config_spec.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

control 'template subcomponent configuration' do
title 'should match desired lines'

Expand Down

0 comments on commit 2fe3475

Please sign in to comment.