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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a3bc55800857e6cd1042d6ae44ba41f53470bf1d73aaa9d3f7b32c3e2590615
4
- data.tar.gz: 9697070b178e1b337eb136edfd54b1c45ffd239858d5f34fe8a02fe42b3e4632
3
+ metadata.gz: 62a6abe9671e399409e452a290c360fcd0aadfbdceccca9aa364d6f232b2df49
4
+ data.tar.gz: d8468a3f54bf0587f8d89ff2b353a5c48ea0798a4c067bd291ef5ed471448a01
5
5
  SHA512:
6
- metadata.gz: bbc0e35df71570b4dd3d4049865537d24d3b10c10dfd0914b481f5add04ced5e663764720bebf63fad7a29e11227aea9ba4a75c27bcec9061ce5a3f496f33fda
7
- data.tar.gz: d5bb456a24915dd363c0ecb3af827907b4962fa39f45d9fdd8b72aa36bfc090b921272243379786b444462a3c2dd3f6b516da038d3f2ec2ac812b1f21331fd0f
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
- - jruby-9.1.17.0
17
- - jruby-9.2.8.0
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.0.gemfile
38
- rvm: jruby-9.1.17.0
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 (3.3.0)
5
- activemodel (>= 4.2)
6
- activesupport (>= 4.2)
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.2)
16
- activesupport (= 6.0.3.2)
17
- activesupport (6.0.3.2)
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.6)
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.3)
36
+ i18n (1.8.5)
38
37
  concurrent-ruby (~> 1.0)
39
38
  jaro_winkler (1.5.4)
40
- minitest (5.14.1)
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.3.1)
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 any actively supported Ruby and Ruby on Rails versions. As of 2018-12-20, that means CRuby 2.3+ and jRuby 9k+, as well as Rails 4.2+.
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
- gem 'modis'
19
+ ```ruby
20
+ gem 'modis'
21
+ ```
18
22
 
19
23
  And then execute:
20
24
 
21
- $ bundle
25
+ ```console
26
+ $ bundle
27
+ ```
22
28
 
23
29
  Or install it yourself as:
24
30
 
25
- $ gem install modis
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
- class MyModel
45
- include Modis::Model
46
- enable_all_index false
47
- end
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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  source "https://rubygems.org"
4
4
 
5
- gem "activemodel", "~> 4.2.0"
6
- gem "activesupport", "~> 4.2.0"
5
+ gem "activemodel", "~> 6.1.0"
6
+ gem "activesupport", "~> 6.1.0"
7
7
 
8
8
  gemspec path: "../"
data/lib/modis.rb CHANGED
@@ -24,7 +24,7 @@ module Modis
24
24
  :connection_pool
25
25
 
26
26
  def redis_options
27
- @redis_options ||= { driver: :hiredis }
27
+ @redis_options ||= {}
28
28
  end
29
29
 
30
30
  def connection_pool_size
data/lib/modis/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Modis
4
- VERSION = '3.3.0'
4
+ VERSION = '4.0.0'
5
5
  end
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', '>= 4.2'
24
- gem.add_runtime_dependency 'activesupport', '>= 4.2'
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: 3.3.0
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: 2020-07-07 00:00:00.000000000 Z
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: '4.2'
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: '4.2'
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: '4.2'
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: '4.2'
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.3
261
+ rubygems_version: 3.1.4
264
262
  signing_key:
265
263
  specification_version: 4
266
264
  summary: ActiveModel + Redis
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activemodel", "~> 5.0.0"
6
- gem "activesupport", "~> 5.0.0"
7
-
8
- gemspec path: "../"
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "activemodel", "~> 5.1.0"
6
- gem "activesupport", "~> 5.1.0"
7
-
8
- gemspec path: "../"