mirror of
https://github.com/inspec/inspec
synced 2024-11-23 13:13:22 +00:00
finish linting backend
Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
This commit is contained in:
parent
e5686ea4e2
commit
46b300f409
2 changed files with 5 additions and 5 deletions
|
@ -9,9 +9,9 @@ module Vulcano::Backends
|
|||
@conf = conf
|
||||
@files = {}
|
||||
id = @conf['host'] ||
|
||||
fail("You must specify a docker container ID.")
|
||||
fail('You must specify a docker container ID.')
|
||||
@container = ::Docker::Container.get(id) ||
|
||||
fail("Can't find Docker container #{id}")
|
||||
fail("Can't find Docker container #{id}")
|
||||
end
|
||||
|
||||
def file(path)
|
||||
|
@ -23,9 +23,9 @@ module Vulcano::Backends
|
|||
'/bin/sh', '-c', cmd
|
||||
])
|
||||
CommandResult.new(stdout.join, stderr.join, exit_status)
|
||||
rescue ::Docker::Error::DockerError => err
|
||||
rescue ::Docker::Error::DockerError => _
|
||||
raise
|
||||
rescue => err
|
||||
rescue => _
|
||||
# @TODO: differentiate any other error
|
||||
raise
|
||||
end
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# encoding: utf-8
|
||||
|
||||
module Vulcano::Backends
|
||||
Struct.new("MockCommand", :stdout, :stderr, :exit_status)
|
||||
Struct.new('MockCommand', :stdout, :stderr, :exit_status)
|
||||
|
||||
class Mock < Vulcano.backend(1)
|
||||
name 'mock'
|
||||
|
|
Loading…
Reference in a new issue