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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/share +13 -0
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7f231401bf54795bd7dde3454ed9bad4e5709b5
4
- data.tar.gz: 6933f2494c89afa79cf41aaa82c372b5112413bc
3
+ metadata.gz: de7c0e8282088247879435d117adc87cf3118cd0
4
+ data.tar.gz: bdb95ca1d43329f2894c1d40a60cd303e613c088
5
5
  SHA512:
6
- metadata.gz: b42e94d3bc9dfd04b1d395314269ffdec15d004d2d9007d291d0e5f4e408384dcdcd983383a4025da5449f8917995bc21cbe895393b0b9ea35ce27a44d26bcfa
7
- data.tar.gz: 0075f1f377e7f5a2e245e009cc65d639648152551d118289d1e57af4c96b6c77ea2d59a5f2eb61a207e70aaef0d052a7ed53ea2353b4ede5710ba2a6ab6f1484
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: share_cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick McConlogue