Sha256: eaefc1987ea0185e406a1289c8e96cf67669005393b1ea107c395f0d0f50f436

Contents?: true

Size: 1.51 KB

Versions: 13

Compression:

Stored size: 1.51 KB

Contents

# frozen_string_literal: true

# A sample Guardfile
# More info at https://github.com/guard/guard#readme

## Uncomment and set this to only include directories you want to watch
# directories %w(app lib config test spec features) \
#  .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")}

## Note: if you are using the `directories` clause above and you are not
## watching the project directory ('.'), then you will want to move
## the Guardfile to a watched dir and symlink it back, e.g.
#
#  $ mkdir config
#  $ mv Guardfile config/
#  $ ln -s config/Guardfile .
#
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"

group :red_green_refactor, halt_on_fail: true do
  guard :rspec, cmd: 'bundle exec rspec', all_after_pass: true do
    require 'guard/rspec/dsl'
    dsl = Guard::RSpec::Dsl.new(self)

    # Feel free to open issues for suggestions and improvements

    # RSpec files
    rspec = dsl.rspec
    watch(rspec.spec_helper) { rspec.spec_dir }
    watch(rspec.spec_support) { rspec.spec_dir }
    watch(rspec.spec_files)

    # Ruby files
    ruby = dsl.ruby
    dsl.watch_spec_files_for(ruby.lib_files)

    # Turnip features and steps
    watch(%r{^spec/acceptance/(.+)\.feature$})
    watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
      Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance'
    end
  end

  guard :rubocop, all_on_start: false, cli: ['--auto-correct'] do
    watch(/.+\.rb$/)
    watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
request_handler-2.3.0 Guardfile
request_handler-2.2.0 Guardfile
request_handler-2.1.1 Guardfile
request_handler-2.1.0 Guardfile
request_handler-2.0.0 Guardfile
request_handler-1.3.0 Guardfile
request_handler-1.2.0 Guardfile
request_handler-1.1.0 Guardfile
request_handler-1.0.0 Guardfile
request_handler-0.15.0 Guardfile
request_handler-0.14.0 Guardfile
request_handler-0.13.0 Guardfile
request_handler-0.12.0 Guardfile