Sha256: f33a8c67114f6274cde7e7070233b3ca7ce2f6597844b7e857ece120b9b5bb35

Contents?: true

Size: 671 Bytes

Versions: 3

Compression:

Stored size: 671 Bytes

Contents

#!/usr/bin/ruby

# Must be an array
test_cmd = [
  "bundle exec dotfu install zsh",
  "bundle exec dotfu uninstall zsh"
]

guard :bundler do
  watch 'Gemfile'
  watch '*.gemspec'
end

guard :rspec do
  watch(%r{^spec/.+_spec\.rb$})
  watch(%r{^lib/(.+)\.rb$}) { |m| "spec spec/lib/#{m[1]}_spec.rb" }
  watch(%r{^bin/(.+)\.rb$})         { |m| "spec/bin/#{m[1]}_spec.rb" }
  watch('spec/spec_helper.rb')      { "spec" }
end

# guard :yard do
#   watch(%r{^lib/(.+)\.rb$})
# end

guard :shell do
  watch /.*/ do |m|
    puts "Time: #{Time.now}, file saved: #{m}"
    test_cmd.each do |cmd|

      puts "=" * 80
      puts "cmd: #{cmd}"
      puts `#{cmd}`
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dotfu-0.2.0 Guardfile
dotfu-0.1.1 Guardfile
dotfu-0.1.0 Guardfile