caboose-cms 0.9.96 → 0.9.97
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/caboose/sns_controller.rb +6 -6
- data/lib/caboose/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: b313b528aff85bf26feb9bb66e90738cd9c31a22
|
4
|
+
data.tar.gz: 84d6f32889e9ac803b6a63f9985dc3ea4ad8956c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9b18df80b08810a8503b674fb0bab6513ccb6397fad41b1db36cfd05dbaa68babd48950ccd9676daf46cca620890162dda40c9a8ac1b49f39053febd1704e1c
|
7
|
+
data.tar.gz: e0145fa9e2cb9d4f1efbd9374822949d2b35103bf7f902de4e1697f51ce34b5a8975666e0e485ed9131d669417d85c86f405cb1f3787ed92bf341aac29082ebe
|
@@ -19,11 +19,11 @@ module Caboose
|
|
19
19
|
# if records['eventSource'] == "aws:s3"
|
20
20
|
# msg = JSON.parse(body[:Message])
|
21
21
|
# if msg['Records']
|
22
|
-
if body && body[
|
23
|
-
body[
|
24
|
-
if r[
|
25
|
-
if r[
|
26
|
-
key = URI.decode(r[
|
22
|
+
if body && body[:Records]
|
23
|
+
body[:Records].each do |r|
|
24
|
+
if r[:eventName] && r[:eventName].starts_with?('ObjectCreated')
|
25
|
+
if r[:s3] && r[:s3][:object] && r[:s3][:object][:key]
|
26
|
+
key = URI.decode(r[:s3][:object][:key]).gsub('+', ' ')
|
27
27
|
Caboose.log("Processing #{key}")
|
28
28
|
arr = key.split('_')
|
29
29
|
media_category_id = arr.shift
|
@@ -31,7 +31,7 @@ module Caboose
|
|
31
31
|
name = Caboose::Media.upload_name(original_name)
|
32
32
|
m = Media.where(:media_category_id => media_category_id, :original_name => original_name, :name => name).first
|
33
33
|
m = Media.create(:media_category_id => media_category_id, :original_name => original_name, :name => name, :processed => false) if m.nil?
|
34
|
-
m.delay(:queue => 'caboose_media').process
|
34
|
+
m.delay(:queue => 'caboose_media', :priority => 3).process
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.97
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|