modis 3.3.0 → 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +10 -10
- data/CHANGELOG.md +8 -0
- data/Gemfile.lock +11 -11
- data/README.md +16 -8
- data/gemfiles/{rails_4.2.gemfile → rails_6.1.gemfile} +2 -2
- data/lib/modis.rb +1 -1
- data/lib/modis/version.rb +1 -1
- data/modis.gemspec +3 -3
- metadata +22 -24
- data/gemfiles/rails_5.0.gemfile +0 -8
- data/gemfiles/rails_5.1.gemfile +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62a6abe9671e399409e452a290c360fcd0aadfbdceccca9aa364d6f232b2df49
|
4
|
+
data.tar.gz: d8468a3f54bf0587f8d89ff2b353a5c48ea0798a4c067bd291ef5ed471448a01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a382d676431ed8bd7fd79dde5dbff275c19687b42ce9de52980ce35898ea91eb447a1a7349b8f09bc56606841e7f6cada8f882bc23f5eb8d9f5483b109805d61
|
7
|
+
data.tar.gz: 499687970a4a33a573e16ea8f1b70749e85d2650b2092a37ce26cdd9452cc6c3a3c539e9e59dcfa9d5db0ed2d9ccf19c961122e22d0e8dfd3e41afda080c925d
|
data/.travis.yml
CHANGED
@@ -13,29 +13,29 @@ rvm:
|
|
13
13
|
- 2.5
|
14
14
|
- 2.6
|
15
15
|
- 2.7
|
16
|
-
-
|
17
|
-
- jruby-9.2.
|
16
|
+
- 3.0
|
17
|
+
- jruby-9.2.17.0
|
18
18
|
|
19
19
|
gemfile:
|
20
|
-
- gemfiles/rails_4.2.gemfile
|
21
|
-
- gemfiles/rails_5.0.gemfile
|
22
|
-
- gemfiles/rails_5.1.gemfile
|
23
20
|
- gemfiles/rails_5.2.gemfile
|
24
21
|
- gemfiles/rails_6.0.gemfile
|
22
|
+
- gemfiles/rails_6.1.gemfile
|
25
23
|
|
26
24
|
matrix:
|
27
25
|
fast_finish: true
|
28
26
|
exclude:
|
29
|
-
# Rails 4.2 uses BigDecimal.new which was removed in Ruby 2.7
|
30
|
-
- gemfile: gemfiles/rails_4.2.gemfile
|
31
|
-
rvm: 2.7
|
32
27
|
# Rails 6 requires Ruby 2.5 or higher
|
33
28
|
- gemfile: gemfiles/rails_6.0.gemfile
|
34
29
|
rvm: 2.3
|
30
|
+
- gemfile: gemfiles/rails_6.1.gemfile
|
31
|
+
rvm: 2.3
|
35
32
|
- gemfile: gemfiles/rails_6.0.gemfile
|
36
33
|
rvm: 2.4
|
37
|
-
- gemfile: gemfiles/rails_6.
|
38
|
-
rvm:
|
34
|
+
- gemfile: gemfiles/rails_6.1.gemfile
|
35
|
+
rvm: 2.4
|
36
|
+
# Rails 5.2 isn't compatible with Ruby 3.0 or higher
|
37
|
+
- gemfile: gemfiles/rails_5.2.gemfile
|
38
|
+
rvm: 3.0
|
39
39
|
|
40
40
|
env:
|
41
41
|
global:
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,13 @@
|
|
1
1
|
## Unreleased
|
2
2
|
|
3
|
+
## v4.0.0 - 2021-04-28
|
4
|
+
|
5
|
+
**Breaking:**
|
6
|
+
|
7
|
+
- Drop support for Rails 4.2, 5.0, 5.1.
|
8
|
+
- Removed `hiredis` as a dependency and made it a development dependency.
|
9
|
+
For details, see [#31](https://github.com/rpush/modis/pull/31) by [@fdoxyz](https://github.com/fdoxyz).
|
10
|
+
|
3
11
|
## v3.3.0 - 2020-07-07
|
4
12
|
|
5
13
|
- Fix deprecation warnings when using Ruby >= 2.7, `activemodel` >= 6.0.3, or `redis` >= 4.2.0. [#30](https://github.com/rpush/modis/pull/30) by [@rofreg](https://github.com/rofreg).
|
data/Gemfile.lock
CHANGED
@@ -1,20 +1,19 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
modis (
|
5
|
-
activemodel (>=
|
6
|
-
activesupport (>=
|
4
|
+
modis (4.0.0)
|
5
|
+
activemodel (>= 5.2)
|
6
|
+
activesupport (>= 5.2)
|
7
7
|
connection_pool (>= 2)
|
8
|
-
hiredis (>= 0.5)
|
9
8
|
msgpack (>= 0.5)
|
10
9
|
redis (>= 3.0)
|
11
10
|
|
12
11
|
GEM
|
13
12
|
remote: https://rubygems.org/
|
14
13
|
specs:
|
15
|
-
activemodel (6.0.3.
|
16
|
-
activesupport (= 6.0.3.
|
17
|
-
activesupport (6.0.3.
|
14
|
+
activemodel (6.0.3.4)
|
15
|
+
activesupport (= 6.0.3.4)
|
16
|
+
activesupport (6.0.3.4)
|
18
17
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
19
18
|
i18n (>= 0.7, < 2)
|
20
19
|
minitest (~> 5.1)
|
@@ -29,15 +28,15 @@ GEM
|
|
29
28
|
parallel
|
30
29
|
codeclimate-test-reporter (1.0.7)
|
31
30
|
simplecov
|
32
|
-
concurrent-ruby (1.1.
|
31
|
+
concurrent-ruby (1.1.7)
|
33
32
|
connection_pool (2.2.3)
|
34
33
|
diff-lcs (1.4.4)
|
35
34
|
docile (1.3.2)
|
36
35
|
hiredis (0.6.3)
|
37
|
-
i18n (1.8.
|
36
|
+
i18n (1.8.5)
|
38
37
|
concurrent-ruby (~> 1.0)
|
39
38
|
jaro_winkler (1.5.4)
|
40
|
-
minitest (5.14.
|
39
|
+
minitest (5.14.2)
|
41
40
|
msgpack (1.3.3)
|
42
41
|
parallel (1.19.2)
|
43
42
|
parser (2.7.1.4)
|
@@ -77,7 +76,7 @@ GEM
|
|
77
76
|
tzinfo (1.2.7)
|
78
77
|
thread_safe (~> 0.1)
|
79
78
|
unicode-display_width (1.4.1)
|
80
|
-
zeitwerk (2.
|
79
|
+
zeitwerk (2.4.0)
|
81
80
|
|
82
81
|
PLATFORMS
|
83
82
|
ruby
|
@@ -86,6 +85,7 @@ DEPENDENCIES
|
|
86
85
|
appraisal
|
87
86
|
cane
|
88
87
|
codeclimate-test-reporter
|
88
|
+
hiredis (>= 0.5)
|
89
89
|
modis!
|
90
90
|
rake
|
91
91
|
rspec
|
data/README.md
CHANGED
@@ -8,21 +8,29 @@ ActiveModel + Redis with the aim to mimic ActiveRecord where possible.
|
|
8
8
|
|
9
9
|
## Requirements
|
10
10
|
|
11
|
-
Modis supports
|
11
|
+
Modis 4.0+ supports Rails 5.2 and higher, including Rails 6.1, as well as Ruby 2.3 and above, including Ruby 3.0. Tests are also being run with JRuby. For details please check the current CI setup.
|
12
|
+
|
13
|
+
For releases supporting older Rails versions such as 4.2-5.1 please check out the 3.x releases.
|
12
14
|
|
13
15
|
## Installation
|
14
16
|
|
15
17
|
Add this line to your application's Gemfile:
|
16
18
|
|
17
|
-
|
19
|
+
```ruby
|
20
|
+
gem 'modis'
|
21
|
+
```
|
18
22
|
|
19
23
|
And then execute:
|
20
24
|
|
21
|
-
|
25
|
+
```console
|
26
|
+
$ bundle
|
27
|
+
```
|
22
28
|
|
23
29
|
Or install it yourself as:
|
24
30
|
|
25
|
-
|
31
|
+
```console
|
32
|
+
$ gem install modis
|
33
|
+
```
|
26
34
|
|
27
35
|
## Usage
|
28
36
|
|
@@ -41,10 +49,10 @@ MyModel.create!(name: 'Ian', age: 28)
|
|
41
49
|
Modis, by default, creates an `all` index in redis in which it stores all the IDs for records created. As a result, a large amount of memory will be consumed if many ids are stored. The `all` index functionality can be turned off by using `enable_all_index`
|
42
50
|
|
43
51
|
```ruby
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
52
|
+
class MyModel
|
53
|
+
include Modis::Model
|
54
|
+
enable_all_index false
|
55
|
+
end
|
48
56
|
```
|
49
57
|
|
50
58
|
By disabling the `all` index functionality, the IDs of each record created won't be saved. As a side effect, using `all` finder method will raise a `IndexError` exception as we would not have enough information to fetch all records. See https://github.com/rpush/modis/pull/7 for more context.
|
data/lib/modis.rb
CHANGED
data/lib/modis/version.rb
CHANGED
data/modis.gemspec
CHANGED
@@ -20,10 +20,9 @@ Gem::Specification.new do |gem|
|
|
20
20
|
|
21
21
|
gem.required_ruby_version = ">= 2.3.0"
|
22
22
|
|
23
|
-
gem.add_runtime_dependency 'activemodel', '>=
|
24
|
-
gem.add_runtime_dependency 'activesupport', '>=
|
23
|
+
gem.add_runtime_dependency 'activemodel', '>= 5.2'
|
24
|
+
gem.add_runtime_dependency 'activesupport', '>= 5.2'
|
25
25
|
gem.add_runtime_dependency 'redis', '>= 3.0'
|
26
|
-
gem.add_runtime_dependency 'hiredis', '>= 0.5'
|
27
26
|
gem.add_runtime_dependency 'connection_pool', '>= 2'
|
28
27
|
|
29
28
|
if defined? JRUBY_VERSION
|
@@ -40,4 +39,5 @@ Gem::Specification.new do |gem|
|
|
40
39
|
gem.add_development_dependency 'cane'
|
41
40
|
gem.add_development_dependency 'rubocop', '0.61.1'
|
42
41
|
gem.add_development_dependency 'simplecov'
|
42
|
+
gem.add_development_dependency 'hiredis', '>= 0.5'
|
43
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 4.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ian Leitch
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '5.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '5.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: activesupport
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '5.2'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '5.2'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: redis
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,20 +52,6 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
|
-
- !ruby/object:Gem::Dependency
|
56
|
-
name: hiredis
|
57
|
-
requirement: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - ">="
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0.5'
|
62
|
-
type: :runtime
|
63
|
-
prerelease: false
|
64
|
-
version_requirements: !ruby/object:Gem::Requirement
|
65
|
-
requirements:
|
66
|
-
- - ">="
|
67
|
-
- !ruby/object:Gem::Version
|
68
|
-
version: '0.5'
|
69
55
|
- !ruby/object:Gem::Dependency
|
70
56
|
name: connection_pool
|
71
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,6 +178,20 @@ dependencies:
|
|
192
178
|
- - ">="
|
193
179
|
- !ruby/object:Gem::Version
|
194
180
|
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: hiredis
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0.5'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0.5'
|
195
195
|
description: ActiveModel + Redis
|
196
196
|
email:
|
197
197
|
- port001@gmail.com
|
@@ -214,11 +214,9 @@ files:
|
|
214
214
|
- benchmark/find.rb
|
215
215
|
- benchmark/persistence.rb
|
216
216
|
- benchmark/redis/connection/fakedis.rb
|
217
|
-
- gemfiles/rails_4.2.gemfile
|
218
|
-
- gemfiles/rails_5.0.gemfile
|
219
|
-
- gemfiles/rails_5.1.gemfile
|
220
217
|
- gemfiles/rails_5.2.gemfile
|
221
218
|
- gemfiles/rails_6.0.gemfile
|
219
|
+
- gemfiles/rails_6.1.gemfile
|
222
220
|
- lib/modis.rb
|
223
221
|
- lib/modis/attribute.rb
|
224
222
|
- lib/modis/configuration.rb
|
@@ -260,7 +258,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
260
258
|
- !ruby/object:Gem::Version
|
261
259
|
version: '0'
|
262
260
|
requirements: []
|
263
|
-
rubygems_version: 3.1.
|
261
|
+
rubygems_version: 3.1.4
|
264
262
|
signing_key:
|
265
263
|
specification_version: 4
|
266
264
|
summary: ActiveModel + Redis
|
data/gemfiles/rails_5.0.gemfile
DELETED