Skip to content

Commit

Permalink
Merge branch 'main' into multiple-instances
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy authored Nov 15, 2023
2 parents 5cd776a + ffc2102 commit eee216e
Show file tree
Hide file tree
Showing 75 changed files with 1,090 additions and 511 deletions.
115 changes: 115 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
name: build

on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-20.04
services:
redis:
image: redis
ports:
- 6379:6379
memcached:
image: memcached
ports:
- 11211:11211
strategy:
matrix:
ruby:
- '3.2'
- '3.1'
- '3.0'
- '2.7'
- '2.6'
- '2.5'
gemfile:
- rack_3
- rack_2
- rack_1
- rails_7_1
- rails_7_0
- rails_6_1
- rails_6_0
- rails_5_2
- dalli3
- dalli2
- redis_5
- redis_4
- connection_pool_dalli
- active_support_7_1_redis_cache_store
- active_support_7_1_redis_cache_store_pooled
- active_support_7_0_redis_cache_store
- active_support_7_0_redis_cache_store_pooled
- active_support_6_redis_cache_store
- active_support_6_redis_cache_store_pooled
- active_support_5_redis_cache_store
- active_support_5_redis_cache_store_pooled
- redis_store
exclude:
- gemfile: rack_1
ruby: '3.2'
- gemfile: rails_5_2
ruby: '3.2'
- gemfile: active_support_5_redis_cache_store
ruby: '3.2'
- gemfile: active_support_5_redis_cache_store_pooled
ruby: '3.2'
- gemfile: dalli2
ruby: '3.2'
- gemfile: rack_1
ruby: '3.1'
- gemfile: rails_5_2
ruby: '3.1'
- gemfile: active_support_5_redis_cache_store
ruby: '3.1'
- gemfile: active_support_5_redis_cache_store_pooled
ruby: '3.1'
- gemfile: dalli2
ruby: '3.1'
- gemfile: rack_1
ruby: '3.0'
- gemfile: rails_5_2
ruby: '3.0'
- gemfile: active_support_5_redis_cache_store
ruby: '3.0'
- gemfile: active_support_5_redis_cache_store_pooled
ruby: '3.0'
- gemfile: dalli2
ruby: '3.0'
- gemfile: rack_1
ruby: '2.7'
- gemfile: rails_7_0
ruby: '2.6'
- gemfile: rails_7_0
ruby: '2.5'
- gemfile: active_support_7_0_redis_cache_store
ruby: '2.6'
- gemfile: active_support_7_0_redis_cache_store
ruby: '2.5'
- gemfile: active_support_7_0_redis_cache_store_pooled
ruby: '2.6'
- gemfile: active_support_7_0_redis_cache_store_pooled
ruby: '2.5'
- gemfile: rails_7_1
ruby: '2.6'
- gemfile: rails_7_1
ruby: '2.5'
- gemfile: active_support_7_1_redis_cache_store
ruby: '2.6'
- gemfile: active_support_7_1_redis_cache_store
ruby: '2.5'
- gemfile: active_support_7_1_redis_cache_store_pooled
ruby: '2.6'
- gemfile: active_support_7_1_redis_cache_store_pooled
ruby: '2.5'
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake

42 changes: 31 additions & 11 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
require:
- rubocop-minitest
- rubocop-performance
- rubocop-rake

inherit_mode:
merge:
- Exclude

AllCops:
TargetRubyVersion: 2.3
TargetRubyVersion: 2.4
DisabledByDefault: true
NewCops: disable
Exclude:
- "examples/instrumentation.rb"
- "gemfiles/**/*"
Expand All @@ -21,17 +24,32 @@ Gemspec:
Layout:
Enabled: true

Layout/EmptyLinesAroundAttributeAccessor: # (0.83)
Enabled: true

Layout/SpaceAroundMethodCallOperator: # (0.82)
Enabled: true

Layout/LineLength:
Max: 120

Lint:
Enabled: true

Lint/DeprecatedOpenSSLConstant: # (0.84)
Enabled: true

Lint/RaiseException: # (0.81)
Enabled: true

Lint/StructNewOverride: # (0.81)
Enabled: true

Naming:
Enabled: true
Exclude:
- "lib/rack/attack/path_normalizer.rb"

Metrics/LineLength:
Max: 120

Performance:
Enabled: true

Expand All @@ -40,10 +58,6 @@ Security:

Style/BlockDelimiters:
Enabled: true
IgnoredMethods: [] # Workaround rubocop bug: https://github.com/rubocop-hq/rubocop/issues/6179

Style/BracesAroundHashParameters:
Enabled: true

Style/ClassAndModuleChildren:
Enabled: true
Expand All @@ -68,6 +82,12 @@ Style/FrozenStringLiteralComment:
Style/HashSyntax:
Enabled: true

Style/MultilineTernaryOperator:
Enabled: true

Style/NestedTernaryOperator:
Enabled: true

Style/OptionalArguments:
Enabled: true

Expand All @@ -83,6 +103,9 @@ Style/RedundantBegin:
Style/RedundantFreeze:
Enabled: true

Style/RedundantPercentQ:
Enabled: true

Style/RedundantSelf:
Enabled: true

Expand All @@ -94,6 +117,3 @@ Style/SingleLineMethods:

Style/SpecialGlobalVars:
Enabled: true

Style/UnneededPercentQ:
Enabled: true
44 changes: 0 additions & 44 deletions .travis.yml

This file was deleted.

89 changes: 63 additions & 26 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,22 +1,38 @@
# frozen_string_literal: true

appraise "rack_2_0" do
gem "rack", "~> 2.0.4"
appraise "rack_3" do
gem "rack", "~> 3.0"
end

appraise "rack_1_6" do
appraise "rack_2" do
gem "rack", "~> 2.0"
end

appraise "rack_1" do
# Override activesupport and actionpack version constraints by making
# it more loose so it's compatible with rack 1.6.x
gem "actionpack", ">= 4.2"
gem "activesupport", ">= 4.2"

gem "rack", "~> 1.6.9"
gem "rack", "~> 1.6"

# Override rack-test version constraint by making it more loose
# so it's compatible with actionpack 4.2.x
gem "rack-test", ">= 0.6"
end

appraise 'rails_7-1' do
gem 'railties', '~> 7.1.0'
end

appraise 'rails_7-0' do
gem 'railties', '~> 7.0.0'
end

appraise 'rails_6-1' do
gem 'railties', '~> 6.1.0'
end

appraise 'rails_6-0' do
gem 'railties', '~> 6.0.0'
end
Expand All @@ -25,50 +41,71 @@ appraise 'rails_5-2' do
gem 'railties', '~> 5.2.0'
end

appraise 'rails_5-1' do
gem 'railties', '~> 5.1.0'
appraise 'dalli2' do
gem 'dalli', '~> 2.0'
end

appraise 'rails_4-2' do
gem 'railties', '~> 4.2.0'

# Override rack-test version constraint by making it more loose
# so it's compatible with actionpack 4.2.x
gem "rack-test", ">= 0.6"
appraise 'dalli3' do
gem 'dalli', '~> 3.0'
end

appraise 'dalli2' do
gem 'dalli', '~> 2.0'
appraise 'redis_5' do
gem 'redis', '~> 5.0'
end

appraise 'redis_4' do
gem 'redis', '~> 4.0'
end

appraise 'redis_3' do
gem 'redis', '~> 3.3'
appraise "connection_pool_dalli" do
gem "connection_pool", "~> 2.2"
gem "dalli", "~> 3.0"
end

appraise "connection_pool_dalli" do
appraise "active_support_7-1_redis_cache_store" do
gem "activesupport", "~> 7.1.0"
gem "redis", "~> 5.0"
end

appraise "active_support_7-1_redis_cache_store_pooled" do
gem "activesupport", "~> 7.1.0"
gem "connection_pool", "~> 2.2"
gem "redis", "~> 5.0"
end

appraise "active_support_7-0_redis_cache_store" do
gem "activesupport", "~> 7.0.0"
gem "redis", "~> 5.0"
end

appraise "active_support_7-0_redis_cache_store_pooled" do
gem "activesupport", "~> 7.0.0"
gem "connection_pool", "~> 2.2"
gem "redis", "~> 5.0"
end

appraise "active_support_6_redis_cache_store" do
gem "activesupport", "~> 6.1.0"
gem "redis", "~> 5.0"
end

appraise "active_support_6_redis_cache_store_pooled" do
gem "activesupport", "~> 6.1.0"
gem "connection_pool", "~> 2.2"
gem "dalli", "~> 2.7"
gem "redis", "~> 5.0"
end

appraise "active_support_redis_cache_store" do
appraise "active_support_5_redis_cache_store" do
gem "activesupport", "~> 5.2.0"
gem "redis", "~> 4.0"
gem "redis", "~> 5.0"
end

appraise "active_support_redis_cache_store_pooled" do
appraise "active_support_5_redis_cache_store_pooled" do
gem "activesupport", "~> 5.2.0"
gem "connection_pool", "~> 2.2"
gem "redis", "~> 4.0"
gem "redis", "~> 5.0"
end

appraise "redis_store" do
gem "redis-store", "~> 1.5"
end

appraise "active_support_redis_store" do
gem "redis-activesupport", "~> 5.0"
end
Loading

0 comments on commit eee216e

Please sign in to comment.