paperclip-aws 1.6.0 → 1.6.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +8 -4
- data/VERSION +1 -1
- data/lib/paperclip-aws.rb +1 -1
- data/paperclip-aws.gemspec +3 -3
- metadata +12 -12
data/README.md
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
* can generate urls for `read`, `write` и `delete` operations;
|
14
14
|
* correctly sets content-type of uploaded files;
|
15
15
|
* ability to set content-disposition of uploaded files;
|
16
|
-
* **supports amazon server side encryption** (thanks to
|
16
|
+
* **supports amazon server side encryption** (thanks to @pvertenten);
|
17
17
|
* highly compatible with included in Paperclip S3 storage module
|
18
18
|
|
19
19
|
|
@@ -51,18 +51,22 @@ After this add 'paperclip-aws' to your `Gemfile` or `environment.rb`
|
|
51
51
|
:s3_permissions => :public_read,
|
52
52
|
:s3_protocol => 'http',
|
53
53
|
:s3_options => {
|
54
|
-
:
|
54
|
+
:server_side_encryption => 'AES256',
|
55
55
|
:storage_class => :reduced_redundancy,
|
56
56
|
:content_disposition => 'attachment'
|
57
57
|
},
|
58
58
|
|
59
59
|
:path => "company_documents/:id/:style/:data_file_name"
|
60
60
|
|
61
|
-
# You also can modify
|
61
|
+
# You also can modify :s3_credentials, :s3_bucket, :s3_permissions, :s3_options, :s3_protocol, :s3_host_alias directly in instance.
|
62
62
|
before_save do
|
63
63
|
self.data.s3_options[:content_disposition] = "attachment; filename=#{self.data_file_name}"
|
64
|
-
self.data.s3_options[:
|
64
|
+
self.data.s3_options[:server_side_encryption] = true if self.confidential_information?
|
65
65
|
self.data.s3_options[:storage_class] = true if self.unimportant_information?
|
66
|
+
|
67
|
+
self.data.s3_protocol = 'https' if self.confidential_information?
|
68
|
+
|
69
|
+
self.data.s3_permissions = :authenticated_read if self.private?
|
66
70
|
end
|
67
71
|
end
|
68
72
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.6.
|
1
|
+
1.6.1
|
data/lib/paperclip-aws.rb
CHANGED
@@ -104,7 +104,7 @@ module Paperclip
|
|
104
104
|
self.s3.buckets[@s3_bucket].objects[path(style)].write({
|
105
105
|
:file => file.path,
|
106
106
|
:acl => @s3_permissions[:style.to_sym] || @s3_permissions[:default],
|
107
|
-
:content_type => file.content_type
|
107
|
+
:content_type => file.content_type.to_s.strip
|
108
108
|
}.reverse_merge(@s3_options))
|
109
109
|
rescue AWS::S3::Errors::NoSuchBucket => e
|
110
110
|
create_bucket
|
data/paperclip-aws.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "paperclip-aws"
|
8
|
-
s.version = "1.6.
|
8
|
+
s.version = "1.6.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Igor Alexandrov"]
|
12
|
-
s.date = "2012-02-
|
12
|
+
s.date = "2012-02-24"
|
13
13
|
s.description = "'paperclip-aws' is a full featured storage module that supports all S3 locations (US, European and Tokio) without any additional hacking."
|
14
14
|
s.email = "igor.alexandrov@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
@@ -35,7 +35,7 @@ Gem::Specification.new do |s|
|
|
35
35
|
s.homepage = "http://github.com/igor-alexandrov/paperclip-aws"
|
36
36
|
s.licenses = ["MIT"]
|
37
37
|
s.require_paths = ["lib"]
|
38
|
-
s.rubygems_version = "1.8.
|
38
|
+
s.rubygems_version = "1.8.15"
|
39
39
|
s.summary = "Storage module to official 'aws-sdk' gem for Amazon S3"
|
40
40
|
|
41
41
|
if s.respond_to? :specification_version then
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip-aws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-02-
|
12
|
+
date: 2012-02-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: paperclip
|
16
|
-
requirement: &
|
16
|
+
requirement: &70118178437640 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.6.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70118178437640
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: aws-sdk
|
27
|
-
requirement: &
|
27
|
+
requirement: &70118178437140 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.2.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70118178437140
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &70118180010020 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 1.0.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70118180010020
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &70118180009540 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,7 +54,7 @@ dependencies:
|
|
54
54
|
version: 1.6.4
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70118180009540
|
58
58
|
description: ! '''paperclip-aws'' is a full featured storage module that supports
|
59
59
|
all S3 locations (US, European and Tokio) without any additional hacking.'
|
60
60
|
email: igor.alexandrov@gmail.com
|
@@ -93,7 +93,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
93
93
|
version: '0'
|
94
94
|
segments:
|
95
95
|
- 0
|
96
|
-
hash:
|
96
|
+
hash: 3176807649922925597
|
97
97
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
98
98
|
none: false
|
99
99
|
requirements:
|
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
102
102
|
version: '0'
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version: 1.8.
|
105
|
+
rubygems_version: 1.8.15
|
106
106
|
signing_key:
|
107
107
|
specification_version: 3
|
108
108
|
summary: Storage module to official 'aws-sdk' gem for Amazon S3
|