Sha256: 8d82bb38ed9649e2e9fe6000001054416367ec24208169d468d6bd09adefe4a7

Contents?: true

Size: 540 Bytes

Versions: 6

Compression:

Stored size: 540 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}"
      puts "please wait..."
      message = CmQuiz::ReviewQuiz.new(endpoint).perform

      puts message
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cm_quiz-0.0.8 lib/cm_quiz/cli.rb
cm_quiz-0.0.7 lib/cm_quiz/cli.rb
cm_quiz-0.0.6 lib/cm_quiz/cli.rb
cm_quiz-0.0.5 lib/cm_quiz/cli.rb
cm_quiz-0.0.4 lib/cm_quiz/cli.rb
cm_quiz-0.0.3 lib/cm_quiz/cli.rb