mirror of
https://github.com/inspec/inspec
synced 2024-11-23 05:03:07 +00:00
fix lint issues
This commit is contained in:
parent
89f05efc94
commit
7cea90ef3a
2 changed files with 30 additions and 15 deletions
|
@ -76,7 +76,7 @@ end
|
|||
RSpec::Matchers.define :contain_match do |regex|
|
||||
match do |arr|
|
||||
arr.inject { |result, i|
|
||||
match = i.match(regex)
|
||||
result = i.match(regex)
|
||||
result || i.match(/$/)
|
||||
}
|
||||
end
|
||||
|
|
|
@ -5,14 +5,15 @@
|
|||
# Get types
|
||||
module DummyTestTypes
|
||||
# a few commands with special handling
|
||||
def describe *args; end
|
||||
def context *args; end
|
||||
def describe(*_args); end
|
||||
|
||||
def context(*_args); end
|
||||
|
||||
def os
|
||||
{}
|
||||
end
|
||||
|
||||
def command(sth)
|
||||
def command(_sth)
|
||||
res = OpenStruct.new
|
||||
res.stdout = ''
|
||||
res.stderr = ''
|
||||
|
@ -24,28 +25,42 @@ module DummyVulcanoTypes
|
|||
%w{
|
||||
attributes registry_key
|
||||
}.each do |name|
|
||||
define_method name do |*arg|
|
||||
define_method name do |*_arg|
|
||||
end
|
||||
end
|
||||
|
||||
def processes *args; [] end
|
||||
def start_postgres_session *args; Describer.new end
|
||||
def start_mysql_session *args; Describer.new end
|
||||
def processes(*_args)
|
||||
[]
|
||||
end
|
||||
|
||||
def start_postgres_session(*_args)
|
||||
Describer.new
|
||||
end
|
||||
|
||||
def start_mysql_session(*_args)
|
||||
Describer.new
|
||||
end
|
||||
|
||||
class Describer
|
||||
def describe(*args)
|
||||
end
|
||||
def describe(*_args); end
|
||||
end
|
||||
end
|
||||
|
||||
class SshConf
|
||||
def initialize *args; end
|
||||
def initialize(*_args); end
|
||||
end
|
||||
class PostgresConf
|
||||
def initialize *args; end
|
||||
def params *a, &b; {} end
|
||||
def initialize(*_args); end
|
||||
|
||||
def params(*_a, &_b)
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
||||
class MysqlConf
|
||||
def initialize *args; end
|
||||
def params *a, &b; {} end
|
||||
def initialize(*_args); end
|
||||
|
||||
def params(*_a, &_b)
|
||||
{}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue