Guardfile 755 B

123456789101112131415161718192021222324252627282930313233343536
  1. guard :bundler do
  2. require 'guard/bundler'
  3. require 'guard/bundler/verify'
  4. helper = Guard::Bundler::Verify.new
  5. files = ['Gemfile']
  6. files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
  7. files.each { |file| watch(helper.real_path(file)) }
  8. end
  9. guard 'sidekiq', :cli => '-C config/sidekiq.yml -L log/sidekiq.log -P tmp/pids/sidekiq.pid -e development' do
  10. watch(%r{^workers/(.+)\.rb$})
  11. watch(%r{^models/(.+)\.rb$})
  12. end
  13. guard :rspec, cmd: "bundle exec rspec" do
  14. require "guard/rspec/dsl"
  15. dsl = Guard::RSpec::Dsl.new(self)
  16. # RSpec files
  17. rspec = dsl.rspec
  18. watch(rspec.spec_support) { rspec.spec_dir }
  19. watch(rspec.spec_files)
  20. # Ruby files
  21. ruby = dsl.ruby
  22. dsl.watch_spec_files_for(ruby.lib_files)
  23. end