share_cli 0.0.4 → 0.0.5

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 +4 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d920aabe08dc24d09834a312e601fe8dbb2f9a01
4
- data.tar.gz: 1782c931daab32bb8bf7f3ab16d9f580df1f91e7
3
+ metadata.gz: b7f231401bf54795bd7dde3454ed9bad4e5709b5
4
+ data.tar.gz: 6933f2494c89afa79cf41aaa82c372b5112413bc
5
5
  SHA512:
6
- metadata.gz: d81f06bb8344cc461f61f99b71628ef1d85e492bf3e2ea560521e161cf84397f8c214729f35d9f90fdd1f0e548aa5842c1e99b1ef67bc31e2b0915b51366d532
7
- data.tar.gz: d74342d0cf22c2183578907e193476290cae5cb277c44d90b7ae044539dfeef8e5289e911addd2d6f8f79a41b58cbf7637a84314ebddbc58c021734695942da9
6
+ metadata.gz: b42e94d3bc9dfd04b1d395314269ffdec15d004d2d9007d291d0e5f4e408384dcdcd983383a4025da5449f8917995bc21cbe895393b0b9ea35ce27a44d26bcfa
7
+ data.tar.gz: 0075f1f377e7f5a2e245e009cc65d639648152551d118289d1e57af4c96b6c77ea2d59a5f2eb61a207e70aaef0d052a7ed53ea2353b4ede5710ba2a6ab6f1484
data/bin/share CHANGED
@@ -9,6 +9,7 @@ class Share < Thor
9
9
 
10
10
  desc "get FILE", "Download file from S3"
11
11
  def get(file)
12
+ file = file.gsub(/\s+/, "")
12
13
  sha = Digest::SHA1.hexdigest(file+"037605")
13
14
  command = "aws s3 cp s3://xnh/public/#{sha}/#{file} #{file} && echo '#{file}'"
14
15
  exec(command)
@@ -16,7 +17,8 @@ class Share < Thor
16
17
 
17
18
  desc "post FILE", "Post file to S3"
18
19
  def post(file = nil)
19
- unless File.exists? file.split!
20
+ file = file.gsub(/\s+/, "")
21
+ unless File.exists? file
20
22
  puts "Error! Can't find \"#{file}\""
21
23
  end
22
24
  location = "#{Dir.pwd}/#{file}"
@@ -28,6 +30,7 @@ class Share < Thor
28
30
 
29
31
  desc "delete FILE", "Delete file from S3"
30
32
  def delete(file = nil)
33
+ file = file.gsub(/\s+/, "")
31
34
  unless File.exists? file
32
35
  puts "Error! Can't find \"#{file}\""
33
36
  end
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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrick McConlogue