Class: SchemaDev::Runner
- Inherits:
-
Object
- Object
- SchemaDev::Runner
- Defined in:
- lib/schema_dev/runner.rb
Instance Method Summary collapse
-
#initialize(config) ⇒ Runner
constructor
A new instance of Runner.
- #run(*args, dry_run: false, quick: false, ruby: nil, rails: nil, db: nil) ⇒ Object
Constructor Details
#initialize(config) ⇒ Runner
Returns a new instance of Runner.
7 8 9 |
# File 'lib/schema_dev/runner.rb', line 7 def initialize(config) @config = config end |
Instance Method Details
#run(*args, dry_run: false, quick: false, ruby: nil, rails: nil, db: nil) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/schema_dev/runner.rb', line 11 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 |