covercache 0.4.0 → 0.4.1

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: cd4db05a4c6363e98a948daeb16b2968cded4169
4
- data.tar.gz: c3fc3a7e634958920502b7ff6971e919a0ddbb84
3
+ metadata.gz: 506bf529f8f5d8772b4071f2d952f12a4ceb1a1c
4
+ data.tar.gz: 55acea945469e7dd0a099ab339802661761adbc8
5
5
  SHA512:
6
- metadata.gz: 2a2a4d9e1289249fae1b850db1dc2d09b30520a923bb45da804a2db93f1c99b434b88cea512dbb4f27c1989cf84c5d1199544fc2dc036d6de92b36a08131d810
7
- data.tar.gz: b08f824c1445ca69f4d1c8b6a818dd3537f86c5ad9ef9884b898498eed1aba22f40903e601ac142e708f6c34c9362a0ed3d05cdea402a95f275050f4af56eed0
6
+ metadata.gz: 019c81c9abe67eb14a6042fbc2234c85401dc1585e615d5475154827d9c4e2b072fce4e4bb85d89ff22a99082548924f6aad9db8ffc6dd813c9e7835bc73811b
7
+ data.tar.gz: 29e132c7e1cb2732c038e6cef196ae8eb9e1337c85500f99fe9db1e5943764dfa696712cf7fc5509bf2e8520a2e6556948945b4e034d3f24dc784988ce9a00ae
@@ -1,3 +1,3 @@
1
1
  module Covercache
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
data/lib/covercache.rb CHANGED
@@ -101,12 +101,12 @@ module Covercache
101
101
  private
102
102
  def covercache(*keys, &block)
103
103
  options = keys.extract_options!
104
- debug, without_auto_key = options.slice! :debug, :without_auto_key
104
+ props = options.slice! :debug, :without_auto_key
105
105
 
106
- keys.prepend get_auto_cache_key(caller) unless !!without_auto_key
106
+ keys.prepend get_auto_cache_key(caller) unless props.fetch(:without_auto_key){false}
107
107
  keys.flatten!.compact!
108
108
 
109
- Covercache.logger.debug %([covercache] #{get_class_name} class generate cache key: #{keys.inspect}) if !!debug
109
+ Covercache.logger.debug %([covercache] #{get_class_name} class generate cache key: #{keys.inspect}) if props.fetch(:debug){false}
110
110
 
111
111
  Rails.cache.fetch keys, options do
112
112
  push_covercache_key keys.join('/')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: covercache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tõnis Simo