Sha256: 10c2c32f0ad247e9da9485ffac56715e77c6b813bc8c2460ae26fdca22b363ec

Contents?: true

Size: 581 Bytes

Versions: 1

Compression:

Stored size: 581 Bytes

Contents

require "guard/preek/version"
require 'guard'
require 'guard/guard'

module Guard
  class Preek < Guard
    autoload :Runner, 'guard/preek/runner'

    def run_on_changes(paths)
      Runner.new(paths).perform
    end

    def run_all
      dir = options[:run_all_dir]
      raise_dir_missing unless dir
      Runner.new(dir).perform
    end

  private
    def raise_dir_missing
      UI.error "Please specify a dir for run all in your Guardfile!\nExample:\n\tguard :preek, run_all_dir: 'lib' do \n\t  watch(/lib\/(.*).rb/) \n\tend"
      throw :task_has_failed
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
guard-preek-0.0.1 lib/guard/preek.rb