Sha256: 10e6897f47a0d795bfd04b033a7c3dc3f37394f7294b047ee2ccba5df6964108

Contents?: true

Size: 874 Bytes

Versions: 94

Compression:

Stored size: 874 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
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 Guardfile
rails_app_generator-0.3.5 Guardfile
rails_app_generator-0.3.4 Guardfile
rails_app_generator-0.3.3 Guardfile
rails_app_generator-0.3.2 Guardfile
rails_app_generator-0.3.1 Guardfile
rails_app_generator-0.3.0 Guardfile
rails_app_generator-0.2.43 Guardfile
rails_app_generator-0.2.42 Guardfile
rails_app_generator-0.2.41 Guardfile
rails_app_generator-0.2.40 Guardfile
rails_app_generator-0.2.39 Guardfile
rails_app_generator-0.2.38 Guardfile
rails_app_generator-0.2.37 Guardfile
rails_app_generator-0.2.36 Guardfile
rails_app_generator-0.2.35 Guardfile
rails_app_generator-0.2.34 Guardfile
rails_app_generator-0.2.33 Guardfile
rails_app_generator-0.2.32 Guardfile
rails_app_generator-0.2.31 Guardfile