Sha256: 88cc87cc3075bbba2f66cc7ff490a5f4f1e89ffc83edb6ae8ed6ec7310371ce8

Contents?: true

Size: 1007 Bytes

Versions: 2

Compression:

Stored size: 1007 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/unit/#{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

  guard :shell do
    watch(%r{^spec/usecases/.+\.rbx$}) do |m|
      `ruby -r ./spec/usecases/dsl_initialize.rb #{m[0]}`
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ad-agent_architecture-0.0.11 Guardfile
ad-agent_architecture-0.0.10 Guardfile