Skip to content

Commit

Permalink
Document some methods as public API
Browse files Browse the repository at this point in the history
  • Loading branch information
zuazo committed Nov 17, 2015
1 parent dc78442 commit 9bab649
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/specinfra/backend/docker_lxc.rb
Expand Up @@ -59,6 +59,7 @@ def lxc_attach_result_assert(stderr, exit_status)
# @param stderr [String] the *stderr* output.
# @param status [Fixnum] the command exit status.
# @return [Specinfra::CommandResult] the generated result object.
# @api public
def erroneous_result(cmd, exception, stdout, stderr, status)
err =
if stderr.nil?
Expand All @@ -77,6 +78,7 @@ def erroneous_result(cmd, exception, stdout, stderr, status)
# @param stdout [String] the *stdout* output.
# @param stderr [String] the *stderr* output.
# @return nil
# @api public
def rspec_example_metadata(cmd, stdout, stderr)
return unless @example
@example.metadata[:command] = escape_command(cmd)
Expand All @@ -89,6 +91,7 @@ def rspec_example_metadata(cmd, stdout, stderr)
# @param cmd [String] the command to run.
# @param opts [Hash] options to pass to {Open3.popen3}.
# @return [Specinfra::CommandResult] the result.
# @api public
def docker_run!(cmd, opts = {})
stdout, stderr, status = shell_command!(lxc_attach_command(cmd), opts)
lxc_attach_result_assert(stderr, status)
Expand Down
1 change: 1 addition & 0 deletions lib/specinfra/backend/docker_lxc/shell_helpers.rb
Expand Up @@ -155,6 +155,7 @@ def sudo?
# escape_command(['sudo', '-p', 'Password: ')
# #=> "sudo -p Password:\\ "
# escape_command('uname -a') #=> "uname -a"
# @api public
def escape_command(cmd)
return cmd if cmd.is_a?(String)
cmd.shelljoin
Expand Down

0 comments on commit 9bab649

Please sign in to comment.