gluttonberg-core 2.6.1 → 2.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,7 @@ module Gluttonberg
44
44
  end
45
45
 
46
46
  #takes file from public/assets folder and upload to s3 if s3 info is given in CMS settings
47
- def self.migrate_file_to_s3(asset_hash , file_name)
47
+ def self.migrate_file_to_s3(asset_hash , file_name, mime_type='')
48
48
  bucket = bucket_handle
49
49
  unless bucket.blank?
50
50
  local_file = "public/user_assets/" + asset_hash + "/" + file_name
@@ -55,8 +55,10 @@ module Gluttonberg
55
55
  unless asset.blank?
56
56
  puts " Copying #{local_file} to #{S3::ClassMethods.s3_bucket_name}"
57
57
 
58
- unless asset.mime_type.blank?
59
- key.write(File.open(local_file), {:expires => date.rfc2822, :content_type => asset.mime_type , :acl => :public_read })
58
+ mime_type = asset.mime_type if mime_type.blank?
59
+
60
+ unless mime_type.blank?
61
+ key.write(File.open(local_file), {:expires => date.rfc2822, :content_type => mime_type , :acl => :public_read })
60
62
  else
61
63
  key.write(File.open(local_file) , {:expires => date.rfc2822 , :acl => :public_read })
62
64
  end
@@ -1,3 +1,3 @@
1
1
  module Gluttonberg
2
- VERSION = "2.6.1"
2
+ VERSION = "2.6.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gluttonberg-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-04-10 00:00:00.000000000 Z
15
+ date: 2013-04-11 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: authlogic