Sha256: e2a286d3146b16718cbb41a36a4b34b31a54b65b01293743f173205b645c1209

Contents?: true

Size: 867 Bytes

Versions: 1

Compression:

Stored size: 867 Bytes

Contents

guard :rspec, cmd: 'bundle exec rspec' do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^spec/.+_helper\.rb$}) { 'spec' }
  watch(%r{^lib/(.+)\.rb$}) do |match|
    result = "spec/lib/#{match[1]}_spec.rb"
    begin
      break if File.exist?(result)
      result = File.dirname(result)
    end until result.empty?
    result
  end
  watch(%r{^lib/[^/]+/(.+)\.rb$}) do |match|
    result = "spec/features/#{match[1]}"
    begin
      break if File.exist?(result)
      result = File.dirname(result)
    end until result.empty?
    result
  end
end

require 'guard/plugin'

module ::Guard
  class Whatever < ::Guard::Plugin
    def run_all; end
    def run_on_changes(*); end
  end
end

guard :whatever do
  watch(%r{^lib/.*\.rb$})
  watch(%r{^.*\.md$})

  callback(:run_all_end) { system 'yardoc' }
  callback(:run_on_changes_end) { system 'yardoc' }
end

# vim: ft=ruby

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
typekit-client-0.0.6 Guardfile