Sha256: 66f875e691448fce7ffe1635e984e0ba6f35cbba694cdebd95d1d53fb7a690a0

Contents?: true

Size: 1.51 KB

Versions: 5

Compression:

Stored size: 1.51 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[rails52 rails61 rails70].each do |appraisal|
      cmd = "RACK_ENV=#{env} bundle exec appraisal #{appraisal} rspec"

      guard :rspec, all_on_start: true, cmd: cmd 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 :sidekiq do
  cmd = 'bundle exec appraisal sidekiq51 rspec'

  guard :rspec, all_on_start: true, cmd: cmd do
    watch('lib/loga/sidekiq/job_logger.rb') do
      [
        'spec/integration/sidekiq_spec.rb',
        'spec/loga/sidekiq/job_logger_spec.rb',
        'spec/loga/sidekiq_spec.rb',
      ]
    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

5 entries across 5 versions & 1 rubygems

Version Path
loga-2.8.1 Guardfile
loga-2.8.0 Guardfile
loga-2.7.0 Guardfile
loga-2.6.1 Guardfile
loga-2.6.0 Guardfile