share_cli 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/share +13 -0
- 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: de7c0e8282088247879435d117adc87cf3118cd0
|
4
|
+
data.tar.gz: bdb95ca1d43329f2894c1d40a60cd303e613c088
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dceabd78bec8f98e63c8fd45f7f2c4f5329c766a10b4132cec9a495c2d8ab5b3c3e6bae89ac5e12d64262121e36928644517b1e39b98d58615811625cb8eac32
|
7
|
+
data.tar.gz: b1acc8e07c044cbc11491a1d74c5e0a8d50df00105e752c86ece980dfdb3b4a6e8cda8b4f2b1ccbd09edbde7b5d0dd0c5114ef5e96cbbb81c6c0f112af94e022
|
data/bin/share
CHANGED
@@ -40,6 +40,19 @@ class Share < Thor
|
|
40
40
|
exec(command)
|
41
41
|
end
|
42
42
|
|
43
|
+
desc "glacier FILE", "Post file to S3 bucket which automatically stores data in AWS Glacier."
|
44
|
+
def glacier(file = nil)
|
45
|
+
file = file.gsub(/\s+/, "")
|
46
|
+
unless File.exists? file
|
47
|
+
puts "Error! Can't find \"#{file}\""
|
48
|
+
end
|
49
|
+
location = "#{Dir.pwd}/#{file}"
|
50
|
+
sha = Time.now.strftime('%F')
|
51
|
+
command = "aws s3 cp #{location} s3://xodus-glacier/#{sha}/#{file} && echo 'https://s3.amazonaws.com/xodus-glacier/#{sha}/#{file}' | pbcopy && echo 'https://s3.amazonaws.com/xodus-glacier/#{sha}/#{file}'"
|
52
|
+
exec(command)
|
53
|
+
end
|
54
|
+
default_task :post
|
55
|
+
|
43
56
|
end
|
44
57
|
|
45
58
|
|