s3archive 1.0 → 1.1.0
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.
- data/lib/s3archive/config.rb +6 -0
- data/lib/tasks/s3archive.thor +11 -3
- metadata +2 -2
data/lib/s3archive/config.rb
CHANGED
data/lib/tasks/s3archive.thor
CHANGED
@@ -13,10 +13,18 @@ module S3Archive
|
|
13
13
|
:aliases => "--config",
|
14
14
|
:default => "/etc/s3archive.yml"
|
15
15
|
|
16
|
-
desc "upload PATH", "Compresses PATH and uploads to s3://<bucket>/<year>/<month>/<day>/<filename>.gz"
|
17
|
-
def upload (
|
16
|
+
desc "upload PATH [PATH...]", "Compresses PATH and uploads to s3://<bucket>/<year>/<month>/<day>/<filename>.gz"
|
17
|
+
def upload (*paths)
|
18
18
|
S3Archive.config_path = self.options["c"] if self.options["c"]
|
19
|
-
|
19
|
+
help(:upload) && exit if paths.empty?
|
20
|
+
paths.each do |path|
|
21
|
+
CompressAndUpload.run(path)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
desc "genconfig", "Prints a sample config file to stdout"
|
26
|
+
def genconfig
|
27
|
+
puts S3Archive::Config.sample_yaml
|
20
28
|
end
|
21
29
|
end
|
22
30
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3archive
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-05-
|
12
|
+
date: 2012-05-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|