activesupport_cache_database 0.1.2 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 973852575f17d5bc8f4faf071724c054068e5ab070782dce02844a72d418dd2a
4
- data.tar.gz: 7551068640fe8e9c00f0e7e4474909d21bcd05b8881723fe6907f9b152e278c4
3
+ metadata.gz: d60d7d422c325c71a260bc33eb80fa7b402cd467afbed925778820c1d27d51bb
4
+ data.tar.gz: cef45b1c8e48c971737b52ebe318b2e76f5ef0f846ac997155c4b5e0a3fdc533
5
5
  SHA512:
6
- metadata.gz: 6420375b2577ed8f62df452e71d7d280d343d193666d52c36fa5a3aea4d57eac1e3ca81e902ad5ef141ce5190d829f488a8ec0686ee0d6b18481cdb55deadbd2
7
- data.tar.gz: d79407e5d25930e3b5fe96785b9e953c293a3eb7825c288525b1a73252b151b09ab7976fd1360adf4c43fb3ad55eba2e237071720c6f9473f2efbcab512a59a1
6
+ metadata.gz: 1637788764095dff7192fa782f2dcb62d14155d7a739bf00af1c60ea58798221f550e034f2035dbf827a0695545a6f1467b3bbfa0a7e85fcae0142e4e24b644f
7
+ data.tar.gz: 20429c7f45dc8fc0d3383c20992b5e0185522d106916a32225c5411ba6edab3b49ac4df78dc2e8b4f024e3c588156aa37b3e51cfce03c2a6ff01268f1d90ad3b
@@ -0,0 +1,21 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ matrix:
14
+ ruby-version: ["2.6", "2.7", "3.0"]
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: ${{ matrix.ruby-version }}
20
+ bundler-cache: true
21
+ - run: bundle exec rake
data/.rubocop.yml CHANGED
@@ -1,7 +1,15 @@
1
- inherit_from:
2
- - https://gitlab.com/bsm/misc/raw/master/rubocop/default.yml
3
-
1
+ inherit_gem:
2
+ rubocop-bsm:
3
+ - default.yml
4
+ inherit_mode:
5
+ merge:
6
+ - Exclude
4
7
  AllCops:
5
- TargetRubyVersion: "2.5"
8
+ TargetRubyVersion: "2.6"
9
+
6
10
  Security/MarshalLoad:
7
11
  Enabled: false
12
+ RSpec/SubjectStub:
13
+ Enabled: false
14
+ RSpec/MessageSpies:
15
+ Enabled: false
data/Gemfile.lock CHANGED
@@ -1,68 +1,88 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- activesupport_cache_database (0.1.2)
4
+ activesupport_cache_database (0.2.0)
5
5
  activerecord (>= 5.0)
6
6
  activesupport (>= 5.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- activemodel (6.0.3.1)
12
- activesupport (= 6.0.3.1)
13
- activerecord (6.0.3.1)
14
- activemodel (= 6.0.3.1)
15
- activesupport (= 6.0.3.1)
16
- activesupport (6.0.3.1)
11
+ activemodel (6.1.3)
12
+ activesupport (= 6.1.3)
13
+ activerecord (6.1.3)
14
+ activemodel (= 6.1.3)
15
+ activesupport (= 6.1.3)
16
+ activesupport (6.1.3)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
- i18n (>= 0.7, < 2)
19
- minitest (~> 5.1)
20
- tzinfo (~> 1.1)
21
- zeitwerk (~> 2.2, >= 2.2.2)
22
- ast (2.4.0)
23
- concurrent-ruby (1.1.6)
24
- diff-lcs (1.3)
25
- i18n (1.8.2)
18
+ i18n (>= 1.6, < 2)
19
+ minitest (>= 5.1)
20
+ tzinfo (~> 2.0)
21
+ zeitwerk (~> 2.3)
22
+ ast (2.4.2)
23
+ concurrent-ruby (1.1.8)
24
+ diff-lcs (1.4.4)
25
+ i18n (1.8.9)
26
26
  concurrent-ruby (~> 1.0)
27
- minitest (5.14.1)
27
+ minitest (5.14.4)
28
28
  mysql2 (0.5.3)
29
- parallel (1.19.1)
30
- parser (2.7.1.3)
31
- ast (~> 2.4.0)
29
+ parallel (1.20.1)
30
+ parser (3.0.0.0)
31
+ ast (~> 2.4.1)
32
32
  pg (1.2.3)
33
+ rack (2.2.3)
33
34
  rainbow (3.0.0)
34
- rake (13.0.1)
35
+ rake (13.0.3)
36
+ regexp_parser (2.1.1)
35
37
  rexml (3.2.4)
36
- rspec (3.9.0)
37
- rspec-core (~> 3.9.0)
38
- rspec-expectations (~> 3.9.0)
39
- rspec-mocks (~> 3.9.0)
40
- rspec-core (3.9.2)
41
- rspec-support (~> 3.9.3)
42
- rspec-expectations (3.9.2)
38
+ rspec (3.10.0)
39
+ rspec-core (~> 3.10.0)
40
+ rspec-expectations (~> 3.10.0)
41
+ rspec-mocks (~> 3.10.0)
42
+ rspec-core (3.10.1)
43
+ rspec-support (~> 3.10.0)
44
+ rspec-expectations (3.10.1)
43
45
  diff-lcs (>= 1.2.0, < 2.0)
44
- rspec-support (~> 3.9.0)
45
- rspec-mocks (3.9.1)
46
+ rspec-support (~> 3.10.0)
47
+ rspec-mocks (3.10.2)
46
48
  diff-lcs (>= 1.2.0, < 2.0)
47
- rspec-support (~> 3.9.0)
48
- rspec-support (3.9.3)
49
- rubocop (0.84.0)
49
+ rspec-support (~> 3.10.0)
50
+ rspec-support (3.10.2)
51
+ rubocop (1.11.0)
50
52
  parallel (~> 1.10)
51
- parser (>= 2.7.0.1)
53
+ parser (>= 3.0.0.0)
52
54
  rainbow (>= 2.2.2, < 4.0)
55
+ regexp_parser (>= 1.8, < 3.0)
53
56
  rexml
54
- rubocop-ast (>= 0.0.3)
57
+ rubocop-ast (>= 1.2.0, < 2.0)
55
58
  ruby-progressbar (~> 1.7)
56
- unicode-display_width (>= 1.4.0, < 2.0)
57
- rubocop-ast (0.0.3)
58
- parser (>= 2.7.0.1)
59
- ruby-progressbar (1.10.1)
59
+ unicode-display_width (>= 1.4.0, < 3.0)
60
+ rubocop-ast (1.4.1)
61
+ parser (>= 2.7.1.5)
62
+ rubocop-bsm (0.5.4)
63
+ rubocop (~> 1.0)
64
+ rubocop-performance
65
+ rubocop-rails
66
+ rubocop-rake
67
+ rubocop-rspec
68
+ rubocop-performance (1.10.1)
69
+ rubocop (>= 0.90.0, < 2.0)
70
+ rubocop-ast (>= 0.4.0)
71
+ rubocop-rails (2.9.1)
72
+ activesupport (>= 4.2.0)
73
+ rack (>= 1.1)
74
+ rubocop (>= 0.90.0, < 2.0)
75
+ rubocop-rake (0.5.1)
76
+ rubocop
77
+ rubocop-rspec (2.2.0)
78
+ rubocop (~> 1.0)
79
+ rubocop-ast (>= 1.1.0)
80
+ ruby-progressbar (1.11.0)
60
81
  sqlite3 (1.4.2)
61
- thread_safe (0.3.6)
62
- tzinfo (1.2.7)
63
- thread_safe (~> 0.1)
64
- unicode-display_width (1.7.0)
65
- zeitwerk (2.3.0)
82
+ tzinfo (2.0.4)
83
+ concurrent-ruby (~> 1.0)
84
+ unicode-display_width (2.0.0)
85
+ zeitwerk (2.4.2)
66
86
 
67
87
  PLATFORMS
68
88
  ruby
@@ -74,7 +94,7 @@ DEPENDENCIES
74
94
  pg
75
95
  rake
76
96
  rspec
77
- rubocop
97
+ rubocop-bsm
78
98
  sqlite3
79
99
 
80
100
  BUNDLED WITH
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'activesupport_cache_database'
3
- s.version = '0.1.2'
3
+ s.version = '0.2.0'
4
4
  s.authors = ['Black Square Media Ltd']
5
5
  s.email = ['info@blacksquaremedia.com']
6
6
  s.summary = %(ActiveSupport::Cache::Store implementation backed by ActiveRecord.)
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
11
11
  s.files = `git ls-files -z`.split("\x0").reject {|f| f.match(%r{^spec/}) }
12
12
  s.test_files = `git ls-files -z -- spec/*`.split("\x0")
13
13
  s.require_paths = ['lib']
14
- s.required_ruby_version = '>= 2.5'
14
+ s.required_ruby_version = '>= 2.6'
15
15
 
16
16
  s.add_dependency 'activerecord', '>= 5.0'
17
17
  s.add_dependency 'activesupport', '>= 5.0'
@@ -21,6 +21,6 @@ Gem::Specification.new do |s|
21
21
  s.add_development_dependency 'pg'
22
22
  s.add_development_dependency 'rake'
23
23
  s.add_development_dependency 'rspec'
24
- s.add_development_dependency 'rubocop'
24
+ s.add_development_dependency 'rubocop-bsm'
25
25
  s.add_development_dependency 'sqlite3'
26
26
  end
@@ -5,56 +5,56 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
5
5
  described_class.new expires_in: 60
6
6
  end
7
7
 
8
- it 'should read and write strings' do
8
+ it 'reads and write strings' do
9
9
  expect(subject.write('foo', 'bar')).to be_truthy
10
10
  expect(subject.read('foo')).to eq('bar')
11
11
  end
12
12
 
13
- it 'should read and write hash' do
13
+ it 'reads and write hash' do
14
14
  expect(subject.write('foo', a: 'b')).to be_truthy
15
15
  expect(subject.read('foo')).to eq(a: 'b')
16
16
  end
17
17
 
18
- it 'should read and write integer' do
18
+ it 'reads and write integer' do
19
19
  expect(subject.write('foo', 1)).to be_truthy
20
20
  expect(subject.read('foo')).to eq(1)
21
21
  end
22
22
 
23
- it 'should read and write nil' do
23
+ it 'reads and write nil' do
24
24
  expect(subject.write('foo', nil)).to be_truthy
25
25
  expect(subject.read('foo')).to eq(nil)
26
26
  end
27
27
 
28
- it 'should read and write false' do
28
+ it 'reads and write false' do
29
29
  expect(subject.write('foo', false)).to be_truthy
30
30
  expect(subject.read('foo')).to eq(false)
31
31
  end
32
32
 
33
- it 'should overwrite' do
33
+ it 'overwrites' do
34
34
  expect(subject.write('foo', 'bar')).to be_truthy
35
35
  expect(subject.write('foo', 'baz')).to be_truthy
36
36
  expect(subject.read('foo')).to eq('baz')
37
37
  end
38
38
 
39
- it 'should support exist?' do
39
+ it 'supports exist?' do
40
40
  subject.write('foo', 'bar')
41
- expect(subject.exist?('foo')).to be_truthy
42
- expect(subject.exist?('bar')).to be_falsey
41
+ expect(subject).to exist('foo')
42
+ expect(subject).not_to exist('bar')
43
43
  end
44
44
 
45
- it 'should support nil exist?' do
45
+ it 'supports nil exist?' do
46
46
  subject.write('foo', nil)
47
- expect(subject.exist?('foo')).to be_truthy
47
+ expect(subject).to exist('foo')
48
48
  end
49
49
 
50
- it 'should support delete' do
50
+ it 'supports delete' do
51
51
  subject.write('foo', 'bar')
52
- expect(subject.exist?('foo')).to be_truthy
52
+ expect(subject).to exist('foo')
53
53
  expect(subject.delete('foo')).to be_truthy
54
- expect(subject.exist?('foo')).to be_falsey
54
+ expect(subject).not_to exist('foo')
55
55
  end
56
56
 
57
- it 'should support expires_in' do
57
+ it 'supports expires_in' do
58
58
  time = Time.local(2008, 4, 24)
59
59
  allow(Time).to receive(:now).and_return(time)
60
60
 
@@ -68,7 +68,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
68
68
  expect(subject.read('foo')).to be_nil
69
69
  end
70
70
 
71
- it 'should support long keys' do
71
+ it 'supports long keys' do
72
72
  key = 'x' * 255
73
73
  expect(subject.write(key, 'bar')).to be_truthy
74
74
  expect(subject.read(key)).to eq('bar')
@@ -82,7 +82,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
82
82
  end
83
83
 
84
84
  describe '#cleanup' do
85
- it 'should delete expired' do
85
+ it 'deletes expired' do
86
86
  time = Time.now
87
87
  subject.write('foo', 'bar', expires_in: 10)
88
88
  subject.write('fud', 'biz', expires_in: 20)
@@ -96,7 +96,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
96
96
  expect(subject.read('fud')).to eq('biz')
97
97
  end
98
98
 
99
- it 'should support namespace' do
99
+ it 'supports namespace' do
100
100
  time = Time.now
101
101
  subject.write('foo', 'bar', expires_in: 10, namespace: 'x')
102
102
  subject.write('foo', 'biz', expires_in: 10, namespace: 'y')
@@ -112,7 +112,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
112
112
  end
113
113
 
114
114
  describe '#clear' do
115
- it 'should remove all entries' do
115
+ it 'removes all entries' do
116
116
  subject.write('foo', 'bar')
117
117
  subject.write('fud', 'biz')
118
118
  expect(subject.clear).to be_truthy
@@ -120,7 +120,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
120
120
  expect(subject.read('fud')).to be_nil
121
121
  end
122
122
 
123
- it 'should support namespace' do
123
+ it 'supports namespace' do
124
124
  subject.write('foo', 'bar', namespace: 'x')
125
125
  subject.write('foo', 'biz', namespace: 'y')
126
126
  expect(subject.count).to eq(2)
@@ -131,19 +131,19 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
131
131
  end
132
132
 
133
133
  describe '#fetch' do
134
- it 'should support cache hit' do
134
+ it 'supports cache hit' do
135
135
  subject.write('foo', 'bar')
136
136
  expect(subject).not_to receive(:write)
137
137
 
138
138
  expect(subject.fetch('foo') { 'baz' }).to eq('bar')
139
139
  end
140
140
 
141
- it 'should support cache miss' do
141
+ it 'supports cache miss' do
142
142
  expect(subject).to receive(:write).with('foo', 'baz', instance_of(Hash))
143
143
  expect(subject.fetch('foo') { 'baz' }).to eq('baz')
144
144
  end
145
145
 
146
- it 'should pass key to block on cache miss' do
146
+ it 'passes key to block on cache miss' do
147
147
  cache_miss = false
148
148
  expect(subject.fetch('foo') {|key| cache_miss = true; key.length }).to eq(3)
149
149
  expect(cache_miss).to be_truthy
@@ -153,32 +153,32 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
153
153
  expect(cache_miss).to be_falsey
154
154
  end
155
155
 
156
- it 'should support forced cache miss' do
156
+ it 'supports forced cache miss' do
157
157
  subject.write('foo', 'bar')
158
158
  expect(subject).not_to receive(:read)
159
159
 
160
160
  expect(subject.fetch('foo', force: true) { 'baz' }).to eq('baz')
161
161
  end
162
162
 
163
- it 'should support nil values' do
163
+ it 'supports nil values' do
164
164
  subject.write('foo', nil)
165
165
  expect(subject).not_to receive(:write)
166
166
 
167
167
  expect(subject.fetch('foo') { 'baz' }).to be_nil
168
168
  end
169
169
 
170
- it 'should support skip_nil option' do
170
+ it 'supports skip_nil option' do
171
171
  expect(subject).not_to receive(:write)
172
172
  expect(subject.fetch('foo', skip_nil: true) { nil }).to be_nil
173
- expect(subject.exist?('foo')).to be_falsey
173
+ expect(subject).not_to exist('foo')
174
174
  end
175
175
 
176
- it 'should support forced cache miss with block' do
176
+ it 'supports forced cache miss with block' do
177
177
  subject.write('foo', 'bar')
178
178
  expect(subject.fetch('foo', force: true) { 'baz' }).to eq('baz')
179
179
  end
180
180
 
181
- it 'should support forced cache miss without block' do
181
+ it 'supports forced cache miss without block' do
182
182
  subject.write('foo', 'bar')
183
183
  expect { subject.fetch('foo', force: true) }.to raise_error(ArgumentError)
184
184
  expect(subject.read('foo')).to eq('bar')
@@ -186,14 +186,14 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
186
186
  end
187
187
 
188
188
  describe '#read_multi' do
189
- it 'should support read_multi' do
189
+ it 'supports read_multi' do
190
190
  subject.write('foo', 'bar')
191
191
  subject.write('fu', 'baz')
192
192
  subject.write('fud', 'biz')
193
193
  expect(subject.read_multi('foo', 'fu')).to eq('foo' => 'bar', 'fu' => 'baz')
194
194
  end
195
195
 
196
- it 'should support expires' do
196
+ it 'supports expires' do
197
197
  time = Time.now
198
198
  subject.write('foo', 'bar', expires_in: 10)
199
199
  subject.write('fu', 'baz')
@@ -205,7 +205,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
205
205
  end
206
206
 
207
207
  describe '#fetch_multi' do
208
- it 'should support fetch_multi' do
208
+ it 'supports fetch_multi' do
209
209
  subject.write('foo', 'bar')
210
210
  subject.write('fud', 'biz')
211
211
  values = subject.fetch_multi('foo', 'fu', 'fud') {|v| v * 2 }
@@ -214,7 +214,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
214
214
  expect(subject.read('fu')).to eq('fufu')
215
215
  end
216
216
 
217
- it 'should support without expires_in' do
217
+ it 'supports without expires_in' do
218
218
  subject.write('foo', 'bar')
219
219
  subject.write('fud', 'biz')
220
220
  values = subject.fetch_multi('foo', 'fu', 'fud', expires_in: nil) {|v| v * 2 }
@@ -223,7 +223,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
223
223
  expect(subject.read('fu')).to eq('fufu')
224
224
  end
225
225
 
226
- it 'should support with objects' do
226
+ it 'supports with objects' do
227
227
  cache_struct = Struct.new(:cache_key, :title)
228
228
  foo = cache_struct.new('foo', 'FOO!')
229
229
  bar = cache_struct.new('bar')
@@ -233,19 +233,19 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
233
233
  expect(values).to eq(foo => 'FOO!', bar => 'BAM!')
234
234
  end
235
235
 
236
- it 'should support ordered names' do
236
+ it 'supports ordered names' do
237
237
  subject.write('bam', 'BAM')
238
238
  values = subject.fetch_multi('foo', 'bar', 'bam', &:upcase)
239
239
  expect(values.keys).to eq(%w[foo bar bam])
240
240
  end
241
241
 
242
- it 'should raise without block' do
242
+ it 'raises without block' do
243
243
  expect { subject.fetch_multi('foo') }.to raise_error(ArgumentError)
244
244
  end
245
245
  end
246
246
 
247
247
  describe 'cache key' do
248
- it 'should support cache keys' do
248
+ it 'supports cache keys' do
249
249
  obj = Object.new
250
250
  def obj.cache_key
251
251
  :foo
@@ -254,16 +254,17 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
254
254
  expect(subject.read('foo')).to eq('bar')
255
255
  end
256
256
 
257
- it 'should support to_param keys' do
258
- obj = Object.new
259
- def obj.to_param
260
- :foo
261
- end
257
+ it 'supports to_param keys' do
258
+ obj = Class.new do
259
+ def to_param
260
+ 'foo'
261
+ end
262
+ end.new
262
263
  subject.write(obj, 'bar')
263
264
  expect(subject.read('foo')).to eq('bar')
264
265
  end
265
266
 
266
- it 'should support unversioned keys' do
267
+ it 'supports unversioned keys' do
267
268
  obj = Object.new
268
269
  def obj.cache_key
269
270
  :foo
@@ -276,42 +277,42 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
276
277
  expect(subject.read('foo')).to eq('bar')
277
278
  end
278
279
 
279
- it 'should support array keys' do
280
+ it 'supports array keys' do
280
281
  subject.write([:fu, 'foo'], 'bar')
281
282
  expect(subject.read('fu/foo')).to eq('bar')
282
283
  end
283
284
 
284
- it 'should support hash keys' do
285
+ it 'supports hash keys' do
285
286
  subject.write({ foo: 1, fu: 2 }, 'bar')
286
287
  expect(subject.read('foo=1/fu=2')).to eq('bar')
287
288
  end
288
289
 
289
- it 'should be case sensitive' do
290
+ it 'is case sensitive' do
290
291
  subject.write('foo', 'bar')
291
292
  expect(subject.read('FOO')).to be_nil
292
293
  end
293
294
  end
294
295
 
295
296
  describe 'with version' do
296
- it 'should support fetch/read' do
297
+ it 'supports fetch/read' do
297
298
  subject.fetch('foo', version: 1) { 'bar' }
298
299
  expect(subject.read('foo', version: 1)).to eq('bar')
299
300
  expect(subject.read('foo', version: 2)).to be_nil
300
301
  end
301
302
 
302
- it 'should support write/read' do
303
+ it 'supports write/read' do
303
304
  subject.write('foo', 'bar', version: 1)
304
305
  expect(subject.read('foo', version: 1)).to eq('bar')
305
306
  expect(subject.read('foo', version: 2)).to be_nil
306
307
  end
307
308
 
308
- it 'should support exists' do
309
+ it 'supports exists' do
309
310
  subject.write('foo', 'bar', version: 1)
310
- expect(subject.exist?('foo', version: 1)).to be_truthy
311
- expect(subject.exist?('foo', version: 2)).to be_falsey
311
+ expect(subject).to exist('foo', version: 1)
312
+ expect(subject).not_to exist('foo', version: 2)
312
313
  end
313
314
 
314
- it 'should cache/version keys' do
315
+ it 'cache/versions keys' do
315
316
  m1v1 = ModelWithKeyAndVersion.new('model/1', 1)
316
317
  m1v2 = ModelWithKeyAndVersion.new('model/1', 2)
317
318
 
@@ -320,7 +321,7 @@ RSpec.describe ActiveSupport::Cache::DatabaseStore do
320
321
  expect(subject.read(m1v2)).to be_nil
321
322
  end
322
323
 
323
- it 'should normalise' do
324
+ it 'normalises' do
324
325
  subject.write('foo', 'bar', version: 1)
325
326
  expect(subject.read('foo', version: '1')).to eq('bar')
326
327
  end
data/spec/spec_helper.rb CHANGED
@@ -22,7 +22,7 @@ ActiveRecord::Migration.suppress_messages do
22
22
  end
23
23
 
24
24
  RSpec.configure do |c|
25
- c.after :each do
25
+ c.after do
26
26
  ActiveSupport::Cache::DatabaseStore::Model.truncate!
27
27
  end
28
28
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activesupport_cache_database
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Black Square Media Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-27 00:00:00.000000000 Z
11
+ date: 2021-03-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rubocop
112
+ name: rubocop-bsm
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -144,9 +144,9 @@ extensions: []
144
144
  extra_rdoc_files: []
145
145
  files:
146
146
  - ".editorconfig"
147
+ - ".github/workflows/ruby.yml"
147
148
  - ".gitignore"
148
149
  - ".rubocop.yml"
149
- - ".travis.yml"
150
150
  - Gemfile
151
151
  - Gemfile.lock
152
152
  - LICENSE
@@ -171,14 +171,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - ">="
173
173
  - !ruby/object:Gem::Version
174
- version: '2.5'
174
+ version: '2.6'
175
175
  required_rubygems_version: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
179
  version: '0'
180
180
  requirements: []
181
- rubygems_version: 3.1.2
181
+ rubygems_version: 3.1.4
182
182
  signing_key:
183
183
  specification_version: 4
184
184
  summary: ActiveSupport::Cache::Store implementation backed by ActiveRecord.
data/.travis.yml DELETED
@@ -1,15 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.6
4
- - 2.5
5
- before_install:
6
- - gem install bundler
7
- - mysql -e 'CREATE DATABASE ci_test;'
8
- - psql -c 'CREATE DATABASE ci_test;' -U postgres
9
- services:
10
- - postgresql
11
- - mysql
12
- env:
13
- - DATABASE_URL=sqlite3:///tmp/ci_test.sqlite3
14
- - DATABASE_URL=mysql2://travis@127.0.0.1/ci_test
15
- - DATABASE_URL=postgresql://127.0.0.1/ci_test