query_cache 1.0.0 → 1.1.1

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
  SHA1:
3
- metadata.gz: e1e5b1903b5542d23d26ff31bb5d0da3f14f3d95
4
- data.tar.gz: c10ed3ec9683c1596e8bb3cc303bea48057fc564
3
+ metadata.gz: 332b824ea25f9644ccd2d442eab4185e1b898c34
4
+ data.tar.gz: d5186809af202bd6b28133cef6d01ec97993bc1e
5
5
  SHA512:
6
- metadata.gz: 67d087d05aef2de3339aebb057956f3cfb4e0ca2b24978cc34b3846bffd688f729efa3c8202e67a8006b69bc4013598805bbe62691e7385eb4a436bbec046dae
7
- data.tar.gz: 7d07ac2373e203ab7bb6d59e11b5d4945514c5194632a82a299fdc51f678667fe80c5b0f6b67548c4b18a4b3c0e1faea9a2aa398c09b4e9672219474c6c347f6
6
+ metadata.gz: f244d2889fe415176bbb3f37a50d65bf27c6faf29ed5ab3f7815de2f8421c1cbba396db9a2b748533052114f5cccfee46c0c238ddbf4384f4f03eee1a6b8f2e3
7
+ data.tar.gz: 324796fd4ce77cdb423e9891a63ccf1daee001e1b2d22356b5972a758a40ff678081b88b7fc6cac72b74c3aeb26e2d39d2dc0ae933b27ed57e09b346b1efe2e0
@@ -10,7 +10,9 @@ require "rack/body_proxy"
10
10
  # https://github.com/rails/rails/blob/4-2-stable/activerecord/lib/active_record/query_cache.rb
11
11
  module QueryCache
12
12
  class Middleware
13
- cattr_accessor :base
13
+ class << self
14
+ attr_accessor :base
15
+ end
14
16
 
15
17
  def initialize(app)
16
18
  @app = app
@@ -32,8 +34,16 @@ module QueryCache
32
34
  restore_query_cache_settings(connection_id, enabled)
33
35
  end
34
36
 
37
+ def self.to_s
38
+ base ? "#{superclass.name}<#{base.name}>" : name
39
+ end
40
+
35
41
  private
36
42
 
43
+ def base
44
+ self.class.base
45
+ end
46
+
37
47
  def restore_query_cache_settings(connection_id, enabled)
38
48
  base.connection_id = connection_id
39
49
  base.connection.clear_query_cache
@@ -1,3 +1,3 @@
1
1
  module QueryCache
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: query_cache
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Haagen Michaelsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-13 00:00:00.000000000 Z
11
+ date: 2015-11-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -123,9 +123,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  version: '0'
124
124
  requirements: []
125
125
  rubyforge_project:
126
- rubygems_version: 2.4.8
126
+ rubygems_version: 2.4.5.1
127
127
  signing_key:
128
128
  specification_version: 4
129
129
  summary: Query cache middleware for custom ActiveRecord base classes.
130
130
  test_files: []
131
- has_rdoc: