share_cli 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/share +3 -4
- 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: 4bd65c7125e9e00304807bf0d5c7dc4910c8e842
|
4
|
+
data.tar.gz: 169b3c2e01d0d164554220978dd6456d8797b3b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a107df1ae68acc071ac60ae83c01989dd5e49d66260298064219d7e5e000f43df69d701f7f5e1a0aa886a7a002acbd76d31a28f2197de1dd7d7040d8612f1534
|
7
|
+
data.tar.gz: 1afebaf4facf065c62f25cee5f31242dda91b81bdf0a028058a964b58c4ddff377caec71a2986903c9214a236925607257800f00beff329b203b28e8b58792f5
|
data/bin/share
CHANGED
@@ -20,7 +20,7 @@ class Share < Thor
|
|
20
20
|
puts "Error! Can't find \"#{file}\""
|
21
21
|
end
|
22
22
|
location = "#{Dir.pwd}/#{file}"
|
23
|
-
sha = Digest::SHA1.hexdigest(file)
|
23
|
+
sha = Digest::SHA1.hexdigest(file+"037605")
|
24
24
|
command = "aws s3 cp #{location} s3://xnh/public/#{sha}/#{file} --acl public-read && echo 'https://s3.amazonaws.com/xnh/public/#{sha}/#{file}' | pbcopy && echo 'https://s3.amazonaws.com/xnh/public/#{sha}/#{file}'"
|
25
25
|
exec(command)
|
26
26
|
end
|
@@ -32,16 +32,15 @@ class Share < Thor
|
|
32
32
|
puts "Error! Can't find \"#{file}\""
|
33
33
|
end
|
34
34
|
location = "#{Dir.pwd}/#{file}"
|
35
|
-
sha = Digest::SHA1.hexdigest(file)
|
35
|
+
sha = Digest::SHA1.hexdigest(file+"037605")
|
36
36
|
command = "aws s3 rm s3://xnh/public/#{sha}/#{file} && echo 'DELETED: https://s3.amazonaws.com/xnh/public/#{sha}/#{file}'"
|
37
37
|
exec(command)
|
38
38
|
end
|
39
|
-
|
40
39
|
|
41
40
|
end
|
42
41
|
|
43
42
|
|
44
|
-
|
43
|
+
# Start Thor as usual
|
45
44
|
Share.start
|
46
45
|
|
47
46
|
|