redis-store-pika 1.9.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.codeclimate.yml +6 -0
- data/.github/auto-assign-issues.yml +2 -0
- data/.github/workflows/ci.yml +64 -0
- data/.gitignore +9 -0
- data/.rubocop.yml +132 -0
- data/Appraisals +19 -0
- data/CHANGELOG.md +667 -0
- data/CODEOWNERS +1 -0
- data/Gemfile +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +68 -0
- data/Rakefile +15 -0
- data/gemfiles/redis_4_0_x.gemfile +7 -0
- data/gemfiles/redis_4_1_x.gemfile +7 -0
- data/gemfiles/redis_4_6_x.gemfile +7 -0
- data/gemfiles/redis_4_x.gemfile +7 -0
- data/gemfiles/redis_5_x.gemfile +7 -0
- data/lib/redis/distributed_store.rb +68 -0
- data/lib/redis/store/factory.rb +111 -0
- data/lib/redis/store/interface.rb +29 -0
- data/lib/redis/store/namespace.rb +211 -0
- data/lib/redis/store/redis_version.rb +13 -0
- data/lib/redis/store/serialization.rb +67 -0
- data/lib/redis/store/ttl.rb +47 -0
- data/lib/redis/store/version.rb +13 -0
- data/lib/redis/store.rb +85 -0
- data/lib/redis-store-pika.rb +1 -0
- data/lib/redis-store.rb +1 -0
- data/redis-store.gemspec +35 -0
- data/test/redis/distributed_store_test.rb +111 -0
- data/test/redis/store/factory_test.rb +273 -0
- data/test/redis/store/interface_test.rb +27 -0
- data/test/redis/store/namespace_test.rb +316 -0
- data/test/redis/store/redis_version_test.rb +28 -0
- data/test/redis/store/serialization_test.rb +173 -0
- data/test/redis/store/ttl_test.rb +142 -0
- data/test/redis/store/version_test.rb +7 -0
- data/test/redis/store_test.rb +68 -0
- data/test/test_helper.rb +20 -0
- metadata +246 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 81b2addec9de38f0684400daeb3ac98046a9bd3a4cbc2fdb69790abff4aa3398
|
4
|
+
data.tar.gz: 20230de9079342bfa6a81c5c8a71c8dce9014e56f7dcf3edc5de749ffe369882
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 6c363a2e1fc90aad92811dd695d2b3bb2ecf61d75822c9974da2deba2530f8a96280da07c562a2085a98bc8a84385d19ae4745aade7e75cc06046ad089dd75f3
|
7
|
+
data.tar.gz: 4c5f8c49e8aac6e90bad2a82ef96151e307fd6cf1fb7205ef6947dc8559f268b56d399ea7e6810295bbbefb21a4a99211355d0d4c61847ad61c87381422e7a95
|
data/.codeclimate.yml
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
push:
|
5
|
+
branches-ignore: [master]
|
6
|
+
tags-ignore: [v*]
|
7
|
+
concurrency:
|
8
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
9
|
+
cancel-in-progress: true
|
10
|
+
jobs:
|
11
|
+
test:
|
12
|
+
name: "test (ruby: ${{ matrix.ruby }}, redis.rb: ${{ matrix.redis }})"
|
13
|
+
runs-on: ubuntu-latest
|
14
|
+
continue-on-error: ${{ contains(matrix.ruby, 'head') }}
|
15
|
+
strategy:
|
16
|
+
fail-fast: false
|
17
|
+
matrix:
|
18
|
+
ruby:
|
19
|
+
- "2.7"
|
20
|
+
- "3.0"
|
21
|
+
- "3.1"
|
22
|
+
# - 'head'
|
23
|
+
- "jruby"
|
24
|
+
# - 'jruby-head'
|
25
|
+
- "truffleruby"
|
26
|
+
# - 'truffleruby-head'
|
27
|
+
redis:
|
28
|
+
- 4_0_x
|
29
|
+
- 4_1_x
|
30
|
+
- 4_x
|
31
|
+
- 5_x
|
32
|
+
env:
|
33
|
+
BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/redis_${{ matrix.redis }}.gemfile
|
34
|
+
services:
|
35
|
+
redis:
|
36
|
+
image: redis
|
37
|
+
ports:
|
38
|
+
- 6379:6379
|
39
|
+
distributed1:
|
40
|
+
image: redis
|
41
|
+
ports:
|
42
|
+
- 6380:6380
|
43
|
+
distributed2:
|
44
|
+
image: redis
|
45
|
+
ports:
|
46
|
+
- 6381:6381
|
47
|
+
steps:
|
48
|
+
- uses: actions/checkout@v3
|
49
|
+
- uses: ruby/setup-ruby@v1
|
50
|
+
with:
|
51
|
+
ruby-version: ${{ matrix.ruby }}
|
52
|
+
bundler-cache: true
|
53
|
+
- run: bundle exec rake
|
54
|
+
lint:
|
55
|
+
runs-on: ubuntu-latest
|
56
|
+
steps:
|
57
|
+
- uses: actions/checkout@v3
|
58
|
+
with:
|
59
|
+
fetch-depth: 0
|
60
|
+
- uses: ruby/setup-ruby@v1
|
61
|
+
with:
|
62
|
+
ruby-version: 3.1
|
63
|
+
bundler-cache: true
|
64
|
+
- run: bundle exec rake lint
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,132 @@
|
|
1
|
+
---
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.4
|
4
|
+
# RuboCop has a bunch of cops enabled by default. This setting tells RuboCop
|
5
|
+
# to ignore them, so only the ones explicitly set in this file are enabled.
|
6
|
+
DisabledByDefault: true
|
7
|
+
Exclude:
|
8
|
+
- "**/vendor/**/*"
|
9
|
+
|
10
|
+
# Prefer &&/|| over and/or.
|
11
|
+
Style/AndOr:
|
12
|
+
Enabled: true
|
13
|
+
|
14
|
+
# Align comments with method definitions.
|
15
|
+
Layout/CommentIndentation:
|
16
|
+
Enabled: true
|
17
|
+
|
18
|
+
Layout/ElseAlignment:
|
19
|
+
Enabled: true
|
20
|
+
|
21
|
+
Layout/EmptyLineAfterMagicComment:
|
22
|
+
Enabled: true
|
23
|
+
|
24
|
+
# In a regular class definition, no empty lines around the body.
|
25
|
+
Layout/EmptyLinesAroundClassBody:
|
26
|
+
Enabled: true
|
27
|
+
|
28
|
+
# In a regular method definition, no empty lines around the body.
|
29
|
+
Layout/EmptyLinesAroundMethodBody:
|
30
|
+
Enabled: true
|
31
|
+
|
32
|
+
# In a regular module definition, no empty lines around the body.
|
33
|
+
Layout/EmptyLinesAroundModuleBody:
|
34
|
+
Enabled: true
|
35
|
+
|
36
|
+
Layout/FirstParameterIndentation:
|
37
|
+
Enabled: true
|
38
|
+
|
39
|
+
# Method definitions after `private` or `protected` isolated calls need one
|
40
|
+
# extra level of indentation.
|
41
|
+
Layout/IndentationConsistency:
|
42
|
+
Enabled: true
|
43
|
+
EnforcedStyle: indented_internal_methods
|
44
|
+
|
45
|
+
# Two spaces, no tabs (for indentation).
|
46
|
+
Layout/IndentationWidth:
|
47
|
+
Enabled: true
|
48
|
+
|
49
|
+
Layout/LeadingCommentSpace:
|
50
|
+
Enabled: true
|
51
|
+
|
52
|
+
Layout/SpaceAfterColon:
|
53
|
+
Enabled: true
|
54
|
+
|
55
|
+
Layout/SpaceAfterComma:
|
56
|
+
Enabled: true
|
57
|
+
|
58
|
+
Layout/SpaceAroundEqualsInParameterDefault:
|
59
|
+
Enabled: true
|
60
|
+
|
61
|
+
Layout/SpaceAroundKeyword:
|
62
|
+
Enabled: true
|
63
|
+
|
64
|
+
Layout/SpaceAroundOperators:
|
65
|
+
Enabled: true
|
66
|
+
|
67
|
+
Layout/SpaceBeforeComma:
|
68
|
+
Enabled: true
|
69
|
+
|
70
|
+
Layout/SpaceBeforeFirstArg:
|
71
|
+
Enabled: true
|
72
|
+
|
73
|
+
Style/DefWithParentheses:
|
74
|
+
Enabled: true
|
75
|
+
|
76
|
+
# Defining a method with parameters needs parentheses.
|
77
|
+
Style/MethodDefParentheses:
|
78
|
+
Enabled: true
|
79
|
+
|
80
|
+
# Use `foo {}` not `foo{}`.
|
81
|
+
Layout/SpaceBeforeBlockBraces:
|
82
|
+
Enabled: true
|
83
|
+
|
84
|
+
# Use `foo { bar }` not `foo {bar}`.
|
85
|
+
Layout/SpaceInsideBlockBraces:
|
86
|
+
Enabled: true
|
87
|
+
|
88
|
+
# Use `{ a: 1 }` not `{a:1}`.
|
89
|
+
Layout/SpaceInsideHashLiteralBraces:
|
90
|
+
Enabled: true
|
91
|
+
|
92
|
+
Layout/SpaceInsideParens:
|
93
|
+
Enabled: true
|
94
|
+
|
95
|
+
# Detect hard tabs, no hard tabs.
|
96
|
+
Layout/IndentationStyle:
|
97
|
+
Enabled: true
|
98
|
+
|
99
|
+
# Blank lines should not have any spaces.
|
100
|
+
Layout/TrailingEmptyLines:
|
101
|
+
Enabled: true
|
102
|
+
|
103
|
+
# No trailing whitespace.
|
104
|
+
Layout/TrailingWhitespace:
|
105
|
+
Enabled: true
|
106
|
+
|
107
|
+
# Use quotes for string literals when they are enough.
|
108
|
+
Style/RedundantPercentQ:
|
109
|
+
Enabled: true
|
110
|
+
|
111
|
+
# Align `end` with the matching keyword or starting expression except for
|
112
|
+
# assignments, where it should be aligned with the LHS.
|
113
|
+
Layout/EndAlignment:
|
114
|
+
Enabled: true
|
115
|
+
EnforcedStyleAlignWith: variable
|
116
|
+
AutoCorrect: true
|
117
|
+
|
118
|
+
# Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
|
119
|
+
Lint/RequireParentheses:
|
120
|
+
Enabled: true
|
121
|
+
|
122
|
+
Style/RedundantReturn:
|
123
|
+
Enabled: true
|
124
|
+
AllowMultipleReturnValues: true
|
125
|
+
|
126
|
+
Style/Semicolon:
|
127
|
+
Enabled: true
|
128
|
+
AllowAsExpressionSeparator: true
|
129
|
+
|
130
|
+
# Prefer Foo.method over Foo::method
|
131
|
+
Style/ColonMethodCall:
|
132
|
+
Enabled: true
|
data/Appraisals
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
appraise "redis_4_0_x" do
|
2
|
+
gem "redis", "~> 4.0.0"
|
3
|
+
end
|
4
|
+
|
5
|
+
appraise "redis_4_1_x" do
|
6
|
+
gem "redis", "~> 4.1.0"
|
7
|
+
end
|
8
|
+
|
9
|
+
appraise "redis_4_6_x" do
|
10
|
+
gem "redis", "~> 4.6.0"
|
11
|
+
end
|
12
|
+
|
13
|
+
appraise "redis_4_x" do
|
14
|
+
gem "redis", "~> 4.0"
|
15
|
+
end
|
16
|
+
|
17
|
+
appraise "redis_5_x" do
|
18
|
+
gem "redis", "~> 5.0"
|
19
|
+
end
|