Sha256: 8df8caf5c60a79cdb0b75652345dfa0fe2c08be622efcf42ed850ea076324ca4

Contents?: true

Size: 531 Bytes

Versions: 9

Compression:

Stored size: 531 Bytes

Contents

require 'shellwords'

require_relative 'matrix_executor'

module SchemaDev
  class Runner
    def initialize(config)
      @config = config
    end

    def run(*args, dry_run: false, quick: false, ruby: nil, rails: nil, db: nil)
      matrix = MatrixExecutor.new @config.matrix(quick: quick, ruby: ruby, rails: rails, db: db)

      return true if matrix.run(Shellwords.join(args.flatten), dry_run: dry_run)

      puts "\n*** #{matrix.errors.size} failures:\n\t#{matrix.errors.join("\n\t")}"
      return false
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
schema_dev-0.1.5 lib/schema_dev/runner.rb
schema_dev-0.1.4 lib/schema_dev/runner.rb
schema_dev-0.1.3 lib/schema_dev/runner.rb
schema_dev-0.1.2 lib/schema_dev/runner.rb
schema_dev-0.1.1 lib/schema_dev/runner.rb
schema_dev-0.1.0 lib/schema_dev/runner.rb
schema_dev-0.0.3 lib/schema_dev/runner.rb
schema_dev-0.0.2 lib/schema_dev/runner.rb
schema_dev-0.0.1 lib/schema_dev/runner.rb