Sha256: fb4a694ed3c0cd43a51b7ab74826d3c637d7855947914a355278396298b1495f

Contents?: true

Size: 559 Bytes

Versions: 1

Compression:

Stored size: 559 Bytes

Contents

require 'listen'
require 'string/similarity'

require "retest/version"
require "retest/command"
require "retest/repository"
require "retest/test_options"
require "retest/listen_options"

module Retest
  class Error < StandardError; end

  def self.build(command:)
    Listen.to('.', ListenOptions.to_h) do |modified, added, removed|
      begin
        if modified.any?
          `clear 2>&1` || `cls 2>&1`
          command.run(modified.first.strip)
        end
      rescue => e
        puts "Something went wrong: #{e.message}"
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
retest-0.6.0.pre2 lib/retest.rb