Skip to content

Commit eee216e

Browse files
authored
Merge branch 'main' into multiple-instances
2 parents 5cd776a + ffc2102 commit eee216e

File tree

75 files changed

+1090
-511
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1090
-511
lines changed

.github/workflows/build.yml

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
name: build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test:
7+
runs-on: ubuntu-20.04
8+
services:
9+
redis:
10+
image: redis
11+
ports:
12+
- 6379:6379
13+
memcached:
14+
image: memcached
15+
ports:
16+
- 11211:11211
17+
strategy:
18+
matrix:
19+
ruby:
20+
- '3.2'
21+
- '3.1'
22+
- '3.0'
23+
- '2.7'
24+
- '2.6'
25+
- '2.5'
26+
gemfile:
27+
- rack_3
28+
- rack_2
29+
- rack_1
30+
- rails_7_1
31+
- rails_7_0
32+
- rails_6_1
33+
- rails_6_0
34+
- rails_5_2
35+
- dalli3
36+
- dalli2
37+
- redis_5
38+
- redis_4
39+
- connection_pool_dalli
40+
- active_support_7_1_redis_cache_store
41+
- active_support_7_1_redis_cache_store_pooled
42+
- active_support_7_0_redis_cache_store
43+
- active_support_7_0_redis_cache_store_pooled
44+
- active_support_6_redis_cache_store
45+
- active_support_6_redis_cache_store_pooled
46+
- active_support_5_redis_cache_store
47+
- active_support_5_redis_cache_store_pooled
48+
- redis_store
49+
exclude:
50+
- gemfile: rack_1
51+
ruby: '3.2'
52+
- gemfile: rails_5_2
53+
ruby: '3.2'
54+
- gemfile: active_support_5_redis_cache_store
55+
ruby: '3.2'
56+
- gemfile: active_support_5_redis_cache_store_pooled
57+
ruby: '3.2'
58+
- gemfile: dalli2
59+
ruby: '3.2'
60+
- gemfile: rack_1
61+
ruby: '3.1'
62+
- gemfile: rails_5_2
63+
ruby: '3.1'
64+
- gemfile: active_support_5_redis_cache_store
65+
ruby: '3.1'
66+
- gemfile: active_support_5_redis_cache_store_pooled
67+
ruby: '3.1'
68+
- gemfile: dalli2
69+
ruby: '3.1'
70+
- gemfile: rack_1
71+
ruby: '3.0'
72+
- gemfile: rails_5_2
73+
ruby: '3.0'
74+
- gemfile: active_support_5_redis_cache_store
75+
ruby: '3.0'
76+
- gemfile: active_support_5_redis_cache_store_pooled
77+
ruby: '3.0'
78+
- gemfile: dalli2
79+
ruby: '3.0'
80+
- gemfile: rack_1
81+
ruby: '2.7'
82+
- gemfile: rails_7_0
83+
ruby: '2.6'
84+
- gemfile: rails_7_0
85+
ruby: '2.5'
86+
- gemfile: active_support_7_0_redis_cache_store
87+
ruby: '2.6'
88+
- gemfile: active_support_7_0_redis_cache_store
89+
ruby: '2.5'
90+
- gemfile: active_support_7_0_redis_cache_store_pooled
91+
ruby: '2.6'
92+
- gemfile: active_support_7_0_redis_cache_store_pooled
93+
ruby: '2.5'
94+
- gemfile: rails_7_1
95+
ruby: '2.6'
96+
- gemfile: rails_7_1
97+
ruby: '2.5'
98+
- gemfile: active_support_7_1_redis_cache_store
99+
ruby: '2.6'
100+
- gemfile: active_support_7_1_redis_cache_store
101+
ruby: '2.5'
102+
- gemfile: active_support_7_1_redis_cache_store_pooled
103+
ruby: '2.6'
104+
- gemfile: active_support_7_1_redis_cache_store_pooled
105+
ruby: '2.5'
106+
env:
107+
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
108+
steps:
109+
- uses: actions/checkout@v2
110+
- uses: ruby/setup-ruby@v1
111+
with:
112+
ruby-version: ${{ matrix.ruby }}
113+
bundler-cache: true
114+
- run: bundle exec rake
115+

.rubocop.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
require:
2+
- rubocop-minitest
23
- rubocop-performance
4+
- rubocop-rake
35

46
inherit_mode:
57
merge:
68
- Exclude
79

810
AllCops:
9-
TargetRubyVersion: 2.3
11+
TargetRubyVersion: 2.4
1012
DisabledByDefault: true
13+
NewCops: disable
1114
Exclude:
1215
- "examples/instrumentation.rb"
1316
- "gemfiles/**/*"
@@ -21,17 +24,32 @@ Gemspec:
2124
Layout:
2225
Enabled: true
2326

27+
Layout/EmptyLinesAroundAttributeAccessor: # (0.83)
28+
Enabled: true
29+
30+
Layout/SpaceAroundMethodCallOperator: # (0.82)
31+
Enabled: true
32+
33+
Layout/LineLength:
34+
Max: 120
35+
2436
Lint:
2537
Enabled: true
2638

39+
Lint/DeprecatedOpenSSLConstant: # (0.84)
40+
Enabled: true
41+
42+
Lint/RaiseException: # (0.81)
43+
Enabled: true
44+
45+
Lint/StructNewOverride: # (0.81)
46+
Enabled: true
47+
2748
Naming:
2849
Enabled: true
2950
Exclude:
3051
- "lib/rack/attack/path_normalizer.rb"
3152

32-
Metrics/LineLength:
33-
Max: 120
34-
3553
Performance:
3654
Enabled: true
3755

@@ -40,10 +58,6 @@ Security:
4058

4159
Style/BlockDelimiters:
4260
Enabled: true
43-
IgnoredMethods: [] # Workaround rubocop bug: https://github.com/rubocop-hq/rubocop/issues/6179
44-
45-
Style/BracesAroundHashParameters:
46-
Enabled: true
4761

4862
Style/ClassAndModuleChildren:
4963
Enabled: true
@@ -68,6 +82,12 @@ Style/FrozenStringLiteralComment:
6882
Style/HashSyntax:
6983
Enabled: true
7084

85+
Style/MultilineTernaryOperator:
86+
Enabled: true
87+
88+
Style/NestedTernaryOperator:
89+
Enabled: true
90+
7191
Style/OptionalArguments:
7292
Enabled: true
7393

@@ -83,6 +103,9 @@ Style/RedundantBegin:
83103
Style/RedundantFreeze:
84104
Enabled: true
85105

106+
Style/RedundantPercentQ:
107+
Enabled: true
108+
86109
Style/RedundantSelf:
87110
Enabled: true
88111

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

95118
Style/SpecialGlobalVars:
96119
Enabled: true
97-
98-
Style/UnneededPercentQ:
99-
Enabled: true

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

Appraisals

Lines changed: 63 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,38 @@
11
# frozen_string_literal: true
22

3-
appraise "rack_2_0" do
4-
gem "rack", "~> 2.0.4"
3+
appraise "rack_3" do
4+
gem "rack", "~> 3.0"
55
end
66

7-
appraise "rack_1_6" do
7+
appraise "rack_2" do
8+
gem "rack", "~> 2.0"
9+
end
10+
11+
appraise "rack_1" do
812
# Override activesupport and actionpack version constraints by making
913
# it more loose so it's compatible with rack 1.6.x
1014
gem "actionpack", ">= 4.2"
1115
gem "activesupport", ">= 4.2"
1216

13-
gem "rack", "~> 1.6.9"
17+
gem "rack", "~> 1.6"
1418

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

24+
appraise 'rails_7-1' do
25+
gem 'railties', '~> 7.1.0'
26+
end
27+
28+
appraise 'rails_7-0' do
29+
gem 'railties', '~> 7.0.0'
30+
end
31+
32+
appraise 'rails_6-1' do
33+
gem 'railties', '~> 6.1.0'
34+
end
35+
2036
appraise 'rails_6-0' do
2137
gem 'railties', '~> 6.0.0'
2238
end
@@ -25,50 +41,71 @@ appraise 'rails_5-2' do
2541
gem 'railties', '~> 5.2.0'
2642
end
2743

28-
appraise 'rails_5-1' do
29-
gem 'railties', '~> 5.1.0'
44+
appraise 'dalli2' do
45+
gem 'dalli', '~> 2.0'
3046
end
3147

32-
appraise 'rails_4-2' do
33-
gem 'railties', '~> 4.2.0'
34-
35-
# Override rack-test version constraint by making it more loose
36-
# so it's compatible with actionpack 4.2.x
37-
gem "rack-test", ">= 0.6"
48+
appraise 'dalli3' do
49+
gem 'dalli', '~> 3.0'
3850
end
3951

40-
appraise 'dalli2' do
41-
gem 'dalli', '~> 2.0'
52+
appraise 'redis_5' do
53+
gem 'redis', '~> 5.0'
4254
end
4355

4456
appraise 'redis_4' do
4557
gem 'redis', '~> 4.0'
4658
end
4759

48-
appraise 'redis_3' do
49-
gem 'redis', '~> 3.3'
60+
appraise "connection_pool_dalli" do
61+
gem "connection_pool", "~> 2.2"
62+
gem "dalli", "~> 3.0"
5063
end
5164

52-
appraise "connection_pool_dalli" do
65+
appraise "active_support_7-1_redis_cache_store" do
66+
gem "activesupport", "~> 7.1.0"
67+
gem "redis", "~> 5.0"
68+
end
69+
70+
appraise "active_support_7-1_redis_cache_store_pooled" do
71+
gem "activesupport", "~> 7.1.0"
72+
gem "connection_pool", "~> 2.2"
73+
gem "redis", "~> 5.0"
74+
end
75+
76+
appraise "active_support_7-0_redis_cache_store" do
77+
gem "activesupport", "~> 7.0.0"
78+
gem "redis", "~> 5.0"
79+
end
80+
81+
appraise "active_support_7-0_redis_cache_store_pooled" do
82+
gem "activesupport", "~> 7.0.0"
83+
gem "connection_pool", "~> 2.2"
84+
gem "redis", "~> 5.0"
85+
end
86+
87+
appraise "active_support_6_redis_cache_store" do
88+
gem "activesupport", "~> 6.1.0"
89+
gem "redis", "~> 5.0"
90+
end
91+
92+
appraise "active_support_6_redis_cache_store_pooled" do
93+
gem "activesupport", "~> 6.1.0"
5394
gem "connection_pool", "~> 2.2"
54-
gem "dalli", "~> 2.7"
95+
gem "redis", "~> 5.0"
5596
end
5697

57-
appraise "active_support_redis_cache_store" do
98+
appraise "active_support_5_redis_cache_store" do
5899
gem "activesupport", "~> 5.2.0"
59-
gem "redis", "~> 4.0"
100+
gem "redis", "~> 5.0"
60101
end
61102

62-
appraise "active_support_redis_cache_store_pooled" do
103+
appraise "active_support_5_redis_cache_store_pooled" do
63104
gem "activesupport", "~> 5.2.0"
64105
gem "connection_pool", "~> 2.2"
65-
gem "redis", "~> 4.0"
106+
gem "redis", "~> 5.0"
66107
end
67108

68109
appraise "redis_store" do
69110
gem "redis-store", "~> 1.5"
70111
end
71-
72-
appraise "active_support_redis_store" do
73-
gem "redis-activesupport", "~> 5.0"
74-
end

0 commit comments

Comments
 (0)