sqlcached_client 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c52edd2d96831a9e05941a287443c347dca26549
4
- data.tar.gz: 7894d5099b83c363f9f462f8cf1ce6b5cfb9d3ec
3
+ metadata.gz: 617bf2f0a982f3e3b6be96fabc5c2ca7feac50b2
4
+ data.tar.gz: 38677e6698d8c877960b1b439cd1f361a8b4cb27
5
5
  SHA512:
6
- metadata.gz: 712a6ea0b897d0458db5c70bed329e2a03bf37469341fb9bc9bb3fc4c7f7fcd2b0c49f1cb4dd865eb31061767cebc8920f4056b049c37d7ca1b8fab37b47af8a
7
- data.tar.gz: b8eb923e7b4a37f7ef28e620b60a5484bba080fcd94e8187bf895c5302d6cfd4050d7b4aee5430c640b125327f5b62a600dc212281c17c1159f3186f2cb3fd9f
6
+ metadata.gz: d8428074ef782af684d29613d3d90d044640de9fa4b4429abc99bff7e3031edbadfc7843b9c18c93c898a33fbdb0d1f29e8f53b18cb4b1aaf773697c7fae08d4
7
+ data.tar.gz: 2bd5437fde5df8b5b720bba65fc3d9637621c2d4441a1bfd5ba3df3281e7e6b2b75d5253cc94414dd28bf097a8c823a50736be2fffe771e66779bcb77e805e04
@@ -41,20 +41,27 @@ module SqlcachedClient
41
41
  end # method build_arel
42
42
  end # module Arel
43
43
 
44
+
44
45
  private
45
46
 
47
+ class DummyConnection < ::ActiveRecord::Base
48
+ end
49
+
46
50
  class ArelWrapper
47
51
  include Singleton
48
52
 
53
+ attr_reader :arel_module
54
+
49
55
  def initialize
50
- ::Arel::Table.engine = ::ActiveRecord::Base.establish_connection(
56
+ @arel_module = ::Arel.clone
57
+ arel_module.const_set(:Table, ::Arel::Table.clone)
58
+ arel_module::Table.engine = DummyConnection.establish_connection(
51
59
  adapter: :nulldb)
52
60
  end
53
61
 
54
62
  class << self
55
63
  def arel_module
56
- instance
57
- ::Arel
64
+ instance.arel_module
58
65
  end
59
66
  end
60
67
  end # class ArelWrapper
@@ -1,3 +1,3 @@
1
1
  module SqlcachedClient
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sqlcached_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Maestroni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-03 00:00:00.000000000 Z
11
+ date: 2015-08-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport