cacheable_delegator 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/VERSION +1 -1
- data/cacheable_delegator.gemspec +2 -2
- data/lib/cacheable_delegator.rb +6 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzEwYjJkZTA3MTYzOGI4OThhNWFiOTJlYzY2OWMzOGQxNzVmMmEzNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
OTJhZjgwYTU1M2E1NGY0MTRkY2JmMmFlZTdkNTVkMzQwM2Y5ZGIwMw==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzIwYWJjZGExODAyYzA3M2M5YjcwZTI2ZTA2M2U3ZWU2ZTc0NzRjNWMxNmZi
|
10
|
+
MWYzMWE3MzgwMmFkMDlkYjY0OWY5NGQ4ODUyZDhlNmU1MGM1NGI5Yjk5Yzdi
|
11
|
+
MGJiMTljYmVhZTRkMGIyYzk2YWNiMDA3YWFhZThiODdiMWVhM2U=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWQwMGM3ZTYyYTQ5OTIwODE5OThmOThhZDg0N2MzZTA4YTQ0MTU1MTNiZDFm
|
14
|
+
NGM1ZjcwNWRhOWVlYWQ5YjZiOTEwOTU0OWY2NWUwMzRhZDZkNmQwNDU5OTU2
|
15
|
+
NDBjYWZhYTA0NTM4YjExMzkxMDQxZDNjZTg5NTIyMDY3NTM1YTA=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.4.
|
1
|
+
1.4.1
|
data/cacheable_delegator.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "cacheable_delegator"
|
8
|
-
s.version = "1.4.
|
8
|
+
s.version = "1.4.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dan Nguyen"]
|
12
|
-
s.date = "2013-
|
12
|
+
s.date = "2013-11-04"
|
13
13
|
s.description = "Create a cache model for your active records"
|
14
14
|
s.email = "dansonguyen@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/cacheable_delegator.rb
CHANGED
@@ -152,7 +152,6 @@ module CacheableDelegator
|
|
152
152
|
|
153
153
|
|
154
154
|
|
155
|
-
|
156
155
|
DELEGATING_REGEX = /^delegate_(\w+)/
|
157
156
|
|
158
157
|
def method_missing(foo, *args, &block)
|
@@ -209,15 +208,17 @@ module CacheableDelegator
|
|
209
208
|
# instance method
|
210
209
|
# pre: must already have source_record set
|
211
210
|
|
212
|
-
def refresh_cache
|
211
|
+
def refresh_cache(opts={})
|
213
212
|
atts = self.class.build_attributes_hash(self.source_record)
|
214
|
-
|
213
|
+
|
214
|
+
opts[:without_protection] ||= true
|
215
|
+
self.assign_attributes(atts, opts)
|
215
216
|
|
216
217
|
self
|
217
218
|
end
|
218
219
|
|
219
|
-
def refresh_cache!
|
220
|
-
refresh_cache
|
220
|
+
def refresh_cache!(opts={})
|
221
|
+
refresh_cache(opts)
|
221
222
|
self.save
|
222
223
|
end
|
223
224
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cacheable_delegator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|