Bump chefstyle and fix up flagged code.

Very minor.

I want to change a default config but I'll do that in a separate
commit since it is a bigger diff.

Signed-off-by: Ryan Davis <zenspider@chef.io>
This commit is contained in:
Ryan Davis 2019-11-07 14:29:16 -08:00
parent b810f82328
commit 8f1e607d55
6 changed files with 15 additions and 7 deletions

View file

@ -19,7 +19,7 @@ group :omnibus do
end
group :test do
gem "chefstyle", "0.13.0"
gem "chefstyle", "~> 0.13.0"
gem "coveralls", require: false
gem "minitest", "~> 5.5"
gem "rake", ">= 10"

View file

@ -207,7 +207,8 @@ module Inspec
end
def _utc_find_credset_name(_credentials, transport_name)
return nil unless final_options[:target]
return unless final_options[:target]
match = final_options[:target].match(%r{^#{transport_name}://(?<credset_name>[\w\-]+)$})
match ? match[:credset_name] : nil
end

View file

@ -21,6 +21,9 @@ module Inspec::Resources
end
EXAMPLE
# rubocop:disable Layout/AlignArguments
# going to switch this back off in a separate commit
attr_reader :bin, :db_role, :host, :password, :port, :service,
:su_user, :user
@ -58,8 +61,8 @@ module Inspec::Resources
command = command_builder(format_options, sql)
inspec_cmd = inspec.command(command)
DatabaseHelper::SQLQueryResult.new(inspec_cmd, send(parser,
inspec_cmd.stdout))
DatabaseHelper::SQLQueryResult.new(inspec_cmd,
send(parser, inspec_cmd.stdout))
end
def to_s

View file

@ -45,7 +45,7 @@ module Inspec::Resources
end
def linux_hostname(opt = nil)
if !opt.nil?
if opt
opt = case opt
when "f", "long", "fqdn", "full"
" -f"
@ -67,7 +67,7 @@ module Inspec::Resources
end
def mac_hostname(opt = nil)
if !opt.nil?
if opt
opt = case opt
when "f", "long", "fqdn", "full"
" -f"

View file

@ -624,7 +624,9 @@ module Inspec::Resources
def meta_info(username)
res = identity(username)
return if res.nil?
{
home: res[:home],
shell: res[:shell],
@ -635,7 +637,9 @@ module Inspec::Resources
def credentials(username)
res = identity(username)
return if res.nil?
{
mindays: res[:mindays],
maxdays: res[:maxdays],

View file

@ -153,7 +153,7 @@ begin
deletions.each do |member|
puts "Removing #{member} from #{team}"
github.remove_team_membership(gh_teams[team]["id"], member,
accept: "application/vnd.github.ironman-preview+json")
accept: "application/vnd.github.ironman-preview+json")
end
end