Sha256: 677e51c3aed018d8dfb9b7552fc652f9ceb7c93762bce63a7f4c335f8a1d5806

Contents?: true

Size: 885 Bytes

Versions: 13

Compression:

Stored size: 885 Bytes

Contents

# frozen_string_literal: true

guard :bundler, cmd: 'bundle install' do
  watch('Gemfile')
  watch('k_doc.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/k_doc/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
    watch(%r{^lib/k_doc/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

13 entries across 13 versions & 1 rubygems

Version Path
k_doc-0.0.18 Guardfile
k_doc-0.0.17 Guardfile
k_doc-0.0.16 Guardfile
k_doc-0.0.15 Guardfile
k_doc-0.0.13 Guardfile
k_doc-0.0.12 Guardfile
k_doc-0.0.11 Guardfile
k_doc-0.0.10 Guardfile
k_doc-0.0.8 Guardfile
k_doc-0.0.7 Guardfile
k_doc-0.0.6 Guardfile
k_doc-0.0.5 Guardfile
k_doc-0.0.4 Guardfile