Sha256: 9fe4031f9dc6b605d453b23e583f39282c0a10ca3b7310fadc0f6381829df7fd

Contents?: true

Size: 868 Bytes

Versions: 30

Compression:

Stored size: 868 Bytes

Contents

# frozen_string_literal: true

guard :bundler, cmd: 'bundle install' do
  watch('Gemfile')
  watch('.gemspec')
end

group :green_pass_then_cop, halt_on_fail: true do
  guard :rspec, cmd: 'bundle exec rspec -f doc' 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
    dsl.watch_spec_files_for(ruby.lib_files)
    watch(%r{^lib//(.+)\.rb$}) { |m| "spec/**/#{m[1]}_spec.rb" }
    watch(%r{^lib//commands/(.+)\.rb$}) { |m| "spec/unit/commands/#{m[1]}_spec.rb" }
  end

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

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
cmdlet-0.14.0 Guardfile
cmdlet-0.13.2 Guardfile
cmdlet-0.13.1 Guardfile
cmdlet-0.13.0 Guardfile
cmdlet-0.12.5 Guardfile
cmdlet-0.12.4 Guardfile
cmdlet-0.12.3 Guardfile
cmdlet-0.12.2 Guardfile
cmdlet-0.12.1 Guardfile
cmdlet-0.12.0 Guardfile
cmdlet-0.11.0 Guardfile
cmdlet-0.10.1 Guardfile
cmdlet-0.10.0 Guardfile
cmdlet-0.9.2 Guardfile
cmdlet-0.9.1 Guardfile
cmdlet-0.9.0 Guardfile
cmdlet-0.8.0 Guardfile
cmdlet-0.7.1 Guardfile
cmdlet-0.7.0 Guardfile
cmdlet-0.6.2 Guardfile