ghcurl 0.8.1 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +21 -0
- data/Gemfile +6 -6
- data/LICENSE +22 -22
- data/README.md +100 -103
- data/Rakefile +3 -3
- data/bin/ghcurl +584 -525
- data/ghcurl.gemspec +40 -0
- data/lib/ghcurl.rb +78 -71
- metadata +10 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: edbcc9cb12f78e6ee6c9ca4e5c169394d023f186e0264cf4fbdca25451e6c4d9
|
4
|
+
data.tar.gz: 2d9995452fdb4ba0d9571167575e9883019f5b53472fb966555d8fabef6b7aaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 826db033d57b63ef28aacfdf58309ba582b8781236c337b377232b4202e9e600d8cb2d5a07f01c2e1319299ebee14998b90c0ef105e560ff7968252ac04cbdc9
|
7
|
+
data.tar.gz: a34e89d3930fa6840d71ccb2207704d9cef375d1339b1d6b9850863ff23bcdad91f07fc793a352a5fc57e6162aa62d37198e6cc9ee51521e509f25643388e684
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## [Unreleased](#) (2022-11-13)
|
4
|
+
|
5
|
+
### Enhancements:
|
6
|
+
|
7
|
+
- Update gem 'octokit' from 4.22 to 6.0
|
8
|
+
- Add Windows support
|
9
|
+
|
10
|
+
<br>
|
11
|
+
|
12
|
+
## [Initialize](#) (2022-04-12)
|
13
|
+
|
14
|
+
Initialize the project.
|
15
|
+
|
16
|
+
<br>
|
17
|
+
|
18
|
+
<hr>
|
19
|
+
|
20
|
+
This Changelog is maintained with [chlog](https://github.com/ccmywish/chlog)
|
21
|
+
|
data/Gemfile
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
# Specify your gem's dependencies in ghcurl.gemspec
|
6
|
-
gemspec
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source "https://rubygems.org"
|
4
|
+
|
5
|
+
# Specify your gem's dependencies in ghcurl.gemspec
|
6
|
+
gemspec
|
data/LICENSE
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
MIT License
|
2
|
-
|
3
|
-
Copyright (c) 2022 ccmywish
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
-
a copy of this software and associated documentation files (the
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
11
|
-
the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be
|
14
|
-
included in all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2022 ccmywish
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,103 +1,100 @@
|
|
1
|
-
<div align="center">
|
2
|
-
|
3
|
-
# ghcurl
|
4
|
-
|
5
|
-
[![Gem Version](https://badge.fury.io/rb/ghcurl.svg)](https://rubygems.org/gems/ghcurl)
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
# It
|
55
|
-
ghcurl
|
56
|
-
|
57
|
-
#
|
58
|
-
ghcurl
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
```
|
63
|
-
|
64
|
-
|
65
|
-
```
|
66
|
-
|
67
|
-
|
68
|
-
```
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
#
|
73
|
-
ghcurl gh
|
74
|
-
|
75
|
-
# Download to /
|
76
|
-
ghcurl
|
77
|
-
|
78
|
-
# Download
|
79
|
-
ghcurl rbspy/rbspy 'x86_64.*linux'
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
```
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
# Install to /
|
88
|
-
ghcurl
|
89
|
-
|
90
|
-
#
|
91
|
-
ghcurl
|
92
|
-
|
93
|
-
#
|
94
|
-
ghcurl
|
95
|
-
|
96
|
-
#
|
97
|
-
ghcurl dlvhdr/gh-dash linux-amd64 -i
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
```
|
102
|
-
|
103
|
-
<br>
|
1
|
+
<div align="center">
|
2
|
+
|
3
|
+
# ghcurl
|
4
|
+
|
5
|
+
[![Gem Version](https://badge.fury.io/rb/ghcurl.svg)](https://rubygems.org/gems/ghcurl)
|
6
|
+
|
7
|
+
Download files and install from Github releases. It works on Linux, Windows, macOS and maybe Other OSes.
|
8
|
+
|
9
|
+
```bash
|
10
|
+
gem install ghcurl
|
11
|
+
```
|
12
|
+
|
13
|
+
</div>
|
14
|
+
|
15
|
+
`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.
|
16
|
+
|
17
|
+
<br>
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
```bash
|
22
|
+
$ ghcurl [user/]repo [regexp] [options]
|
23
|
+
```
|
24
|
+
|
25
|
+
**-o**
|
26
|
+
|
27
|
+
This is optional, download will default to `~/.cache/ghcurl`
|
28
|
+
1. `-o path` Download into path
|
29
|
+
2. `-o path/name` Download as path/name
|
30
|
+
|
31
|
+
**-v**
|
32
|
+
1. `-v 1.0.0` Download tag version 1.0.0
|
33
|
+
2. `-v3.1.4` This is also OK to download tag version 3.1.4
|
34
|
+
|
35
|
+
**-i**
|
36
|
+
1. `-i` Install to `/usr/local/bin` or `GHCURL_BIN_PATH`
|
37
|
+
2. `-i path` Install to path
|
38
|
+
|
39
|
+
**-r**
|
40
|
+
1. `-r name` Install the binary as name
|
41
|
+
|
42
|
+
<br>
|
43
|
+
|
44
|
+
## Example
|
45
|
+
|
46
|
+
Things can be easier. We consider these as popular binaries: https://github.com/ibraheemdev/modern-unix
|
47
|
+
|
48
|
+
Notice: `-i` means to install.
|
49
|
+
|
50
|
+
```bash
|
51
|
+
# It knows that's sharkdp/fd
|
52
|
+
ghcurl fd -i
|
53
|
+
|
54
|
+
# It's cli/cli !
|
55
|
+
ghcurl gh -i
|
56
|
+
|
57
|
+
# Much easier to install rbspy!
|
58
|
+
ghcurl rbspy -i
|
59
|
+
```
|
60
|
+
|
61
|
+
Download latest deb/rpm package and install, notice the argument `deb` / `rpm` are just regular expressions.
|
62
|
+
```bash
|
63
|
+
ghcurl cli/cli deb -i
|
64
|
+
ghcurl cli/cli rpm -i
|
65
|
+
```
|
66
|
+
|
67
|
+
Normal download
|
68
|
+
```bash
|
69
|
+
# The easiest way to download
|
70
|
+
ghcurl gh
|
71
|
+
|
72
|
+
# Download to /tmp
|
73
|
+
ghcurl gh -o /tmp
|
74
|
+
|
75
|
+
# Download latest rbspy-x86_64-unknown-linux-gnu.tar.gz to ~/.cache/ghcurl
|
76
|
+
ghcurl rbspy/rbspy 'x86_64.*linux'
|
77
|
+
|
78
|
+
# Download rbspy version 0.11.1
|
79
|
+
ghcurl rbspy/rbspy 'x86_64.*linux' -v0.11.1
|
80
|
+
```
|
81
|
+
|
82
|
+
Download a binary and install it to anywhere
|
83
|
+
```bash
|
84
|
+
# Install to /usr/local/bin
|
85
|
+
ghcurl starship linux-gnu -i
|
86
|
+
|
87
|
+
# Install to ~/tmp/bin
|
88
|
+
ghcurl BetaPictoris/timeleft -i ~/tmp/bin
|
89
|
+
|
90
|
+
# Download as /tmp/github-cli and install
|
91
|
+
ghcurl gh -o /tmp/github-cli -i
|
92
|
+
|
93
|
+
# Install and rename it to, here, 'tldr' in /usr/local/bin
|
94
|
+
ghcurl dbrgn/tealdeer x86_64 -i -r 'tldr'
|
95
|
+
|
96
|
+
# or, like this
|
97
|
+
ghcurl dlvhdr/gh-dash linux-amd64 -i ~/tmp/bin/gd
|
98
|
+
```
|
99
|
+
|
100
|
+
<br>
|
data/Rakefile
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
task default: %i[]
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
task default: %i[]
|