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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MTNmZGI0YjRhODYxZDlhNTFlNGU3ODYxYTE3OGEwZTYxMjE3NDZjNg==
4
+ ZjY2OTExNDIwOGJmNTA4ZGVjYjY0ODgxZWJlNDNjMzBmZTYxMDY4MA==
5
5
  data.tar.gz: !binary |-
6
- YzMxNGVmZWRlNDg2ZDhjZmE3NzlmZWIzMmZiNzE2MjAyYWFhMWIzOQ==
6
+ ZWQxMGVjZTU0Nzg5NjJiNDM3M2RhNWQyNjMyNWNjMjdhMDViYTRhYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YmY3OTMyYTZlZmRiNjhmNTYwNTEyMTg0ODU3OWRiOWE5YTBhZmMwMTc5NDY4
10
- YTI3NWRjOGY0ZTdiZWQ1OTYyOTMyODNmZDQzMzIwNTlmMjZkMjdlZGM5MDFi
11
- MjdmMmE3MGU2YTJkMDY0ZjhjNzFiNDgzNDNiODBmNzZhYjA2ZmY=
9
+ N2RmZDdmNjUyNzBjZDVlNmUwNjk3Y2M1OTg1Zjk2OWM0YzQyYTZkZjNjMTlh
10
+ ZmExODA4MTU4MWIzYWY0MDhlYmZkZjJmN2FmZWIyMDg3NTViYjA0OGM1Yzk5
11
+ OTMzYzljOWZiMGEzNDc1NjFmYWQyMjJhYmFiYTlkYjIyNjdmN2Y=
12
12
  data.tar.gz: !binary |-
13
- OGQ5NmVhMTJjZDFlYWIwODJkZjM0ZjI4MTUyZTcwZDE4NzdiZGVkMmQxMGMy
14
- MmI5YjY2N2YyODhjOWQ2NmJhMDUwMmY4YTBiODA0N2M2NDQxZGU1NWZiNDQw
15
- OTg2YTlmMjg2NDQzZWUwYTYwYTlkMzc5YTFiYzFhODQ0ZWE3YzY=
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
- #Caboose.log(r['eventName'])
23
- #Caboose.log(r['s3']['object']['key'])
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
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.6.3'
2
+ VERSION = '0.6.4'
3
3
  end
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.3
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-13 00:00:00.000000000 Z
11
+ date: 2015-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg