second_level_cache 2.6.2 → 2.6.3

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: 84fecc39005beffa957b1602ff86ace6ca5419a1215d35011034ac6c78b5e0bf
4
- data.tar.gz: f0a09a62d06ef9f10a1ee4559a4aac1b8e39eaa8a86ee81ce90d67212c9c1811
3
+ metadata.gz: 1f5d055fea10f55860339d904a65bb84a51893f742d20758311e0b2c2b690727
4
+ data.tar.gz: eeba8b526efb808158e440e10bf752dbf3bc51e5f4d88878f859cf8f3b790647
5
5
  SHA512:
6
- metadata.gz: 40c406b9b4181c5e1085127bbab26b71c5a47842d685521b9fa1ec43e58e529d8591c24ae675760ed2a3dcc9644dca7fcb6db12a5e651b67670af413c16addcc
7
- data.tar.gz: fc5f6ee2184884f4580123550e3d3edbb113114de4f7dacad340ef8c37711e9388335fdf029a06971fefe6a666ae0ca615f2852101384f986750333c3f85b0de
6
+ metadata.gz: 63ad5288284a4a06735175fb6171962ecde65ad08ffe9cbc112ce060e98c236150acc0b29947536fe06891144929de2ba8e744099a1c31865dccab9c2f9492c9
7
+ data.tar.gz: 559d3cde7763d4bd2645a9f416f66bdb54e74e5335004529c88f56bdfc6a3c934a6f7d5ee86aa5377405c12ad09d813ba2cf4313d43704daacd4480e9d25c782
@@ -13,7 +13,7 @@ require "second_level_cache/active_record/preloader"
13
13
  # http://api.rubyonrails.org/classes/ActiveSupport/LazyLoadHooks.html
14
14
  # ActiveSupport.run_load_hooks(:active_record, ActiveRecord::Base)
15
15
  ActiveSupport.on_load(:active_record, run_once: true) do
16
- if (Bundler.definition.gem("paranoia") rescue false)
16
+ if Bundler.definition.dependencies.find { |x| x.name == "paranoia" }
17
17
  require "second_level_cache/adapter/paranoia"
18
18
  include SecondLevelCache::Adapter::Paranoia::ActiveRecord
19
19
  SecondLevelCache::Mixin.send(:prepend, SecondLevelCache::Adapter::Paranoia::Mixin)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SecondLevelCache
4
- VERSION = "2.6.2"
4
+ VERSION = "2.6.3"
5
5
  end
@@ -4,10 +4,12 @@ require "test_helper"
4
4
 
5
5
  class ParanoidTest < ActiveSupport::TestCase
6
6
  def setup
7
+ skip unless defined?(Paranoi)
7
8
  @paranoid = Paranoid.create
8
9
  end
9
10
 
10
11
  def test_should_expire_cache_when_destroy
12
+ skip unless defined(Paranoi)
11
13
  @paranoid.destroy
12
14
  assert_nil Paranoid.find_by(id: @paranoid.id)
13
15
  assert_nil SecondLevelCache.cache_store.read(@paranoid.second_level_cache_key)
@@ -6,7 +6,6 @@ require "active_support/test_case"
6
6
  require "active_record_test_case_helper"
7
7
  require "database_cleaner"
8
8
  require "active_record"
9
- require "paranoia"
10
9
  require "pry"
11
10
  ActiveSupport.test_order = :sorted if ActiveSupport.respond_to?(:test_order=)
12
11
  # Force hook :active_record on_load event to make sure loader can work.
@@ -27,7 +26,7 @@ require "model/order_item"
27
26
  require "model/account"
28
27
  require "model/animal"
29
28
  require "model/contribution"
30
- require "model/paranoid"
29
+ require "model/paranoid" if defined?(Paranoid)
31
30
 
32
31
  DatabaseCleaner[:active_record].strategy = :truncation
33
32
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: second_level_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2
4
+ version: 2.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hooopo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-02 00:00:00.000000000 Z
11
+ date: 2020-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord