ghcurl 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/ghcurl +11 -6
- data/lib/ghcurl.rb +6 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2238b90c3f61619eb9f28f29ed7f8c877ef524936e394511e95fd9fd239142e
|
4
|
+
data.tar.gz: '0821dc3f69cc443c42d18200c8c92a60415d8bac045de7ac4388e814e08ecca5'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e5c5f13aa7f4a10e5a06daf7bcf3f580ef4f2d05ba0d62bf7ddbcc433f6f840f3fe9027557ee24cb5bcf25a0b9eb2ce2ed3afe6cc412cd5efd1454246cb3a346
|
7
|
+
data.tar.gz: cb845d8d93fdcbc324a2fa3fa3f037049c7e95852c77746ff00207c34839eda761c6e3b84d5723c0052c6d7ec1392b265c3da092b0ba8f70b89135c0bb5d4022
|
data/bin/ghcurl
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
# File : ghcurl.rb
|
4
4
|
# Authors : ccmywish <ccmywish@qq.com>
|
5
5
|
# Created on : <2022-04-12>
|
6
|
-
# Last modified : <2022-04-
|
6
|
+
# Last modified : <2022-04-29>
|
7
7
|
#
|
8
8
|
# ghcurl:
|
9
9
|
#
|
@@ -51,7 +51,11 @@ module Ghcurl
|
|
51
51
|
end
|
52
52
|
|
53
53
|
cmd = "curl -L #{url} --create-dirs -o #{to}"
|
54
|
-
system cmd
|
54
|
+
status = system cmd
|
55
|
+
if status == false || status.nil?
|
56
|
+
log "Download error!"
|
57
|
+
exit
|
58
|
+
end
|
55
59
|
log "Downloaded to #{to}"
|
56
60
|
return to
|
57
61
|
end
|
@@ -155,10 +159,11 @@ module Ghcurl
|
|
155
159
|
doc = Octokit::Client.new.release_for_tag(repo, 'v' + version)
|
156
160
|
end
|
157
161
|
rescue Octokit::NotFound
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
+
log "Not found #{repo} v#{version} !"
|
163
|
+
exit
|
164
|
+
rescue StandardError => e
|
165
|
+
log e
|
166
|
+
exit
|
162
167
|
end
|
163
168
|
|
164
169
|
links = doc.to_hash[:assets]
|
data/lib/ghcurl.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# File : ghcurl.rb
|
3
3
|
# Authors : ccmywish <ccmywish@qq.com>
|
4
4
|
# Created on : <2022-04-12>
|
5
|
-
# Last modified : <2022-04-
|
5
|
+
# Last modified : <2022-04-29>
|
6
6
|
#
|
7
7
|
# ghcurl:
|
8
8
|
#
|
@@ -12,7 +12,7 @@
|
|
12
12
|
|
13
13
|
module Ghcurl
|
14
14
|
|
15
|
-
VERSION = "0.
|
15
|
+
VERSION = "0.8.0"
|
16
16
|
|
17
17
|
end
|
18
18
|
|
@@ -64,5 +64,8 @@ Ghcurl::DEFAULT_WARES = {
|
|
64
64
|
|
65
65
|
scc: 'boyter/scc',
|
66
66
|
rbspy: 'rbspy/rbspy',
|
67
|
-
starship: 'starship/starship'
|
67
|
+
starship: 'starship/starship',
|
68
|
+
|
69
|
+
glow: 'charmbracelet/glow'
|
70
|
+
|
68
71
|
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ghcurl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ccmywish
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: octokit
|