Sha256: b29def660b816bc70f955812b54342ee8fd0406add1d171925f283a2d070cf90

Contents?: true

Size: 1.52 KB

Versions: 8

Compression:

Stored size: 1.52 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 rails52].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

8 entries across 8 versions & 1 rubygems

Version Path
loga-2.5.4 Guardfile
loga-2.5.3 Guardfile
loga-2.5.2 Guardfile
loga-2.5.1 Guardfile
loga-2.5.0 Guardfile
loga-2.4.0 Guardfile
loga-2.3.1 Guardfile
loga-2.3.0 Guardfile