Sha256: b85bec4da9a15494478515206e649d710808a9c9b671a57bf657a5c15e4a3960

Contents?: true

Size: 1.2 KB

Versions: 4

Compression:

Stored size: 1.2 KB

Contents

guard :rubocop do
  watch(%r{^lib/.+\.rb$})
  watch(%r{^spec/.+\.rb$})
end

group :sinatra do
  %w(production development).each do |env|
    guard :rspec,
          all_on_start: true,
          cmd: "RACK_ENV=#{env} bundle exec appraisal sinatra14 rspec" do
      watch(%r{^spec/integration/sinatra_spec.rb$})
    end
  end
end

group :rails do
  %w(production development).each do |env|
    %w(rails32 rails40 rails50).each do |appraisal|
      guard :rspec,
            all_on_start: true,
            cmd: "RACK_ENV=#{env} bundle exec appraisal #{appraisal} rspec" do
        watch('lib/loga/railtie.rb') do
          [
            'spec/integration/rails/request_spec.rb',
            'spec/integration/rails/railtie_spec.rb',
          ]
        end
        watch(%r{^spec/fixtures/rails\d{2}/.+\.rb$}) do
          [
            'spec/integration/rails/request_spec.rb',
            'spec/integration/rails/railtie_spec.rb',
          ]
        end
        watch(%r{^spec/integration/rails/.+_spec\.rb$})
      end
    end
  end
end

group :unit do
  guard :rspec, cmd: 'bundle exec appraisal unit rspec' do
    watch(%r{^spec/unit/.+_spec\.rb$})
    watch(%r{^lib/(.+)\.rb$}) { |m| "spec/unit/#{m[1]}_spec.rb" }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
loga-2.1.2 Guardfile
loga-2.1.1 Guardfile
loga-2.0.0 Guardfile
loga-2.1.0 Guardfile