sink3 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sink3/main.rb +10 -7
- data/lib/sink3/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 253f3fa30406d7a3234f7fa0f93b7586fe5dd4b2
|
4
|
+
data.tar.gz: dcf5fbbee2991cb1d55f198b52b085ae416ce987
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a3dcc00c4187c8c186240525d60aa85f3188480c7ed1aa9007a260214ac5da09f09cf4bf5064147d2fb578474317f6d16f8d63c7b347655e1074560330a7b85c
|
7
|
+
data.tar.gz: 932cd69bfd7217fe445f1031274b4701ab7bb8819c550c220f82dd7698053015140067778877ff6edc015d6dbbd5d53ff8c3126ddefc173d37cdf703a5acc6c3
|
data/lib/sink3/main.rb
CHANGED
@@ -10,21 +10,24 @@ require 'sink3/path_crawler'
|
|
10
10
|
module Sink3
|
11
11
|
class Main < Thor
|
12
12
|
option :delete, type: :boolean
|
13
|
-
|
13
|
+
#
|
14
14
|
# option :path, :required => true
|
15
15
|
desc "Send file to S3", "Send files to S3 in write only mode"
|
16
16
|
|
17
|
-
def send(
|
17
|
+
def send(*paths)
|
18
18
|
configure
|
19
|
-
path = Pathname.new(path)
|
20
|
-
raise "specified path does not exist" unless path.exist?
|
21
|
-
|
22
19
|
# overwrite hostname if configured
|
23
20
|
Dotenv.overload('~/.sink3cfg')
|
21
|
+
|
24
22
|
validate_env
|
25
23
|
|
26
|
-
|
27
|
-
|
24
|
+
[paths].flatten.each do |path|
|
25
|
+
path = Pathname.new(path)
|
26
|
+
raise "specified path does not exist" unless path.exist?
|
27
|
+
prefix = path.realdirpath.basename
|
28
|
+
|
29
|
+
Sink3::PathCrawler.new(path, prefix).start
|
30
|
+
end
|
28
31
|
end
|
29
32
|
|
30
33
|
private
|
data/lib/sink3/version.rb
CHANGED