aws-sdk-resources 2.1.0 → 2.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aws-sdk-resources.rb +1 -1
- data/lib/aws-sdk-resources/services/s3/encryption/utils.rb +0 -1
- data/lib/aws-sdk-resources/services/s3/file_part.rb +1 -0
- data/lib/aws-sdk-resources/services/s3/presigned_post.rb +1 -0
- metadata +5 -6
- data/lib/aws-sdk-resources/services/s3/encryption/config.rb +0 -65
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffacbd78780bd2f9365c9c43e80b4259ed519ff0
|
4
|
+
data.tar.gz: 417735dd7f837c0b845b8ce14fa558c6433b0b7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f323a434c73af8d1b06662727a77914cf326b62a8a257908bb0b9f7393939112f23dc88f3dd89ff3d73f341f2ff4d6997180e6d4e179d66aeb5f5d3db79ea0da
|
7
|
+
data.tar.gz: fba00c6b2604aa3160b2a1d0f9042182f4dc81c3dc98c0218f183e2b790d93db00284f4c10329da0e5f3be0cec9daf952b4195f193b1977187b920e7d53e74d6
|
data/lib/aws-sdk-resources.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-sdk-resources
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.1.
|
19
|
+
version: 2.1.1
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.1.
|
26
|
+
version: 2.1.1
|
27
27
|
description: Provides resource oriented interfaces and other higher-level abstractions
|
28
28
|
for many AWS services. This gem is part of the official AWS SDK for Ruby.
|
29
29
|
email:
|
@@ -60,7 +60,6 @@ files:
|
|
60
60
|
- lib/aws-sdk-resources/services/s3/bucket.rb
|
61
61
|
- lib/aws-sdk-resources/services/s3/encryption.rb
|
62
62
|
- lib/aws-sdk-resources/services/s3/encryption/client.rb
|
63
|
-
- lib/aws-sdk-resources/services/s3/encryption/config.rb
|
64
63
|
- lib/aws-sdk-resources/services/s3/encryption/decrypt_handler.rb
|
65
64
|
- lib/aws-sdk-resources/services/s3/encryption/default_key_provider.rb
|
66
65
|
- lib/aws-sdk-resources/services/s3/encryption/encrypt_handler.rb
|
@@ -104,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
104
103
|
version: '0'
|
105
104
|
requirements: []
|
106
105
|
rubyforge_project:
|
107
|
-
rubygems_version: 2.4.
|
106
|
+
rubygems_version: 2.4.5
|
108
107
|
signing_key:
|
109
108
|
specification_version: 4
|
110
109
|
summary: AWS SDK for Ruby - Resources
|
@@ -1,65 +0,0 @@
|
|
1
|
-
module Aws
|
2
|
-
module S3
|
3
|
-
module Encryption
|
4
|
-
class Config < Struct.new(
|
5
|
-
:client,
|
6
|
-
:key_provider,
|
7
|
-
:materials_description,
|
8
|
-
:materials_location,
|
9
|
-
:instruction_file_suffix)
|
10
|
-
|
11
|
-
# @api private
|
12
|
-
DEFAULTS = {
|
13
|
-
client: lambda { S3::Client.new },
|
14
|
-
key_provider: lambda {
|
15
|
-
msg = "must specify an :encryption_key or :key_provider"
|
16
|
-
raise ArgumentError, msg
|
17
|
-
},
|
18
|
-
materials_description: '{}',
|
19
|
-
materials_location: :metadata,
|
20
|
-
instruction_file_suffix: '.instruction',
|
21
|
-
}
|
22
|
-
|
23
|
-
def encryption_key= master_key
|
24
|
-
self[:key_provider] = DefaultKeyProvider.new(master_key)
|
25
|
-
end
|
26
|
-
|
27
|
-
# @param [Symbol] location :metadata Must be one of
|
28
|
-
# the following values:
|
29
|
-
# * :metadata
|
30
|
-
# * :instruction_file
|
31
|
-
def materials_location= location
|
32
|
-
unless [:metadata, :instruction_file].include?(location)
|
33
|
-
msg = ":materials_location must be :metadata or :instruction_file "
|
34
|
-
msg << "got #{location.inspect}"
|
35
|
-
raise ArgumentError, msg
|
36
|
-
end
|
37
|
-
super
|
38
|
-
end
|
39
|
-
|
40
|
-
class << self
|
41
|
-
|
42
|
-
def build(options)
|
43
|
-
config = Config.new
|
44
|
-
options.each do |opt_name, opt_value|
|
45
|
-
config.send("#{opt_name}=", opt_value)
|
46
|
-
end
|
47
|
-
apply_defaults(config)
|
48
|
-
config
|
49
|
-
end
|
50
|
-
|
51
|
-
private
|
52
|
-
|
53
|
-
def apply_defaults(config)
|
54
|
-
DEFAULTS.each do |key, value|
|
55
|
-
if config[key].nil?
|
56
|
-
config[key] = value.is_a?(Proc) ? value.call : value
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
end
|
62
|
-
end
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|