Sha256: 3defe9f5e1c1bb0d68af6e964956a00b63d9f30ce5ceba1a1b0d7fd82ed83df8

Contents?: true

Size: 989 Bytes

Versions: 10

Compression:

Stored size: 989 Bytes

Contents

# A guardfile for making Danger Plugins
# For more info see https://github.com/guard/guard#readme

# To run, use `bundle exec guard`.

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

    # 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
    watch(%r{lib/wcc/(.+)\.rb$}) { |m| rspec.spec.call("wcc/#{m[1]}") }
  end

  guard :rubocop, cli: ['--display-cop-names'] do
    watch(%r{.+\.rb$})
    watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
  end
end

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

scope group: :red_green_refactor

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
danger-wcc-0.1.4 Guardfile
danger-wcc-0.1.3 Guardfile
danger-wcc-0.1.2 Guardfile
danger-wcc-0.1.1 Guardfile
danger-wcc-0.1.0 Guardfile
danger-wcc-0.0.6 Guardfile
danger-wcc-0.0.5 Guardfile
danger-wcc-0.0.4 Guardfile
danger-wcc-0.0.3 Guardfile
danger-wcc-0.0.2 Guardfile