Sha256: 49136f7fce359311324411adc9ebfc1729dc59062e2785f6921f85eb6d2d4d8a

Contents?: true

Size: 526 Bytes

Versions: 1

Compression:

Stored size: 526 Bytes

Contents

require 'thor'
require 'cm_quiz'

module CmQuiz
  class CLI< Thor
    map '--version' => :version

    desc 'version', 'Prints the cm_quiz version'
    def version
      puts "#{File.basename($0)} #{VERSION}"
    end

    desc 'test', 'Test your api implement'
    option :endpoint, required: true, banner: "your-test-endpoint.com"
    def test
      endpoint = options[:endpoint]
      puts "Start test #{endpoint}"
      message = CmQuiz::ReviewQuiz.new('http://localhost:6000').perform
      puts message
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cm_quiz-0.0.1 lib/cm_quiz/cli.rb