Sha256: 0512816592cd8f15d044a5826b7876e87964f655f5bdfc5a33b6075ca40e9a4c

Contents?: true

Size: 1.03 KB

Versions: 10

Compression:

Stored size: 1.03 KB

Contents

require 'paraduct'
require 'thor'

module Paraduct
  class CLI < Thor
    include Thor::Actions

    class_option :version, type: :boolean

    desc "version", "Show paraduct version"
    def version
      puts Paraduct::VERSION
    end
    default_task :version

    desc "test", "run matrix test"
    def test
      script = Paraduct.config.script
      raise "require script" if script.blank?

      variables = Paraduct.config.variables
      raise "require variables" if variables.blank?

      product_variables = Paraduct::VariableConverter.product(variables)
      test_response = Paraduct::ParallelRunner.perform_all(script, product_variables)
      Paraduct.logger.info test_response.detail_message
      raise Paraduct::Errors::TestFailureError if test_response.failure?
    end

    desc "generate", "generate .paraduct.yml"
    def generate
      template(".paraduct.yml")
      template(".paraduct_rsync_exclude.txt")
    end

    def self.source_root
      File.expand_path(File.join(File.dirname(__FILE__), "templates"))
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
paraduct-0.0.1.beta15 lib/paraduct/cli.rb
paraduct-0.0.1.beta14 lib/paraduct/cli.rb
paraduct-0.0.1.beta13 lib/paraduct/cli.rb
paraduct-0.0.1.beta12 lib/paraduct/cli.rb
paraduct-0.0.1.beta11 lib/paraduct/cli.rb
paraduct-0.0.1.beta10 lib/paraduct/cli.rb
paraduct-0.0.1.beta9 lib/paraduct/cli.rb
paraduct-0.0.1.beta8 lib/paraduct/cli.rb
paraduct-0.0.1.beta7 lib/paraduct/cli.rb
paraduct-0.0.1.beta6 lib/paraduct/cli.rb