mirror of
https://github.com/inspec/inspec
synced 2024-11-27 07:00:39 +00:00
Fixed review comments: Added attr_accessor for required parameters and removed pass to accept nil
Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
parent
964a5142f7
commit
180ebf0590
2 changed files with 4 additions and 2 deletions
|
@ -22,6 +22,8 @@ module Inspec::Resources
|
|||
include FileReader
|
||||
include ObjectTraverser
|
||||
|
||||
attr_accessor :conf_path
|
||||
|
||||
def initialize(conf_path = nil)
|
||||
@conf_path = conf_path || inspec.postgres.conf_path
|
||||
if @conf_path.nil?
|
||||
|
|
|
@ -12,7 +12,7 @@ module Inspec::Resources
|
|||
end
|
||||
|
||||
def lines
|
||||
output.split("\n")
|
||||
output.split("\n").map(&:strip)
|
||||
end
|
||||
|
||||
def to_s
|
||||
|
@ -40,7 +40,7 @@ module Inspec::Resources
|
|||
end
|
||||
EXAMPLE
|
||||
|
||||
def initialize(user, pass = nil, host = nil, port = nil)
|
||||
def initialize(user, pass, host = nil, port = nil)
|
||||
@user = user || "postgres"
|
||||
@pass = pass
|
||||
@host = host || "localhost"
|
||||
|
|
Loading…
Reference in a new issue