caboose-cms 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/controllers/caboose/sns_controller.rb +6 -8
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjY2OTExNDIwOGJmNTA4ZGVjYjY0ODgxZWJlNDNjMzBmZTYxMDY4MA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWQxMGVjZTU0Nzg5NjJiNDM3M2RhNWQyNjMyNWNjMjdhMDViYTRhYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
N2RmZDdmNjUyNzBjZDVlNmUwNjk3Y2M1OTg1Zjk2OWM0YzQyYTZkZjNjMTlh
|
10
|
+
ZmExODA4MTU4MWIzYWY0MDhlYmZkZjJmN2FmZWIyMDg3NTViYjA0OGM1Yzk5
|
11
|
+
OTMzYzljOWZiMGEzNDc1NjFmYWQyMjJhYmFiYTlkYjIyNjdmN2Y=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
N2ZiZTc2NzI3ZjY5NzFlZGQwNjU4YTFjMGRmNzhkZjAyYjFjZTQzZGE5M2E3
|
14
|
+
NDNlNTNiZTNlZTMyMDFlMzFkMWFlMDQ1ZWJmMmU4MjY2YWM4NWU3Zjk4NTJi
|
15
|
+
NDQ0NDJlZjkwOWQwYTgzNjZlYjgxZmM3MzY0ZmRiZjQzZTY1ZDI=
|
@@ -19,19 +19,17 @@ module Caboose
|
|
19
19
|
msg['Records'].each do |r|
|
20
20
|
if r['eventName'] && r['eventName'].starts_with?('ObjectCreated')
|
21
21
|
if r['s3'] && r['s3']['object'] && r['s3']['object']['key']
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
key = r['s3']['object']['key']
|
22
|
+
|
23
|
+
key = URI.decode(r['s3']['object']['key']).gsub('+', ' ')
|
26
24
|
Caboose.log("Processing #{key}")
|
27
25
|
|
28
26
|
arr = key.split('_')
|
29
27
|
media_category_id = arr.shift
|
30
|
-
original_name = arr.join('_')
|
28
|
+
original_name = arr.join('_')
|
31
29
|
name = Caboose::Media.upload_name(original_name)
|
32
|
-
|
33
|
-
m = Media.where(:media_category_id => media_category_id, :original_name => original_name, :name => name).first
|
34
|
-
m = Media.create(:media_category_id => media_category_id, :original_name => original_name, :name => name, :processed => false) if m.nil?
|
30
|
+
|
31
|
+
m = Media.where(:media_category_id => media_category_id, :original_name => original_name, :name => name).first
|
32
|
+
m = Media.create(:media_category_id => media_category_id, :original_name => original_name, :name => name, :processed => false) if m.nil?
|
35
33
|
m.process
|
36
34
|
|
37
35
|
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.6.
|
4
|
+
version: 0.6.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|