s3_zipper 1.0.2 → 1.0.3
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/exe/s3_zipper +14 -4
- data/lib/s3_zipper/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1df86be6cbf4a8a1faf25f919821e021dbb532663d72ffe5eed7e5093dc1ce0a
|
4
|
+
data.tar.gz: 5d8adcb636fc848363268db0d8ef20b8a8cb9abf7b1c01ddd762ffa0079ca821
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 55722eca67823cd8ff98b6638b5526c0e3c5a6f1bd3659e00f4b38c2a68264e459422de0abbbf588fcb24fcc39437f43d1492333237d6baf4457d58bd2d7a007
|
7
|
+
data.tar.gz: 3d10cd54337e44e344a5e3ea047d9f34d48e6fd756528b65dd931e14d801da2921dd577a2eefb5fb65ec8f8e8aa31b368a7ce43890cb453cb13a47f143471c14
|
data/Gemfile.lock
CHANGED
data/exe/s3_zipper
CHANGED
@@ -4,11 +4,21 @@ require "s3_zipper"
|
|
4
4
|
require 'thor'
|
5
5
|
require 'awesome_print'
|
6
6
|
class CLI < Thor
|
7
|
-
desc '
|
8
|
-
|
7
|
+
desc 'local_file FILES', 'zip files from s3 to a local file'
|
8
|
+
method_option :filename, type: :string, aliases: 'f', desc: 'Name of the created zip archive'
|
9
|
+
method_option :bucket, type: :string, default: ENV['AWS_BUCKET'], required: !ENV['AWS_BUCKET'].nil?, aliases: 'b', desc: 'Name of the bucket the files are in'
|
9
10
|
|
10
|
-
def
|
11
|
-
S3Zipper.new(
|
11
|
+
def local_file(*files)
|
12
|
+
S3Zipper.new(options[:bucket]).zip_to_local_file(files, file: options[:filename] || SecureRandom.hex)
|
13
|
+
end
|
14
|
+
|
15
|
+
desc 's3 FILES', 'zip files from s3 to s3'
|
16
|
+
method_option :filename, type: :string, aliases: 'f', desc: 'Name of the created zip archive'
|
17
|
+
method_option :path, type: :string, aliases: 'p', desc: 'Path to the file in s3'
|
18
|
+
method_option :bucket, type: :string, default: ENV['AWS_BUCKET'], required: !ENV['AWS_BUCKET'].nil?, aliases: 'b', desc: 'Name of the bucket the files are in'
|
19
|
+
|
20
|
+
def s3(*files)
|
21
|
+
S3Zipper.new(options[:bucket]).zip_to_s3(files, filename: options[:filename] || SecureRandom.hex, path: options[:path])
|
12
22
|
end
|
13
23
|
end
|
14
24
|
CLI.start(ARGV)
|
data/lib/s3_zipper/version.rb
CHANGED