Sha256: a2bca21442e3cdc30590fcbefb948d21b94172d93c76737a094c4739a886fb45

Contents?: true

Size: 346 Bytes

Versions: 5

Compression:

Stored size: 346 Bytes

Contents

module CLIHelpers
  def cli
    Appsignal::CLI
  end

  def run_cli(command, options = {})
    cli.run(format_cli_arguments_and_options(command, options))
  end

  def format_cli_arguments_and_options(command, options = {})
    [*command].tap do |o|
      options.each do |key, value|
        o << "--#{key}=#{value}"
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
appsignal-2.0.3 spec/support/helpers/cli_helpers.rb
appsignal-2.0.2 spec/support/helpers/cli_helpers.rb
appsignal-2.0.1 spec/support/helpers/cli_helpers.rb
appsignal-2.0.0 spec/support/helpers/cli_helpers.rb
appsignal-2.0.0.beta.1 spec/support/helpers/cli_helpers.rb