Sha256: ec06705ca33bd6067180acf5941d506ab3539ddeeb4eae00f6516fec254fe427

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

require 'site_checker/io/io_spec_helper'
require 'open3'

module CliSpecHelper
  include IoSpecHelper

  def exec(command, arguments)
    stdin, stdout, stderr = Open3.popen3("#{command} #{arguments}")
    stdout.readlines.map {|line| line.chomp}.join("\n")
  end

  def option_list
    "Usage: site_checker [options] <site_url>\n" +
    "    -e, --visit-external-references  Visit external references (may take a bit longer)\n" +
    "    -m, --max-recursion-depth N      Set the depth of the recursion\n" +
    "    -r, --root URL                   The root URL of the path\n" +
    "    -i, --ignore URL                 Ignore the provided URL (can be applied several times)\n" +
    "    -p, --print-local-pages          Prints the list of the URLs of the collected local pages\n" +
    "    -x, --print-remote-pages         Prints the list of the URLs of the collected remote pages\n" +
    "    -y, --print-local-images         Prints the list of the URLs of the collected local images\n" +
    "    -z, --print-remote-images        Prints the list of the URLs of the collected remote images\n" +
    "    -h, --help                       Show a short description and this message\n" +
    "    -v, --version                    Show version\n"
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
site_checker-0.4.0 spec/site_checker/cli/cli_spec_helper.rb