Sha256: e925a25fb10b4f72bf5ddca04612ecd416821c6525ae1005a8897cf58c443bdb

Contents?: true

Size: 1.04 KB

Versions: 3

Compression:

Stored size: 1.04 KB

Contents

guard :rspec do
  #run all specs if configuration is modified
  watch('Guardfile')           { 'spec' }
  watch('Gemfile.lock')        { 'spec' }
  watch('spec/spec_helper.rb') { 'spec' }

  # run all specs if supporting files files are modified
  watch(%r{\Aspec/(?:lib|support|shared)/.+\.rb\z}) { 'spec' }

  # run unit specs if associated lib code is modified
  watch(%r{\Alib/(.+)\.rb\z})                                         { |m| Dir["spec/unit/#{m[1]}"]         }
  watch(%r{\Alib/(.+)/support/(.+)\.rb\z})                            { |m| Dir["spec/unit/#{m[1]}/#{m[2]}"] }
  watch("lib/#{File.basename(File.expand_path('../', __FILE__))}.rb") { 'spec'                               }

  # run a spec if it is modified
  watch(%r{\Aspec/(?:unit|integration)/.+_spec\.rb\z})

  notification :tmux, :display_message => true
end

guard :rubocop, cli: %w[--config config/rubocop.yml] do
  watch(%r{.+\.(?:rb|rake)\z})
  watch(%r{\Aconfig/rubocop\.yml\z})  { |m| File.dirname(m[0]) }
  watch(%r{(?:.+/)?\.rubocop\.yml\z}) { |m| File.dirname(m[0]) }
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rom-relation-0.1.2 Guardfile
rom-relation-0.1.1 Guardfile
rom-relation-0.1.0 Guardfile