iostreams 0.17.1 → 0.17.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/io_streams/s3.rb +1 -1
- data/lib/io_streams/s3/writer.rb +65 -0
- data/lib/io_streams/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72fd57ac6ba81c64ac1dd5526bcf2b0aa491ef55eff38d1709a037874d8659d1
|
4
|
+
data.tar.gz: a953ad1389cd98740112f847c656d24956ce259f3dfa1309aa216354a93762a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a5f33b69593ee071aa850a74f2c0c67c05000e1ecf730bc1be91a116786b820b408788f41802e86711eb2d3fbd861f739c5353ad9809ae17ab8b90a1f57954f
|
7
|
+
data.tar.gz: 100e625316b55badbad403bcd58c146381ad343b427a9c68780424f4d738867d0fbb5fe1ad480cb1dce399c9f7d6e68b25055c38b569471da0bdfc811c7cdcbc
|
data/lib/io_streams/s3.rb
CHANGED
data/lib/io_streams/s3/writer.rb
CHANGED
@@ -2,6 +2,71 @@ module IOStreams
|
|
2
2
|
module S3
|
3
3
|
class Writer
|
4
4
|
# Write to AWS S3
|
5
|
+
#
|
6
|
+
# Arguments:
|
7
|
+
#
|
8
|
+
# uri: [String]
|
9
|
+
# Prefix must be: `s3://`
|
10
|
+
# followed by bucket name,
|
11
|
+
# followed by path and file_name (key).
|
12
|
+
# Examples:
|
13
|
+
# s3://my-bucket-name/file_name.txt
|
14
|
+
# s3://my-bucket-name/some_path/file_name.csv
|
15
|
+
#
|
16
|
+
# region: [String]
|
17
|
+
# AWS Region.
|
18
|
+
# Default: ENV['AWS_REGION'], or supplied by ruby driver
|
19
|
+
#
|
20
|
+
# thread_count: [Integer]
|
21
|
+
# The number of parallel multipart uploads
|
22
|
+
# Default: 10
|
23
|
+
#
|
24
|
+
# tempfile: [Boolean]
|
25
|
+
# Normally read data is stored in memory when building the parts in order to complete
|
26
|
+
# the underlying multipart upload. By passing `:tempfile => true` data read will be
|
27
|
+
# temporarily stored on disk reducing the memory footprint vastly.
|
28
|
+
# Default: false
|
29
|
+
#
|
30
|
+
# part_size: [Integer]
|
31
|
+
# Define how big each part size but the last should be.
|
32
|
+
# Default: 5 * 1024 * 1024
|
33
|
+
#
|
34
|
+
# Other possible options extracted from AWS source code:
|
35
|
+
# # See: https://docs.aws.amazon.com/sdk-for-ruby/v3/api/Aws/S3/Client.html#create_multipart_upload-instance_method
|
36
|
+
#
|
37
|
+
# acl: "private", # accepts private, public-read, public-read-write, authenticated-read, aws-exec-read, bucket-owner-read, bucket-owner-full-control
|
38
|
+
# cache_control: "CacheControl",
|
39
|
+
# content_disposition: "ContentDisposition",
|
40
|
+
# content_encoding: "ContentEncoding",
|
41
|
+
# content_language: "ContentLanguage",
|
42
|
+
# content_type: "ContentType",
|
43
|
+
# expires: Time.now,
|
44
|
+
# grant_full_control: "GrantFullControl",
|
45
|
+
# grant_read: "GrantRead",
|
46
|
+
# grant_read_acp: "GrantReadACP",
|
47
|
+
# grant_write_acp: "GrantWriteACP",
|
48
|
+
# metadata: {
|
49
|
+
# "MetadataKey" => "MetadataValue",
|
50
|
+
# },
|
51
|
+
# server_side_encryption: "AES256", # accepts AES256, aws:kms
|
52
|
+
# storage_class: "STANDARD", # accepts STANDARD, REDUCED_REDUNDANCY, STANDARD_IA, ONEZONE_IA, INTELLIGENT_TIERING, GLACIER, DEEP_ARCHIVE
|
53
|
+
# website_redirect_location: "WebsiteRedirectLocation",
|
54
|
+
# sse_customer_algorithm: "SSECustomerAlgorithm",
|
55
|
+
# sse_customer_key: "SSECustomerKey",
|
56
|
+
# sse_customer_key_md5: "SSECustomerKeyMD5",
|
57
|
+
# ssekms_key_id: "SSEKMSKeyId",
|
58
|
+
# ssekms_encryption_context: "SSEKMSEncryptionContext",
|
59
|
+
# request_payer: "requester", # accepts requester
|
60
|
+
# tagging: "TaggingHeader",
|
61
|
+
# object_lock_mode: "GOVERNANCE", # accepts GOVERNANCE, COMPLIANCE
|
62
|
+
# object_lock_retain_until_date: Time.now,
|
63
|
+
# object_lock_legal_hold_status: "ON", # accepts ON, OFF
|
64
|
+
#
|
65
|
+
# Raises [MultipartUploadError] If an object is being uploaded in
|
66
|
+
# parts, and the upload can not be completed, then the upload is
|
67
|
+
# aborted and this error is raised. The raised error has a `#errors`
|
68
|
+
# method that returns the failures that caused the upload to be
|
69
|
+
# aborted.
|
5
70
|
def self.open(uri, region: nil, **args, &block)
|
6
71
|
raise(ArgumentError, 'file_name must be a URI string') unless uri.is_a?(String)
|
7
72
|
|
data/lib/io_streams/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iostreams
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reid Morrison
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
128
128
|
- !ruby/object:Gem::Version
|
129
129
|
version: '0'
|
130
130
|
requirements: []
|
131
|
-
rubygems_version: 3.0.
|
131
|
+
rubygems_version: 3.0.3
|
132
132
|
signing_key:
|
133
133
|
specification_version: 4
|
134
134
|
summary: Input and Output streaming for Ruby.
|