ghcurl 0.7.1 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/ghcurl +11 -6
  3. data/lib/ghcurl.rb +6 -3
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fec37deabe100d853deadbbf290658a5336a3ea0570948a0247a0f9fe6ece0c5
4
- data.tar.gz: 48eddecd5fa148528eee00072e1270ec7a5af4d4bea22a942d84f2e27f1da3ef
3
+ metadata.gz: a2238b90c3f61619eb9f28f29ed7f8c877ef524936e394511e95fd9fd239142e
4
+ data.tar.gz: '0821dc3f69cc443c42d18200c8c92a60415d8bac045de7ac4388e814e08ecca5'
5
5
  SHA512:
6
- metadata.gz: a7d4839bcc4066350d2a8a4fb35364a6d297fc413193bd68e6366f196d60ecccedd4f1a5b8fa2ee17b4e6e653ecb75a94910f4008dbb235f96a8f4e60d890613
7
- data.tar.gz: c0b96d5a08f55fab2d326dcc69b4703b7852c44eb61f5ce9dc30c2cba5eea357e47790e3830ec775ea11f7a38ec64faaf962aff88d092d144d7e60b8acaeda07
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-26>
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
- puts "ghcurl: Not found #{repo} v#{version} !"
159
- rescue Error => e
160
- puts e
161
- exit 0
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-26>
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.7.1"
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.7.1
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-26 00:00:00.000000000 Z
11
+ date: 2022-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: octokit