memcached_store 1.1.1 → 1.2.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: 875c5a78872e62c674db76a3c085530c15ca88fa
4
- data.tar.gz: 5502993786ce2861e0864b2740e5f2c6b2648652
3
+ metadata.gz: e49987a84d92c00bdc0140eb182b55a7a928f1ed
4
+ data.tar.gz: 1a9788d127ef7dbf156c261316f39a1fe90c778c
5
5
  SHA512:
6
- metadata.gz: 72120ed1707ef1f7d94eb48d87c90c225c685a00d7ff8d471b7e53249b154bf1ee3d4a98a091e829b5b6e3f0a29177e2dc93f71d3d6c45f5a52536fd6577a498
7
- data.tar.gz: 20a14d03c0326194172c3e440af98619559180440b95c063b4ef0b4b936d85068e951fd194cd05e005c2466607d03f41efcc88bb8b5b652d106a2a9d95b5b6f1
6
+ metadata.gz: 7d1d23e7dbbce68a02bba13ab9a920b834044c2bff3b83497bb723f4b3d0c7a8d31074a47e8b5eb4440b61bb361670795fe30de76ba825320089b968a8c3ec7c
7
+ data.tar.gz: b46f2c4de9bd74ff25abd6cdd6ccd986b8df4e99cdc3d9f5294b7ea4d2281c7d6c165bb3fc8629505df4adb9addc1d38f8c9e33c4e9df834ee5275037cac76ff
@@ -14,6 +14,7 @@ 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
17
18
 
18
19
  def initialize(*addresses)
19
20
  addresses = addresses.flatten
@@ -251,6 +252,7 @@ module ActiveSupport
251
252
  rescue Memcached::NotFound, Memcached::ConnectionDataExists
252
253
  on_miss
253
254
  rescue Memcached::Error => e
255
+ @on_error.call(e) if @on_error
254
256
  raise unless @swallow_exceptions
255
257
  logger.warn("memcached error: #{e.class}: #{e.message}") if logger
256
258
  return_value_on_error
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module MemcachedStore
3
- VERSION = "1.1.1"
3
+ VERSION = "1.2.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.1.1
4
+ version: 1.2.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: 2017-06-27 00:00:00.000000000 Z
14
+ date: 2017-12-05 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -91,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
91
  version: '0'
92
92
  requirements: []
93
93
  rubyforge_project:
94
- rubygems_version: 2.5.2
94
+ rubygems_version: 2.5.2.1
95
95
  signing_key:
96
96
  specification_version: 4
97
97
  summary: Plugin-able Memcached adapters to add features (compression, safety)