moneta 1.4.1 → 1.4.2
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 +4 -4
- data/.github/workflows/ruby.yml +418 -0
- data/CHANGES +4 -0
- data/Gemfile +1 -1
- data/README.md +16 -13
- data/lib/moneta/pool.rb +26 -6
- data/lib/moneta/version.rb +1 -1
- data/spec/active_support/cache_moneta_store_spec.rb +13 -13
- data/spec/helper.rb +14 -1
- data/spec/moneta/adapters/activerecord/adapter_activerecord_existing_connection_spec.rb +3 -1
- data/spec/moneta/adapters/activerecord/adapter_activerecord_spec.rb +15 -7
- data/spec/moneta/adapters/activerecord/standard_activerecord_spec.rb +5 -2
- data/spec/moneta/adapters/activerecord/standard_activerecord_with_expires_spec.rb +5 -2
- data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_spec.rb +3 -3
- data/spec/moneta/adapters/activesupportcache/adapter_activesupportcache_with_default_expires_spec.rb +2 -2
- data/spec/moneta/adapters/datamapper/adapter_datamapper_spec.rb +25 -8
- data/spec/moneta/adapters/datamapper/standard_datamapper_spec.rb +2 -2
- data/spec/moneta/adapters/datamapper/standard_datamapper_with_expires_spec.rb +2 -2
- data/spec/moneta/adapters/datamapper/standard_datamapper_with_repository_spec.rb +2 -2
- data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_spec.rb +13 -3
- data/spec/moneta/adapters/memcached/native/adapter_memcached_native_spec.rb +13 -3
- data/spec/moneta/adapters/mongo/adapter_mongo_with_default_expires_spec.rb +1 -1
- data/spec/moneta/adapters/redis/adapter_redis_spec.rb +13 -3
- data/spec/moneta/adapters/redis/standard_redis_spec.rb +8 -1
- data/spec/moneta/adapters/sequel/adapter_sequel_spec.rb +4 -4
- data/spec/moneta/adapters/sequel/helper.rb +10 -5
- data/spec/moneta/adapters/sequel/standard_sequel_spec.rb +1 -1
- data/spec/moneta/adapters/sequel/standard_sequel_with_expires_spec.rb +1 -1
- data/spec/moneta/adapters/sqlite/adapter_sqlite_spec.rb +1 -1
- data/spec/moneta/adapters/sqlite/standard_sqlite_spec.rb +1 -1
- data/spec/moneta/adapters/sqlite/standard_sqlite_with_expires_spec.rb +1 -1
- data/spec/moneta/proxies/pool/pool_spec.rb +31 -3
- metadata +7 -15
- data/.travis.yml +0 -146
- data/spec/moneta/adapters/memcached/dalli/adapter_memcached_dalli_with_default_expires_spec.rb +0 -15
- data/spec/moneta/adapters/memcached/native/adapter_memcached_native_with_default_expires_spec.rb +0 -15
- data/spec/moneta/adapters/redis/adapter_redis_with_default_expires_spec.rb +0 -10
- data/spec/moneta/proxies/proxy/proxy_redis_spec.rb +0 -13
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a202106a03e55e35500188da66bf1509b5759c5d202ef0b6b84e731247d8fa62
|
|
4
|
+
data.tar.gz: 964762ceafae4fafa65f0a07e2ac6d90f8d1bc43b1d74d5428736eb9a23a86f0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 18e5417ed780ae397000d539e8d7f1d5e51dfce856fb7913f11f2ff5f53a1c5f52a50ba3a2bccaca5572d894f8fd1adf77a73f1b446323e00b7c0cf0814c3710
|
|
7
|
+
data.tar.gz: c8f781706f5cd8022a9b728a2d9948d7a14e08c875ee6c1b75d4df7faefb94ebf54a0192733b5c0af05d1b879296dcf687aedaf40125daad234aaa44429cb540
|
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
name: Ruby CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ master ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
adapters:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
strategy:
|
|
14
|
+
fail-fast: false
|
|
15
|
+
|
|
16
|
+
matrix:
|
|
17
|
+
ruby-version: [2.7, 2.6, 2.5, 2.4, 2.3, jruby]
|
|
18
|
+
adapter:
|
|
19
|
+
- Client
|
|
20
|
+
- Cookie
|
|
21
|
+
- Daybreak
|
|
22
|
+
#- dbm
|
|
23
|
+
- File
|
|
24
|
+
- Fog
|
|
25
|
+
- GDBM
|
|
26
|
+
- HashFile
|
|
27
|
+
#- HBase
|
|
28
|
+
- KyotoCabinet
|
|
29
|
+
- LevelDB
|
|
30
|
+
- LMDB
|
|
31
|
+
- LocalMemCache
|
|
32
|
+
- LRUHash
|
|
33
|
+
- Memory
|
|
34
|
+
- 'Null'
|
|
35
|
+
- PStore
|
|
36
|
+
- RestClient
|
|
37
|
+
#- riak
|
|
38
|
+
- SDBM
|
|
39
|
+
- TDB
|
|
40
|
+
- TokyoCabinet
|
|
41
|
+
- TokyoTyrant
|
|
42
|
+
- YAML
|
|
43
|
+
|
|
44
|
+
env:
|
|
45
|
+
BUNDLE_WITHOUT: activerecord riak couch cassandra postgresql mysql datamapper memcached_native
|
|
46
|
+
|
|
47
|
+
steps:
|
|
48
|
+
- uses: actions/checkout@v2
|
|
49
|
+
|
|
50
|
+
- name: Apt update
|
|
51
|
+
run: sudo apt-get update
|
|
52
|
+
|
|
53
|
+
- name: Apt install dependencies
|
|
54
|
+
run: sudo apt-get install -y libkyotocabinet-dev libleveldb-dev liblzo2-dev libtdb-dev libtokyocabinet-dev tokyotyrant libgdbm-dev
|
|
55
|
+
|
|
56
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
57
|
+
uses: ruby/setup-ruby@v1
|
|
58
|
+
with:
|
|
59
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
60
|
+
bundler: latest
|
|
61
|
+
bundler-cache: true
|
|
62
|
+
|
|
63
|
+
- name: Rspec
|
|
64
|
+
run: bundle exec rspec -t ~unstable -t adapter:${{ matrix.adapter }}
|
|
65
|
+
|
|
66
|
+
couch:
|
|
67
|
+
name: "Couch adapter"
|
|
68
|
+
runs-on: ubuntu-latest
|
|
69
|
+
|
|
70
|
+
services:
|
|
71
|
+
couch:
|
|
72
|
+
image: couchdb
|
|
73
|
+
env:
|
|
74
|
+
COUCHDB_USER: admin
|
|
75
|
+
COUCHDB_PASSWORD: password
|
|
76
|
+
options: >-
|
|
77
|
+
--health-cmd "curl -s http://127.0.0.1:5984/"
|
|
78
|
+
--health-interval 10s
|
|
79
|
+
--health-timeout 5s
|
|
80
|
+
--health-retries 5
|
|
81
|
+
ports:
|
|
82
|
+
- 5984:5984
|
|
83
|
+
|
|
84
|
+
strategy:
|
|
85
|
+
matrix:
|
|
86
|
+
ruby-version: [2.7, 2.3, jruby]
|
|
87
|
+
|
|
88
|
+
env:
|
|
89
|
+
BUNDLE_WITHOUT: activerecord riak cassandra postgresql mysql datamapper memcached_native leveldb lzo tdb
|
|
90
|
+
|
|
91
|
+
steps:
|
|
92
|
+
- uses: actions/checkout@v2
|
|
93
|
+
|
|
94
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
95
|
+
uses: ruby/setup-ruby@v1
|
|
96
|
+
with:
|
|
97
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
98
|
+
bundler: latest
|
|
99
|
+
bundler-cache: true
|
|
100
|
+
|
|
101
|
+
- name: Rspec
|
|
102
|
+
run: bundle exec rspec -t adapter:Couch
|
|
103
|
+
|
|
104
|
+
cassandra:
|
|
105
|
+
name: "Cassandra adapter"
|
|
106
|
+
runs-on: ubuntu-latest
|
|
107
|
+
|
|
108
|
+
services:
|
|
109
|
+
cassandra:
|
|
110
|
+
image: cassandra
|
|
111
|
+
options: >-
|
|
112
|
+
--health-cmd "cqlsh -e \"SELECT cql_version FROM system.local\""
|
|
113
|
+
--health-interval 10s
|
|
114
|
+
--health-timeout 5s
|
|
115
|
+
--health-retries 5
|
|
116
|
+
ports:
|
|
117
|
+
- 9042:9042
|
|
118
|
+
|
|
119
|
+
strategy:
|
|
120
|
+
matrix:
|
|
121
|
+
ruby-version: [2.7, 2.3, jruby]
|
|
122
|
+
|
|
123
|
+
env:
|
|
124
|
+
BUNDLE_WITHOUT: activerecord riak couch postgresql mysql datamapper memcached_native leveldb lzo tdb
|
|
125
|
+
|
|
126
|
+
steps:
|
|
127
|
+
- uses: actions/checkout@v2
|
|
128
|
+
|
|
129
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
130
|
+
uses: ruby/setup-ruby@v1
|
|
131
|
+
with:
|
|
132
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
133
|
+
bundler: latest
|
|
134
|
+
bundler-cache: true
|
|
135
|
+
|
|
136
|
+
- name: Rspec
|
|
137
|
+
run: bundle exec rspec -t adapter:Cassandra
|
|
138
|
+
|
|
139
|
+
mysql-adapters:
|
|
140
|
+
name: "MySQL adapters"
|
|
141
|
+
runs-on: ubuntu-latest
|
|
142
|
+
|
|
143
|
+
services:
|
|
144
|
+
mysql:
|
|
145
|
+
image: mysql
|
|
146
|
+
env:
|
|
147
|
+
MYSQL_ROOT_PASSWORD: moneta
|
|
148
|
+
options: >-
|
|
149
|
+
--health-cmd "mysqladmin ping -h 127.0.0.1 --silent"
|
|
150
|
+
--health-interval 10s
|
|
151
|
+
--health-timeout 5s
|
|
152
|
+
--health-retries 5
|
|
153
|
+
ports:
|
|
154
|
+
- 3306:3306
|
|
155
|
+
|
|
156
|
+
strategy:
|
|
157
|
+
matrix:
|
|
158
|
+
ruby-version: [2.7, 2.4, jruby]
|
|
159
|
+
|
|
160
|
+
env:
|
|
161
|
+
BUNDLE_WITHOUT: riak couch cassandra postgresql memcached_native leveldb
|
|
162
|
+
MYSQL_HOST: 127.0.0.1
|
|
163
|
+
MONETA_MYSQL_PASSWORD: moneta
|
|
164
|
+
|
|
165
|
+
steps:
|
|
166
|
+
- uses: actions/checkout@v2
|
|
167
|
+
|
|
168
|
+
- name: Apt update
|
|
169
|
+
run: sudo apt-get update
|
|
170
|
+
|
|
171
|
+
- name: Apt install mysql packages
|
|
172
|
+
run: sudo apt-get install -y libmysqlclient-dev
|
|
173
|
+
|
|
174
|
+
- name: Create Database moneta
|
|
175
|
+
run: mysqladmin -h 127.0.0.1 -u root create moneta
|
|
176
|
+
env:
|
|
177
|
+
MYSQL_PWD: moneta
|
|
178
|
+
|
|
179
|
+
- name: Create Database moneta2
|
|
180
|
+
run: mysqladmin -h 127.0.0.1 -u root create moneta2
|
|
181
|
+
env:
|
|
182
|
+
MYSQL_PWD: moneta
|
|
183
|
+
|
|
184
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
185
|
+
uses: ruby/setup-ruby@v1
|
|
186
|
+
with:
|
|
187
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
188
|
+
bundler: latest
|
|
189
|
+
bundler-cache: true
|
|
190
|
+
|
|
191
|
+
- name: Rspec
|
|
192
|
+
run: bundle exec rspec -t mysql
|
|
193
|
+
|
|
194
|
+
postgres-adapters:
|
|
195
|
+
name: "Postgres adapters"
|
|
196
|
+
runs-on: ubuntu-latest
|
|
197
|
+
|
|
198
|
+
services:
|
|
199
|
+
postgres:
|
|
200
|
+
image: postgres
|
|
201
|
+
env:
|
|
202
|
+
POSTGRES_PASSWORD: moneta
|
|
203
|
+
options: >-
|
|
204
|
+
--health-cmd pg_isready
|
|
205
|
+
--health-interval 10s
|
|
206
|
+
--health-timeout 5s
|
|
207
|
+
--health-retries 5
|
|
208
|
+
ports:
|
|
209
|
+
- 5432:5432
|
|
210
|
+
|
|
211
|
+
strategy:
|
|
212
|
+
matrix:
|
|
213
|
+
ruby-version: [2.7, 2.3, jruby]
|
|
214
|
+
|
|
215
|
+
env:
|
|
216
|
+
BUNDLE_WITHOUT: riak couch cassandra mysql memcached_native leveldb
|
|
217
|
+
PGHOST: localhost
|
|
218
|
+
PGUSER: postgres
|
|
219
|
+
PGPASSWORD: moneta
|
|
220
|
+
|
|
221
|
+
steps:
|
|
222
|
+
- uses: actions/checkout@v2
|
|
223
|
+
|
|
224
|
+
- name: Create Database moneta1
|
|
225
|
+
run: createdb moneta1
|
|
226
|
+
|
|
227
|
+
- name: Create Database moneta2
|
|
228
|
+
run: createdb moneta2
|
|
229
|
+
|
|
230
|
+
- name: Add hstore support to moneta1
|
|
231
|
+
run: psql -c 'create extension hstore;' moneta1
|
|
232
|
+
|
|
233
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
234
|
+
uses: ruby/setup-ruby@v1
|
|
235
|
+
with:
|
|
236
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
237
|
+
bundler: latest
|
|
238
|
+
bundler-cache: true
|
|
239
|
+
|
|
240
|
+
- name: Rspec
|
|
241
|
+
run: bundle exec rspec -t postgres
|
|
242
|
+
|
|
243
|
+
sqlite-adapters:
|
|
244
|
+
name: "SQLite adapters"
|
|
245
|
+
runs-on: ubuntu-latest
|
|
246
|
+
|
|
247
|
+
strategy:
|
|
248
|
+
matrix:
|
|
249
|
+
ruby-version: [2.7, 2.3, jruby]
|
|
250
|
+
|
|
251
|
+
env:
|
|
252
|
+
BUNDLE_WITHOUT: riak couch cassandra mysql postgres memcached_native leveldb
|
|
253
|
+
|
|
254
|
+
steps:
|
|
255
|
+
- uses: actions/checkout@v2
|
|
256
|
+
|
|
257
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
258
|
+
uses: ruby/setup-ruby@v1
|
|
259
|
+
with:
|
|
260
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
261
|
+
bundler: latest
|
|
262
|
+
bundler-cache: true
|
|
263
|
+
|
|
264
|
+
- name: Rspec
|
|
265
|
+
run: bundle exec rspec -t sqlite
|
|
266
|
+
|
|
267
|
+
redis:
|
|
268
|
+
name: "Redis adapters"
|
|
269
|
+
runs-on: ubuntu-latest
|
|
270
|
+
|
|
271
|
+
services:
|
|
272
|
+
redis:
|
|
273
|
+
image: redis
|
|
274
|
+
options: >-
|
|
275
|
+
--health-cmd "redis-cli ping"
|
|
276
|
+
--health-interval 10s
|
|
277
|
+
--health-timeout 5s
|
|
278
|
+
--health-retries 5
|
|
279
|
+
ports:
|
|
280
|
+
- 6379:6379
|
|
281
|
+
|
|
282
|
+
strategy:
|
|
283
|
+
matrix:
|
|
284
|
+
ruby-version: [2.7, 2.3, jruby]
|
|
285
|
+
|
|
286
|
+
env:
|
|
287
|
+
BUNDLE_WITHOUT: activerecord riak couch cassandra postgresql mysql datamapper memcached_native leveldb
|
|
288
|
+
|
|
289
|
+
steps:
|
|
290
|
+
- uses: actions/checkout@v2
|
|
291
|
+
|
|
292
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
293
|
+
uses: ruby/setup-ruby@v1
|
|
294
|
+
with:
|
|
295
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
296
|
+
bundler: latest
|
|
297
|
+
bundler-cache: true
|
|
298
|
+
|
|
299
|
+
- name: Rspec
|
|
300
|
+
run: bundle exec rspec -t adapter:Redis -t redis
|
|
301
|
+
|
|
302
|
+
memcached:
|
|
303
|
+
name: "Memcached adapters"
|
|
304
|
+
runs-on: ubuntu-latest
|
|
305
|
+
|
|
306
|
+
strategy:
|
|
307
|
+
matrix:
|
|
308
|
+
ruby-version: [2.7, 2.3, jruby]
|
|
309
|
+
|
|
310
|
+
env:
|
|
311
|
+
BUNDLE_WITHOUT: activerecord riak couch cassandra postgresql mysql datamapper leveldb lzo tdb
|
|
312
|
+
|
|
313
|
+
steps:
|
|
314
|
+
- uses: actions/checkout@v2
|
|
315
|
+
|
|
316
|
+
- name: Apt update
|
|
317
|
+
run: sudo apt-get update
|
|
318
|
+
|
|
319
|
+
- name: Apt install memcached
|
|
320
|
+
run: sudo apt-get install -y memcached libsasl2-dev
|
|
321
|
+
|
|
322
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
323
|
+
uses: ruby/setup-ruby@v1
|
|
324
|
+
with:
|
|
325
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
326
|
+
bundler: latest
|
|
327
|
+
bundler-cache: true
|
|
328
|
+
|
|
329
|
+
- name: Rspec
|
|
330
|
+
run: bundle exec rspec -t ~unstable -t adapter:Memcached -t memcached
|
|
331
|
+
|
|
332
|
+
mongo:
|
|
333
|
+
name: "Mongo adapter"
|
|
334
|
+
runs-on: ubuntu-latest
|
|
335
|
+
|
|
336
|
+
services:
|
|
337
|
+
mongo:
|
|
338
|
+
image: mongo
|
|
339
|
+
options: >-
|
|
340
|
+
--health-cmd "mongo --eval db"
|
|
341
|
+
--health-interval 10s
|
|
342
|
+
--health-timeout 5s
|
|
343
|
+
--health-retries 5
|
|
344
|
+
ports:
|
|
345
|
+
- 27017:27017
|
|
346
|
+
|
|
347
|
+
strategy:
|
|
348
|
+
matrix:
|
|
349
|
+
ruby-version: [2.7, 2.3] #, jruby] - FIXME reenable once https://github.com/mongodb/mongo-ruby-driver/pull/2143 is released
|
|
350
|
+
|
|
351
|
+
env:
|
|
352
|
+
BUNDLE_WITHOUT: activerecord riak couch cassandra postgresql mysql datamapper memcached_native leveldb
|
|
353
|
+
|
|
354
|
+
steps:
|
|
355
|
+
- uses: actions/checkout@v2
|
|
356
|
+
|
|
357
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
358
|
+
uses: ruby/setup-ruby@v1
|
|
359
|
+
with:
|
|
360
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
361
|
+
bundler: latest
|
|
362
|
+
bundler-cache: true
|
|
363
|
+
|
|
364
|
+
- name: Rspec
|
|
365
|
+
run: bundle exec rspec -t adapter:Mongo
|
|
366
|
+
|
|
367
|
+
residual-specs:
|
|
368
|
+
name: "Proxies and other specs"
|
|
369
|
+
runs-on: ubuntu-latest
|
|
370
|
+
|
|
371
|
+
strategy:
|
|
372
|
+
matrix:
|
|
373
|
+
ruby-version: [2.7, 2.3, jruby]
|
|
374
|
+
|
|
375
|
+
env:
|
|
376
|
+
BUNDLE_WITHOUT: activerecord riak couch cassandra postgresql mysql datamapper memcached_native redis leveldb
|
|
377
|
+
|
|
378
|
+
steps:
|
|
379
|
+
- uses: actions/checkout@v2
|
|
380
|
+
|
|
381
|
+
- name: Apt update
|
|
382
|
+
run: sudo apt-get update
|
|
383
|
+
|
|
384
|
+
- name: Apt install dependencies
|
|
385
|
+
run: sudo apt-get install -y libgdbm-dev
|
|
386
|
+
|
|
387
|
+
- name: Set up Ruby ${{ matrix.ruby-version }}
|
|
388
|
+
uses: ruby/setup-ruby@v1
|
|
389
|
+
with:
|
|
390
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
391
|
+
bundler: latest
|
|
392
|
+
bundler-cache: true
|
|
393
|
+
|
|
394
|
+
- name: Rspec
|
|
395
|
+
run: bundle exec rspec -t ~unstable --exclude-pattern "./spec/{moneta/adapters/**/*,active_support/**/*}"
|
|
396
|
+
|
|
397
|
+
- name: Minitest
|
|
398
|
+
run: bundle exec ruby test/action_dispatch/session_moneta_store_test.rb
|
|
399
|
+
|
|
400
|
+
rubocop:
|
|
401
|
+
name: "Rubocop"
|
|
402
|
+
runs-on: ubuntu-latest
|
|
403
|
+
|
|
404
|
+
env:
|
|
405
|
+
BUNDLE_WITHOUT: activerecord riak couch cassandra postgresql mysql datamapper memcached_native redis leveldb
|
|
406
|
+
|
|
407
|
+
steps:
|
|
408
|
+
- uses: actions/checkout@v2
|
|
409
|
+
|
|
410
|
+
- name: Set up Ruby
|
|
411
|
+
uses: ruby/setup-ruby@v1
|
|
412
|
+
with:
|
|
413
|
+
ruby-version: 2.7
|
|
414
|
+
bundler: latest
|
|
415
|
+
bundler-cache: true
|
|
416
|
+
|
|
417
|
+
- name: Rubocop
|
|
418
|
+
run: bundle exec rubocop lib
|
data/CHANGES
CHANGED
data/Gemfile
CHANGED
|
@@ -36,7 +36,7 @@ gem 'cityhash', platforms: :ruby, group: :city
|
|
|
36
36
|
# Backends
|
|
37
37
|
gem 'daybreak', group: :daybreak
|
|
38
38
|
gem 'activerecord', '~> 5.2', group: :activerecord
|
|
39
|
-
gem 'redis', '~> 4.
|
|
39
|
+
gem 'redis', '~> 4.2', group: :redis
|
|
40
40
|
gem 'mongo', '>= 2', group: :mongo_official
|
|
41
41
|
gem 'sequel', group: :sequel
|
|
42
42
|
gem 'dalli', group: :memcached_dalli
|
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Moneta: A unified interface for key/value stores
|
|
2
2
|
|
|
3
3
|
[](http://rubygems.org/gems/moneta)
|
|
4
|
-
[](https://github.com/moneta-rb/moneta/actions/workflows/ruby.yml)
|
|
5
5
|
[](https://codeclimate.com/github/moneta-rb/moneta)
|
|
6
6
|
[](https://flattr.com/submit/auto?user_id=min4d&url=https://github.com/moneta-rb/moneta&title=Moneta&language=&tags=github&category=software)
|
|
7
7
|
|
|
@@ -32,7 +32,7 @@ same for template languages.
|
|
|
32
32
|
* Give people a starting point or example code to start working with their favourite key/value store. Feel free to copy code, please mention Moneta then :)
|
|
33
33
|
* Create a reusable piece of code, since similar things are solved over and over again ([Rails](http://rubyonrails.org/) brings its own cache stores, and many frameworks do the same...)
|
|
34
34
|
|
|
35
|
-
Moneta is tested thoroughly using [
|
|
35
|
+
Moneta is tested thoroughly using [GitHub Actions](https://github.com/moneta-rb/moneta/actions).
|
|
36
36
|
|
|
37
37
|
------
|
|
38
38
|
|
|
@@ -74,7 +74,7 @@ store.close
|
|
|
74
74
|
|
|
75
75
|
* Source: <http://github.com/moneta-rb/moneta>
|
|
76
76
|
* Bugs: <http://github.com/moneta-rb/moneta/issues>
|
|
77
|
-
* Tests and benchmarks: <
|
|
77
|
+
* Tests and benchmarks: <https://github.com/moneta-rb/moneta/actions>
|
|
78
78
|
* API documentation:
|
|
79
79
|
* Latest Gem: <http://rubydoc.info/gems/moneta/frames>
|
|
80
80
|
* GitHub master: <http://rubydoc.info/github/moneta-rb/moneta/master/frames>
|
|
@@ -221,7 +221,9 @@ __NOTE:__ <a name="backend-matrix"></a>The backend matrix is much more readable
|
|
|
221
221
|
3. Share a Moneta store between multiple processes using `Moneta::Shared` (See below).
|
|
222
222
|
4. If a store provides atomic increment it can be used with `Moneta::Semaphore`. You can add weak `#increment` support using the `Moneta::WeakIncrement` proxy.
|
|
223
223
|
5. If a store provides atomic creation it can be used with `Moneta::Mutex`. You can add weak `#create` support using the `Moneta::WeakCreate` proxy.
|
|
224
|
-
6. Add expiration support by using `Moneta::Expires` or by passing the option
|
|
224
|
+
6. Add expiration support by using `Moneta::Expires` or by passing the option
|
|
225
|
+
`expires: true` (or `expires: <seconds>` if you want all values to expire by
|
|
226
|
+
default) to `Moneta#new`.
|
|
225
227
|
7. This indicates that there is some performance gain when fetching multiple values at once using `#values_at`/`#fetch_values` or `#slice`. For instance, the `MGET` instruction in Redis, or the ability to retrieve several rows in one query in SQL.
|
|
226
228
|
8. This indicates that there is some performance gain when storing multiple key/value pairs at once using `#merge!`/`#update`.
|
|
227
229
|
9. Sqlite/YAML/PStore are multiprocess safe, but the performance suffers badly since the whole database file must be locked for writing. Use a key/value server if you want multiprocess concurrency!
|
|
@@ -909,15 +911,16 @@ Person.adapter :memory, Moneta.new(:Redis)
|
|
|
909
911
|
|
|
910
912
|
## Testing and Benchmarks
|
|
911
913
|
|
|
912
|
-
Testing is done using [
|
|
914
|
+
Testing is done using [GitHub Actions](https://github.com/moneta-rb/moneta/actions).
|
|
913
915
|
Currently we support MRI Ruby >= 2.3.0 and the JRuby >= 9.2.9.0.
|
|
914
916
|
|
|
915
|
-
Benchmarks for each store are done on
|
|
916
|
-
[Travis-CI](http://travis-ci.org/moneta-rb/moneta) for each build
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
917
|
+
~~Benchmarks for each store are done on
|
|
918
|
+
[Travis-CI](http://travis-ci.org/moneta-rb/moneta) for each build.~~ At the
|
|
919
|
+
time of writing, benchmarks still need to be migrated from Travis to GitHub
|
|
920
|
+
Actions. Take a look there to compare the speed of the different key value
|
|
921
|
+
stores for different key/value sizes and size distributions. Feel free to add
|
|
922
|
+
your own configurations! The impact of Moneta should be minimal since it is
|
|
923
|
+
only a thin layer on top of the different stores.
|
|
921
924
|
|
|
922
925
|
|
|
923
926
|
------
|
|
@@ -937,8 +940,8 @@ If you want support for another adapter you can at first at it to the list of
|
|
|
937
940
|
missing adapters at https://github.com/moneta-rb/moneta/issues/16
|
|
938
941
|
|
|
939
942
|
If you choose to implement an adapter please also add tests. Please check also
|
|
940
|
-
if
|
|
941
|
-
services.
|
|
943
|
+
if anything in `.github/workflows` needs changes, for example if you need to
|
|
944
|
+
start additional services.
|
|
942
945
|
|
|
943
946
|
Check if the default settings in Moneta#new are appropriate for your adapter. If
|
|
944
947
|
not specify a better one.
|