wcc-media-client 0.4.11 → 0.4.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/lib/wcc/media/cacheable.rb +9 -0
- data/lib/wcc/media/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ea51e4f9d523fe4742d6598db7d08b493b6768af
|
4
|
+
data.tar.gz: 529c3ea7324ba8f4543b4c738f1f896d597d91cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc0aa26a6b79ae55158ac42684a63212b012ad82121e2163db274596bd9132b233d1f541136d7d23d93c972ef7568b5ebeefa29feb479dce21dc386802886891
|
7
|
+
data.tar.gz: b8dba8a75304215e923ac0e6069cee9f3df312b456aa0aa5455e494bdad8eeece7f76a9a02082540083221bd93d56fb4a0bffc5c87b4d175a6f801b1ff871e22
|
data/.rubocop.yml
CHANGED
data/lib/wcc/media/cacheable.rb
CHANGED
@@ -10,6 +10,15 @@ module WCC
|
|
10
10
|
@cache_key = "#{self.class.name}/#{key}"
|
11
11
|
end
|
12
12
|
|
13
|
+
def last_modified
|
14
|
+
return @last_modified if @last_modified
|
15
|
+
|
16
|
+
last_modified =
|
17
|
+
(headers&.fetch('Last-Modified', nil) if respond_to?(:headers))
|
18
|
+
@last_modified = Time.parse(last_modified) if last_modified && /\S/.match(last_modified)
|
19
|
+
end
|
20
|
+
alias_method :updated_at, :last_modified
|
21
|
+
|
13
22
|
def self.hash_cache_key(hash)
|
14
23
|
Digest::SHA1.hexdigest(Marshal.dump(hash))
|
15
24
|
end
|
data/lib/wcc/media/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcc-media-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watermark Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wcc-api
|