ghcurl 0.5.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +61 -7
  3. data/bin/ghcurl +251 -101
  4. data/lib/ghcurl.rb +6 -3
  5. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9b4840d95efdb75df9837f357689f9a4e1de17d22149d95a0843d26925923341
4
- data.tar.gz: 13f087583da4f41ff0e94be251e74fe565981e8c01e73867a1be0e25ab88065f
3
+ metadata.gz: efa8ec89c9537aeb042258adb82a8b4c5b5906fee9f75d1ac348bb59d98095a7
4
+ data.tar.gz: a95f9e3385e1bb9766c1b807520ae191f768801e83fffe29a7231a10f4926cf8
5
5
  SHA512:
6
- metadata.gz: be2b7c9bd8de0b137d8bdd07d49bdb9a30a3906e8034e87ac850047809ba2ec6dc24909b82feed5a53550532001222c0ae999e7441af27322c9ea34d18930289
7
- data.tar.gz: 19d2d408baa93e56c2ce1145b7e2319283f9a18053f0cadf1fe46c9d4139356a7802794c534d5a4b6362189884e0089b2b0248781d800896e550cec1ea2e10a7
6
+ metadata.gz: f1839ed2a13c403b71a7ea01773f7ec9b4b7b13b3a7f2aade2fa567703e46fb3b8b2b05395f17fa690924d93a8c570195b57d733768883f07b6f44aab58c5fb3
7
+ data.tar.gz: b37c28392213b7b0a73343b8fa61399d510edc3ff8fc51758e95e79c10bf30f7188851d3e5df53411b3275bee72980f5f6acf66aa69a3b4a8e57f5c3c6f8bd6b
data/README.md CHANGED
@@ -4,18 +4,63 @@
4
4
 
5
5
  [![Gem Version](https://badge.fury.io/rb/ghcurl.svg)](https://rubygems.org/gems/ghcurl)
6
6
 
7
+
8
+ Download files and install from Github releases.
9
+
7
10
  ```bash
8
11
  gem install ghcurl
9
12
  ```
10
13
 
11
- <br>
14
+ </div>
12
15
 
13
- Download files (and install) from Github releases.
16
+ `ghcurl` can recognize your OS and arch, give you the proper option to download. You can search by regular expression, specify a version, and install it to a path or according to the environment variable `GHCURL_BIN_PATH` or just `/usr/local/bin`. It will automatically extract a tar/zip file to make the installation process better.
14
17
 
15
- </div>
18
+ Note it doesn't work on Windows.
19
+
20
+ <br>
16
21
 
17
22
  ## Usage
18
23
 
24
+ ```bash
25
+ $ ghcurl [user/]repo [regexp] [options]
26
+ ```
27
+
28
+ **-o**
29
+
30
+ This is optional, download will default to `~/.cache/ghcurl`
31
+ 1. `-o path` Download into path
32
+ 2. `-o path/name` Download as path/name
33
+
34
+ **-v**
35
+ 1. `-v 1.0.0` Download tag version 1.0.0
36
+ 2. `-v3.1.4` This is also OK to download tag version 3.1.4
37
+
38
+ **-i**
39
+ 1. `-i` Install to `/usr/local/bin` or `GHCURL_BIN_PATH`
40
+ 2. `-i path` Install to path`
41
+
42
+ **-r**
43
+ 1. `-r name` Install the binary as name
44
+
45
+ <br>
46
+
47
+ ## Example
48
+
49
+ Things can be easier. We consider these as popular binaries: https://github.com/ibraheemdev/modern-unix
50
+
51
+ Notice: `-i` means to install.
52
+
53
+ ```bash
54
+ # It knows that's sharkdp/fd
55
+ ghcurl fd -i
56
+
57
+ # It's cli/cli !
58
+ ghcurl gh -i
59
+
60
+ # Much easier to install rbspy!
61
+ ghcurl rbspy -i
62
+ ```
63
+
19
64
  Download latest deb/rpm package and install, notice the argument `deb` / `rpm` are just regular expressions.
20
65
  ```bash
21
66
  ghcurl cli/cli deb -i
@@ -24,8 +69,14 @@ ghcurl cli/cli rpm -i
24
69
 
25
70
  Normal download
26
71
  ```bash
72
+ # The easiest way to download
73
+ ghcurl gh
74
+
75
+ # Download to /tmp
76
+ ghcurl gh -o /tmp
77
+
27
78
  # Download latest rbspy-x86_64-unknown-linux-gnu.tar.gz to ~/.cache/ghcurl
28
- ghcurl rbspy/rbspy x86_64.*linux
79
+ ghcurl rbspy/rbspy 'x86_64.*linux'
29
80
 
30
81
  # Download rbspy version 0.11.1
31
82
  ghcurl rbspy/rbspy 'x86_64.*linux' -v0.11.1
@@ -34,13 +85,16 @@ ghcurl rbspy/rbspy 'x86_64.*linux' -v0.11.1
34
85
  Download a binary and install it to anywhere
35
86
  ```bash
36
87
  # Install to /usr/local/bin
37
- ghcurl BetaPictoris/timeleft timeleft -i
88
+ ghcurl starship linux-gnu -i
38
89
 
39
90
  # Install to ~/tmp/bin
40
- ghcurl BetaPictoris/timeleft timeleft -i ~/tmp/bin
91
+ ghcurl BetaPictoris/timeleft -i ~/tmp/bin
92
+
93
+ # Download as /tmp/github-cli and install
94
+ ghcurl gh -o /tmp/github-cli -i
41
95
 
42
96
  # Install and rename it to, here, 'gd' in /usr/local/bin
43
- ghcurl dlvhdr/gh-dash linux-amd64 -i gd
97
+ ghcurl dlvhdr/gh-dash linux-amd64 -i -r 'gd'
44
98
 
45
99
  # or, like this
46
100
  ghcurl dlvhdr/gh-dash linux-amd64 -i ~/tmp/bin/gd
data/bin/ghcurl CHANGED
@@ -3,24 +3,23 @@
3
3
  # File : ghcurl.rb
4
4
  # Authors : ccmywish <ccmywish@qq.com>
5
5
  # Created on : <2022-04-12>
6
- # Last modified : <2022-04-14>
6
+ # Last modified : <2022-04-26>
7
7
  #
8
8
  # ghcurl:
9
9
  #
10
- # Download files (and install) from Github releases
10
+ # Download files and install from Github releases
11
11
  #
12
12
  # ------------------------------------------------------
13
13
 
14
14
  require 'ghcurl'
15
- require 'nokogiri'
16
- require 'open-uri'
17
15
  require 'highline'
18
16
  require 'cliswitch'
17
+ require 'fileutils'
19
18
 
20
19
  module Ghcurl
21
20
 
22
21
  WAREHOUSE = File.expand_path("~/.cache/ghcurl")
23
- BIN_PATH = ENV['GHCURL_BIN_PATH'] || "/usr/local/bin"
22
+ BIN_PATH = ENV['GHCURL_BIN_PATH'].chomp('/') || "/usr/local/bin"
24
23
  HL = HighLine.new
25
24
 
26
25
  class Error < StandardError; end
@@ -36,14 +35,25 @@ module Ghcurl
36
35
  end
37
36
 
38
37
 
39
- def curl(url, name)
40
- #if !test('d', WAREHOUSE)
41
- # require 'fileutils'
42
- # FileUtils.mkdir_p(WAREHOUSE)
43
- #end
44
- cmd = "curl -L #{url} --create-dirs -o #{WAREHOUSE}/#{name}"
38
+ #
39
+ # @return absolute download path
40
+ #
41
+ def curl(url, name, to)
42
+ if to == nil
43
+ to = WAREHOUSE + '/' + name
44
+ elsif test 'd', to
45
+ to = to.chomp('/') + '/' + name
46
+ elsif to.include?('/')
47
+ # noop
48
+ else
49
+ # just a rename in WAREHOUSE
50
+ to = WAREHOUSE + '/' + name
51
+ end
52
+
53
+ cmd = "curl -L #{url} --create-dirs -o #{to}"
45
54
  system cmd
46
- log "Downloaded to #{WAREHOUSE}/#{name}"
55
+ log "Downloaded to #{to}"
56
+ return to
47
57
  end
48
58
 
49
59
 
@@ -58,7 +68,8 @@ module Ghcurl
58
68
 
59
69
  oses = [
60
70
  ['linux'],
61
- ['mac', 'apple'],
71
+ ['freebsd'],
72
+ ['mac', 'apple', 'darwin'],
62
73
  ['windows']
63
74
  ]
64
75
 
@@ -115,8 +126,11 @@ module Ghcurl
115
126
  end
116
127
 
117
128
 
118
- def download(repo, regexp, version: nil)
129
+ def download(repo, regexp, version: nil, download_to: nil)
119
130
 
131
+ require 'octokit'
132
+
133
+ # adjust repo name : user/repo
120
134
  if repo =~ /^https:\/\/github.com/
121
135
  require 'uri'
122
136
  uri = URI(repo)
@@ -134,27 +148,32 @@ module Ghcurl
134
148
  end
135
149
 
136
150
  log "checking..."
137
- unless version
138
- doc = Nokogiri::HTML5 URI.open("https://github.com/#{repo}/releases/latest")
139
- else
140
- doc = Nokogiri::HTML5 URI.open("https://github.com/#{repo}/releases/tag/v#{version}")
151
+ begin
152
+ unless version
153
+ doc = Octokit::Client.new.latest_release(repo)
154
+ else
155
+ doc = Octokit::Client.new.release_for_tag(repo, 'v' + version)
156
+ end
157
+ rescue Octokit::NotFound
158
+ puts "ghcurl: Not found #{repo} v#{version} !"
159
+ rescue Error => e
160
+ puts e
161
+ exit 0
141
162
  end
142
163
 
143
-
144
- links = doc.css("li>a[href^='/#{repo}/releases/download']")
164
+ links = doc.to_hash[:assets]
145
165
  if links.empty?
146
- puts doc.css('li a').map(&:to_s)
147
166
  log <<~EOE
148
- The search result is empty, check the args:
167
+ The search result is empty, check the args!
149
168
  repo: #{repo}
150
169
  version: #{version ? version:'nil'}
151
-
170
+
171
+ Maybe there's no assets in this release
152
172
  EOE
153
- puts
173
+ exit 0
154
174
  end
155
175
 
156
-
157
- links = links.map { _1['href'] }
176
+ links = links.map { _1[:browser_download_url] }
158
177
 
159
178
 
160
179
  if regexp
@@ -186,97 +205,220 @@ module Ghcurl
186
205
  end
187
206
  end
188
207
 
189
- url = "https://github.com" + links[0].split('/')[0..-2].join('/') + '/' + link
208
+ url = links[0].split('/')[0..-2].join('/') + '/' + link
190
209
 
191
210
  log "Downloading #{url}"
192
211
 
193
- $downloaded = link.split('/').last
194
-
195
- curl(url, $downloaded)
212
+ dl_name = link.split('/').last
196
213
 
214
+ return curl(url, dl_name, download_to)
197
215
  end
198
216
 
199
217
 
200
- def install(ware, place: BIN_PATH)
218
+ #
219
+ # This function is a little confusing
220
+ #
221
+ # target: The absolute path to a downloaded file
222
+ # name : The software name
223
+ #
224
+ def install(target, rename_as: nil, install_to: nil)
201
225
 
202
- ware_name = ''
203
- if ware.include?('/')
204
- ware_name = ware.split('/').last
205
- else
206
- ware_name = ware
226
+ if target.end_with?('.deb')
227
+ log "Install the deb package"
228
+ system "sudo dpkg -i #{target}"
229
+ return
230
+ end
231
+
232
+ if target.end_with?('.rpm')
233
+ log "Install the rpm package"
234
+ system "sudo rpm -i #{target}"
235
+ return
236
+ end
237
+
238
+
239
+ if install_to.nil?
240
+ install_to = BIN_PATH
241
+ end
242
+
243
+
244
+ #
245
+ # Handle zip situation
246
+ #
247
+ zip_flag = false
248
+
249
+ if target.match?(/\.zip$/) or target.match?(/\.tar\.(\w){1,3}/)
250
+
251
+ zip_flag = true
252
+
253
+ # unzipped to dir
254
+ unzip_dir = ""
255
+ # unzipped files
256
+ files = ""
257
+ # the target unzipped file name (this includes the path prefix)
258
+ unzip_name = ""
259
+
260
+ # unzip
261
+ if target.match? /\.zip$/
262
+ log "Unzip zip file"
263
+ unzip_dir = target.chomp('.zip')
264
+ system "unzip -q #{target} -d #{unzip_dir}"
207
265
  end
208
266
 
209
- if (! $downloaded.include?(ware_name)) and (!$downloaded.end_with?('.deb')) and (!$downloaded.end_with?('.rpm'))
210
- log "Do you want to rename or install it to a different path?"
211
- re = HL.ask "Input path or name, or just enter to say no."
212
- if !re.empty?
213
- place = re
267
+ # .gz, .bz2, .xz
268
+ if target.match? /\.tar\.(\w){1,3}/
269
+ log "Unzip tar file"
270
+ unzip_dir = target.split('.')[0..-3].join('.')
271
+ FileUtils.mkdir_p(unzip_dir)
272
+ system "tar xf #{target} --directory=#{unzip_dir}"
273
+ end
274
+
275
+
276
+ #
277
+ # @return [Array] file names in the dir
278
+ #
279
+ def _iterate_dir(dir)
280
+ result = []
281
+ chd = Dir.children(dir)
282
+ chd_files = chd.select{|f| File.file? "#{dir}/#{f}"}
283
+
284
+ chd_files.each { result << "#{dir}/#{_1}"[2..] }
285
+
286
+ chd_dirs = chd.select{|d| File.directory?("#{dir}/#{d}") && ( d != '.git')}
287
+ chd_dirs.each do |d|
288
+ sub_dir = "#{dir}/#{d}"
289
+ result.concat _iterate_dir(sub_dir)
214
290
  end
291
+ result
215
292
  end
216
293
 
217
- case RUBY_PLATFORM
218
- when /ucrt/i, /mingw/i
219
- install_on_windows($downloaded, place)
294
+
295
+ Dir.chdir unzip_dir do
296
+ files = _iterate_dir('.')
297
+ end
298
+
299
+
300
+ if files.size > 1
301
+ unzip_name = HL.choose do |menu|
302
+ menu.index_color = :rgb_77bbff
303
+ menu.prompt = "Which one do you want to install? "
304
+ menu.choices( *files )
305
+ end
220
306
  else
221
- install_on_nix($downloaded, place)
307
+ unzip_name = files[0]
222
308
  end
223
- log "Install finish!"
224
- end
309
+
310
+ end # end of zipped file handle
225
311
 
226
312
 
227
- def install_on_nix(ware, place)
313
+ # Get software real name
314
+ if zip_flag
315
+ name = unzip_name.split('/').last
316
+ else
317
+ name = target.split('/').last
318
+ end
228
319
 
229
- target = "#{WAREHOUSE}/#{ware}"
230
320
 
231
- if target.end_with?('.deb')
232
- log "Install deb package for you"
233
- system "sudo dpkg -i #{target}"
234
- return
321
+ if (name.size > 10 ||
322
+ name.include?('.') ||
323
+ name.include?('-') ||
324
+ name.include?('_')) && (not rename_as)
325
+ log "Do you want to rename the '#{name}'?"
326
+ re = HL.ask "Input name, or just leave it blank to say no."
327
+ if !re.empty?
328
+ rename_as = re
329
+ end
235
330
  end
236
331
 
237
- if target.end_with?('.rpm')
238
- log "Install rpm package for you"
239
- system "sudo rpm -i #{target}"
240
- return
332
+
333
+ if zip_flag
334
+ # Now:
335
+ # target is /home/xx/xx.zip
336
+ # unzip_dir is /home/xx/xx
337
+ # unzip_file is abc/cde/file (new target)
338
+ target = unzip_dir + '/' + unzip_name
241
339
  end
242
340
 
341
+ log "Renamed as '#{rename_as}'" if rename_as
243
342
 
244
- if test 'd', place
245
- cmd = "sudo install -Dt #{place} -m 755 #{target} "
246
- system cmd
247
- log "Install #{ware} to " + place
248
343
 
344
+ case RUBY_PLATFORM
345
+ when /ucrt/i, /mingw/i
346
+ install_on_windows(target, name, install_to, rename_as)
249
347
  else
250
- unless place.include?('/')
251
- # User just give it another name
252
- place = BIN_PATH + '/' + place
348
+ install_on_nix(target, name, install_to, rename_as)
349
+ end
350
+ end
351
+
352
+
353
+ #
354
+ # @param target [String] the absulute path of to be installed software
355
+ # @param name [String] the name of the software
356
+ #
357
+ def install_on_nix(target, name, install_to, rename_as)
358
+ install_to = install_to.chomp('/')
359
+
360
+ if test 'd', install_to
361
+ log "Ready to install #{name}"
362
+ if rename_as
363
+ dest = "#{install_to}/#{rename_as}"
364
+ system "sudo cp #{target} " + dest
365
+ system "sudo chmod +x " + dest
366
+ log "Installed as " + dest
253
367
  else
254
- # User give it a path and its name
368
+ cmd = "sudo install -Dt #{install_to} -m 755 #{target} "
369
+ system cmd
370
+ log "Install #{name} to " + install_to
255
371
  end
256
- log "Installed as " + place
257
- system "sudo cp #{target} #{place}"
258
- system "sudo chmod +x #{place}"
372
+ log "Install finish!"
373
+ else
374
+ log "#{install_to} is not a directory!"
259
375
  end
260
376
 
261
377
  end
262
378
 
263
379
 
264
- def install_on_windows
265
- log "Sorry, not implemented yet!"
380
+ def install_on_windows(target, name, install_to, rename_as)
381
+ log "Sorry, not implemented yet on Windows! Can you help?"
266
382
  end
267
383
 
268
384
 
385
+ #
386
+ # For -l option
387
+ #
269
388
  def list_wares
270
-
271
- puts blue("In #{WAREHOUSE}")
272
- puts
389
+ puts blue("ghcurl: #{WAREHOUSE}")
273
390
  Dir.children(WAREHOUSE).each_with_index do |dict,i|
274
- puts " #{blue(i+1)}. #{bold(green(dict))}"
391
+ puts "#{blue(i+1)}. #{bold(green(dict))}"
275
392
  end
276
- puts
277
393
  end
278
394
 
279
395
 
396
+ #
397
+ # For -d option
398
+ #
399
+ def delete_wares(name)
400
+ begin
401
+
402
+ if name.nil?
403
+ re = HL.ask "Do you want to delete all downloaded files?"
404
+ case re.downcase
405
+ when '','y','ye','yes','true'
406
+ FileUtils.rm_rf WAREHOUSE
407
+ log "Delete all done"
408
+ end
409
+ else
410
+ FileUtils.rm WAREHOUSE + '/' + name
411
+ log "Delete #{name} done"
412
+ end
413
+
414
+ rescue Exception => e
415
+ puts bold(red("ghcurl: #{e}"))
416
+ list_wares
417
+ end
418
+
419
+ end # end def delete_wares
420
+
421
+
280
422
  def help
281
423
  puts <<~EOC
282
424
  ghcurl (v#{VERSION}): Download files and install from Github releases
@@ -284,18 +426,21 @@ module Ghcurl
284
426
  Default install to env 'GHCURL_BIN_PATH' or /usr/local/bin
285
427
 
286
428
  usage:
287
- ghcurl [user]/repo [regexp] => Search latest version with regexp to download
288
- ghcurl repo [re] -v tag => Download a specific tag version
289
- ghcurl repo [deb/rpm] => Download and install deb/rpm package
290
- ghcurl repo [re] -i [path] => Download and install to path
291
- ghcurl repo [re] -i name => Download and install as 'name'
292
- ghcurl -l => List downloaded files
293
- ghcurl -h => Print this help
429
+ ghcurl [user]/repo [regexp] => Search latest version with regexp to download
430
+ ghcurl repo [re] -v tag => Download a specific tag version
431
+ ghcurl repo [re] -o [path] => Download into path or rename
432
+ ghcurl repo [re] -i [path] => Download and install to path
433
+ ghcurl repo [re] -o [path] -i => Download into path and install
434
+ ghcurl repo [re] -i -r name => Download and install as 'name'
435
+ ghcurl -l => List downloaded files
436
+ ghcurl -d [name] => Delete a downloaded file or all
437
+ ghcurl -h => Print this help
294
438
 
295
439
  example:
296
440
  ghcurl bat => Search sharkdp/bat the latest
297
441
  ghcurl cli deb -i => Search cli/cli /deb/
298
442
  ghcurl rbspy/rbspy 'x86_64.*linux' -v0.11.1
443
+ ghcurl dlvhdr/gh-dash linux-amd64 -i -r 'gd'
299
444
 
300
445
  EOC
301
446
  end
@@ -309,30 +454,30 @@ end
309
454
  ####################
310
455
  extend Ghcurl
311
456
 
312
- CO = CliSwitch::Option
313
- op_config = [] << CO.new(name: 'install', short: '-i', arg_required: 'optional') <<
314
- CO.new(name: 'version', short: '-v', arg_required: 'required') <<
315
- CO.new(name: 'help', short: '-h', long: '--help', arg_required: 'noarg') <<
316
- CO.new(name: 'list', short: '-l', arg_required: 'noarg')
457
+ class Ghcurl::CLI < CliSwitch
458
+ option name: 'install', short: '-i', arg_required: 'optional'
459
+ option name: 'output', short: '-o', long: '--output', arg_required: 'required'
460
+ option name: 'rename', short: '-r', arg_required: 'required'
461
+ option name: 'version', short: '-v', arg_required: 'required'
462
+ option name: 'help', short: '-h', long: '--help', arg_required: 'noarg'
463
+ option name: 'list', short: '-l', arg_required: 'noarg'
464
+ option name: 'delete', short: '-d', arg_required: 'optional'
465
+ end
317
466
 
318
- cli = CliSwitch.new(op_config)
319
- args, opts = cli.parse(ARGV)
467
+ args, opts = Ghcurl::CLI.new.parse(ARGV)
320
468
 
321
469
  if args.empty? and opts.empty?
322
470
  help
323
471
  exit
324
472
  end
325
473
 
326
- if args.size >= 2
327
- repo_or_name, regexp = args[0], args[1]
328
- else
329
- repo_or_name, regexp = args[0], nil
330
- end
331
-
332
474
 
475
+ repo_or_name, regexp = args[0], args[1]
333
476
  version = nil
334
477
  need_install = false
478
+ download_to = nil
335
479
  install_to = nil
480
+ rename_as = nil
336
481
 
337
482
  opts.each do
338
483
  case _1.name
@@ -342,11 +487,18 @@ opts.each do
342
487
  when 'list'
343
488
  list_wares
344
489
  exit
490
+ when 'delete'
491
+ delete_wares(_1.next_arg)
492
+ exit
345
493
  when 'version'
346
494
  version = _1.next_arg
495
+ when 'output'
496
+ download_to = _1.next_arg
347
497
  when 'install'
348
498
  need_install = true
349
499
  install_to = _1.next_arg
500
+ when 'rename'
501
+ rename_as = _1.next_arg
350
502
  end
351
503
  end
352
504
 
@@ -354,16 +506,14 @@ end
354
506
  # p repo_or_name
355
507
  # p regexp
356
508
  # p need_install
509
+ # p download_to
357
510
  # p install_to
511
+ # p rename_as
358
512
 
359
513
  begin
360
- download(repo_or_name, regexp, version: version)
514
+ ware = download(repo_or_name, regexp, version: version, download_to: download_to)
361
515
  if need_install
362
- if install_to
363
- install(repo_or_name, place: install_to)
364
- else
365
- install(repo_or_name)
366
- end
516
+ install(ware, rename_as: rename_as, install_to: install_to)
367
517
  end
368
518
  rescue Interrupt
369
519
  end
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-14>
5
+ # Last modified : <2022-04-26>
6
6
  #
7
7
  # ghcurl:
8
8
  #
@@ -12,7 +12,7 @@
12
12
 
13
13
  module Ghcurl
14
14
 
15
- VERSION = "0.5.0"
15
+ VERSION = "0.7.0"
16
16
 
17
17
  end
18
18
 
@@ -24,6 +24,7 @@ end
24
24
  Ghcurl::DEFAULT_WARES = {
25
25
 
26
26
  cli: 'cli/cli',
27
+ gh: 'cli/cli',
27
28
 
28
29
  fd: 'sharkdp/fd',
29
30
  bat: 'sharkdp/bat',
@@ -61,5 +62,7 @@ Ghcurl::DEFAULT_WARES = {
61
62
  xh: 'ducaale/xh',
62
63
  zoxide: 'ajeetdsouza/zoxide',
63
64
 
64
- scc: 'boyter/scc'
65
+ scc: 'boyter/scc',
66
+ rbspy: 'rbspy/rbspy',
67
+ starship: 'starship/starship'
65
68
  }
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ghcurl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.7.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-13 00:00:00.000000000 Z
11
+ date: 2022-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: nokogiri
14
+ name: octokit
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: '4.22'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.13'
26
+ version: '4.22'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: highline
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.2'
47
+ version: 0.3.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.2'
54
+ version: 0.3.0
55
55
  description: Download files (and install) from Github releases.
56
56
  email:
57
57
  - ccmywish@qq.com
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  requirements: []
91
- rubygems_version: 3.3.7
91
+ rubygems_version: 3.3.11
92
92
  signing_key:
93
93
  specification_version: 4
94
94
  summary: Download files (and install) from Github releases