share_cli 0.0.3 → 0.0.4
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/bin/share +2 -3
- 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: d920aabe08dc24d09834a312e601fe8dbb2f9a01
|
4
|
+
data.tar.gz: 1782c931daab32bb8bf7f3ab16d9f580df1f91e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d81f06bb8344cc461f61f99b71628ef1d85e492bf3e2ea560521e161cf84397f8c214729f35d9f90fdd1f0e548aa5842c1e99b1ef67bc31e2b0915b51366d532
|
7
|
+
data.tar.gz: d74342d0cf22c2183578907e193476290cae5cb277c44d90b7ae044539dfeef8e5289e911addd2d6f8f79a41b58cbf7637a84314ebddbc58c021734695942da9
|
data/bin/share
CHANGED
@@ -9,14 +9,14 @@ class Share < Thor
|
|
9
9
|
|
10
10
|
desc "get FILE", "Download file from S3"
|
11
11
|
def get(file)
|
12
|
-
sha = Digest::SHA1.hexdigest(file)
|
12
|
+
sha = Digest::SHA1.hexdigest(file+"037605")
|
13
13
|
command = "aws s3 cp s3://xnh/public/#{sha}/#{file} #{file} && echo '#{file}'"
|
14
14
|
exec(command)
|
15
15
|
end
|
16
16
|
|
17
17
|
desc "post FILE", "Post file to S3"
|
18
18
|
def post(file = nil)
|
19
|
-
unless File.exists? file
|
19
|
+
unless File.exists? file.split!
|
20
20
|
puts "Error! Can't find \"#{file}\""
|
21
21
|
end
|
22
22
|
location = "#{Dir.pwd}/#{file}"
|
@@ -40,7 +40,6 @@ class Share < Thor
|
|
40
40
|
end
|
41
41
|
|
42
42
|
|
43
|
-
# Start Thor as usual
|
44
43
|
Share.start
|
45
44
|
|
46
45
|
|