mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
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:
parent
b810f82328
commit
8f1e607d55
6 changed files with 15 additions and 7 deletions
2
Gemfile
2
Gemfile
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue