Sha256: 3bd6b09fd546b26f77b01bfc4d4b26953663ab5fce871f38f32539ca4e5e46cb

Contents?: true

Size: 641 Bytes

Versions: 3

Compression:

Stored size: 641 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
      UI.info %(Running Preek on '#{dir}'. Wait for it...!)
      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

3 entries across 3 versions & 1 rubygems

Version Path
guard-preek-0.0.4 lib/guard/preek.rb
guard-preek-0.0.3 lib/guard/preek.rb
guard-preek-0.0.2 lib/guard/preek.rb