contentful_model 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/contentful_model/base.rb +4 -1
- data/lib/contentful_model/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb068dfa34793542d2494fdb81949a5bbc91a655fe9766bd7cc557574c81fd87
|
4
|
+
data.tar.gz: 2656cb0fa65053912a96d75ac39850cb2df0a0cea4cc6abbeb69a2dae90d90d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34f7dbb45f0a8bb0e7318dba146582ac767c2268a6963fb67fe7a1bce0feaabc98653f8abb1753654e15ca0862c74b7cb77add86854b49373cecf91c545aa133
|
7
|
+
data.tar.gz: 346c64b379119d12e8f58c2d61c59543c7b4315cb21ea64cf07c5caf7538e6586fa024c94bdb89e6fc559057ff6ccb85f7ed32fd77bd81047b4e751c1df597f9
|
@@ -13,6 +13,9 @@ module ContentfulModel
|
|
13
13
|
include ContentfulModel::Manageable
|
14
14
|
include ContentfulModel::Queries
|
15
15
|
|
16
|
+
# Time format for Cache Key
|
17
|
+
TIME_FORMAT = '%Y%m%d%H%M%S%6N'.freeze
|
18
|
+
|
16
19
|
def initialize(*)
|
17
20
|
super
|
18
21
|
override_getters
|
@@ -21,7 +24,7 @@ module ContentfulModel
|
|
21
24
|
def cache_key(*timestamp_names)
|
22
25
|
fail ArgumentError, "ContentfulModel::Base models don't support named timestamps." if timestamp_names.present?
|
23
26
|
|
24
|
-
"#{self.class.to_s.underscore}/#{id}-#{updated_at.utc.
|
27
|
+
"#{self.class.to_s.underscore}/#{id}-#{updated_at.utc.strftime(TIME_FORMAT)}"
|
25
28
|
end
|
26
29
|
|
27
30
|
def hash
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: contentful_model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Contentful GmbH (David Litvak Bruno)
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2018-
|
12
|
+
date: 2018-08-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: contentful
|