memcached_store 1.2.2 → 2.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
  SHA1:
3
- metadata.gz: ddd94e96d09a8e7db0cb64b610b78725cef244b0
4
- data.tar.gz: e740daf203af937f99f52e027d738514513a8e6d
3
+ metadata.gz: a079d5cd404dd9b93e6fad358bc8cfc0653321d1
4
+ data.tar.gz: cddd7f7356b0baadc7149993de366818fec77d54
5
5
  SHA512:
6
- metadata.gz: '091663511c10ab1324309d17e70223b73cf2e3951ee33afd26bac877b975734059fe5c8fe8b34c64a523f84d319dda695eee29ddc572a7379c05fc43abb47b32'
7
- data.tar.gz: 9e828426cc6b005c994c74a84dfadc460df810271d82ac889189a1cd34b2db5924f38cf9e1c2db455a09b6c0368ee854bd4bfc9f0c233142cd7975781788a4af
6
+ metadata.gz: 98b7e22428228d6fabcf36ad364f4f9b119ae1ede6be0e795724ab3989e524ec7ec41e855cc6598a0c6bf6abc00d28bb25c1e679c427948ba69c545b556a777c
7
+ data.tar.gz: 599a6385c622f6e41a7124d7c27bd7d14754755ffae61035c860989720b57e87fa5a1b5d553ae5b36211c85d3e375c9637fbeda48522d3d68a664abc03b57425
@@ -14,7 +14,6 @@ module ActiveSupport
14
14
  ESCAPE_KEY_CHARS = /[\x00-\x20%\x7F-\xFF]/n
15
15
 
16
16
  attr_accessor :read_only, :swallow_exceptions
17
- attr_writer :on_error
18
17
 
19
18
  def initialize(*addresses)
20
19
  addresses = addresses.flatten
@@ -248,11 +247,14 @@ module ActiveSupport
248
247
  rescue Memcached::NotFound, Memcached::ConnectionDataExists
249
248
  on_miss
250
249
  rescue Memcached::Error => e
251
- @on_error.call(e) if @on_error
250
+ logger.warn(
251
+ "[MEMCACHED_ERROR] swallowed=#{@swallow_exceptions} exception_class=#{e.class} exception_message=#{e.message}"
252
+ ) if logger
252
253
  raise unless @swallow_exceptions
253
- logger.warn("memcached error: #{e.class}: #{e.message}") if logger
254
254
  return_value_on_error
255
255
  end
256
+
257
+ ActiveSupport.run_load_hooks(:memcached_store)
256
258
  end
257
259
  end
258
260
  end
@@ -1,7 +1,9 @@
1
1
  module MemcachedStore
2
2
  class Railtie < Rails::Railtie
3
3
  initializer 'memcached_store.configuration' do
4
- ActiveSupport::Cache::MemcachedStore.logger ||= Rails.logger
4
+ ActiveSupport.on_load(:memcached_store) do
5
+ ActiveSupport::Cache::MemcachedStore.logger ||= Rails.logger
6
+ end
5
7
  end
6
8
  end
7
9
  end
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module MemcachedStore
3
- VERSION = "1.2.2"
3
+ VERSION = "2.0.0"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: memcached_store
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camilo Lopez
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2018-05-24 00:00:00.000000000 Z
14
+ date: 2018-08-07 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport