ghcurl 0.8.1 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (10) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/Gemfile +6 -6
  4. data/LICENSE +22 -22
  5. data/README.md +102 -103
  6. data/Rakefile +3 -3
  7. data/bin/ghcurl +584 -525
  8. data/ghcurl.gemspec +40 -0
  9. data/lib/ghcurl.rb +79 -71
  10. metadata +10 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c0e61752e6dd439bf1d0f6f08dc55bf4c2e956df4ec8b07330fa19d75b463cc
4
- data.tar.gz: 5ac05c87788fac6b3574f843cf4a3f7652e3146d9302cf3a56b1ae87347eb093
3
+ metadata.gz: 66d379bffcc0e6eb6439349e0a0e7b738c8b23f2a752d7246df6cf9e3186be5d
4
+ data.tar.gz: 625dad075628b20b39c8481986be7a174d5c617a11be15ead35d7e3168aedd2f
5
5
  SHA512:
6
- metadata.gz: 274ee82a30fe217f1b4654188145f0587c9165ff56e808a101152e957964a73159ab1b8eb995eb9324ef31901a1ebcd450a580d90a43966466979559a08beceb
7
- data.tar.gz: 930fd4563cf8fa781ce8e0e0c5403e9f5dac769920b41d7a927bb5d7f76ffcea4ef68ea308be12c57165dfdc0a2ffb707c2ab6b11e45101dd7b023bee42c58dd
6
+ metadata.gz: 757a89f46b1e133a46944f9a4515c22b83bbd5337e61b9d82bd8c4155b24b54bbeb36da79bed0d9ff12316be1c58e26d9dd92ae86d6ed92f87df64262d3796ca
7
+ data.tar.gz: 154de96859d2ab27eba969c159dc7d461c710184a69021c59cfe424de5b8da83f250be2d3981e9d5594e2392dab4b5fa5400467e6fd03c66360468c6b77900ef
data/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased](#) (2022-11-13)
4
+
5
+ <br>
6
+
7
+ ## [v0.9.0](#) (2022-11-13)
8
+
9
+ ### Enhancements:
10
+
11
+ - Update gem 'octokit' from 4.22 to 6.0
12
+ - Add Windows support
13
+
14
+ <br>
15
+
16
+ ## [Initialize](#) (2022-04-12)
17
+
18
+ Initialize the project.
19
+
20
+ <br>
21
+
22
+ <hr>
23
+
24
+ This Changelog is maintained with [chlog](https://github.com/ccmywish/chlog)
25
+
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,102 @@
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
- Download files and install from Github releases.
9
-
10
- ```bash
11
- gem install ghcurl
12
- ```
13
-
14
- </div>
15
-
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.
17
-
18
- Note it doesn't work on Windows.
19
-
20
- <br>
21
-
22
- ## Usage
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
-
64
- Download latest deb/rpm package and install, notice the argument `deb` / `rpm` are just regular expressions.
65
- ```bash
66
- ghcurl cli/cli deb -i
67
- ghcurl cli/cli rpm -i
68
- ```
69
-
70
- Normal download
71
- ```bash
72
- # The easiest way to download
73
- ghcurl gh
74
-
75
- # Download to /tmp
76
- ghcurl gh -o /tmp
77
-
78
- # Download latest rbspy-x86_64-unknown-linux-gnu.tar.gz to ~/.cache/ghcurl
79
- ghcurl rbspy/rbspy 'x86_64.*linux'
80
-
81
- # Download rbspy version 0.11.1
82
- ghcurl rbspy/rbspy 'x86_64.*linux' -v0.11.1
83
- ```
84
-
85
- Download a binary and install it to anywhere
86
- ```bash
87
- # Install to /usr/local/bin
88
- ghcurl starship linux-gnu -i
89
-
90
- # Install to ~/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
95
-
96
- # Install and rename it to, here, 'gd' in /usr/local/bin
97
- ghcurl dlvhdr/gh-dash linux-amd64 -i -r 'gd'
98
-
99
- # or, like this
100
- ghcurl dlvhdr/gh-dash linux-amd64 -i ~/tmp/bin/gd
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.
8
+
9
+ It works on Linux, Windows, macOS and maybe other OSes.
10
+
11
+ ```bash
12
+ gem install ghcurl
13
+ ```
14
+
15
+ </div>
16
+
17
+ `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.
18
+
19
+ <br>
20
+
21
+ ## Usage
22
+
23
+ ```bash
24
+ $ ghcurl [user/]repo [regexp] [options]
25
+ ```
26
+
27
+ **-o**
28
+
29
+ This is optional, download will default to `~/.cache/ghcurl`
30
+ 1. `-o path` Download into path
31
+ 2. `-o path/name` Download as path/name
32
+
33
+ **-v**
34
+ 1. `-v 1.0.0` Download tag version 1.0.0
35
+ 2. `-v3.1.4` This is also OK to download tag version 3.1.4
36
+
37
+ **-i**
38
+ 1. `-i` Install to `/usr/local/bin` or `GHCURL_BIN_PATH`
39
+ 2. `-i path` Install to path
40
+
41
+ **-r**
42
+ 1. `-r name` Install the binary as name
43
+
44
+ <br>
45
+
46
+ ## Example
47
+
48
+ Things can be easier. We consider these as popular binaries: https://github.com/ibraheemdev/modern-unix
49
+
50
+ Notice: `-i` means to install.
51
+
52
+ ```bash
53
+ # It knows that's sharkdp/fd
54
+ ghcurl fd -i
55
+
56
+ # It's cli/cli !
57
+ ghcurl gh -i
58
+
59
+ # Much easier to install rbspy!
60
+ ghcurl rbspy -i
61
+ ```
62
+
63
+ Download latest deb/rpm package and install, notice the argument `deb` / `rpm` are just regular expressions.
64
+ ```bash
65
+ ghcurl cli/cli deb -i
66
+ ghcurl cli/cli rpm -i
67
+ ```
68
+
69
+ Normal download
70
+ ```bash
71
+ # The easiest way to download
72
+ ghcurl gh
73
+
74
+ # Download to /tmp
75
+ ghcurl gh -o /tmp
76
+
77
+ # Download latest rbspy-x86_64-unknown-linux-gnu.tar.gz to ~/.cache/ghcurl
78
+ ghcurl rbspy/rbspy 'x86_64.*linux'
79
+
80
+ # Download rbspy version 0.11.1
81
+ ghcurl rbspy/rbspy 'x86_64.*linux' -v0.11.1
82
+ ```
83
+
84
+ Download a binary and install it to anywhere
85
+ ```bash
86
+ # Install to /usr/local/bin
87
+ ghcurl starship linux-gnu -i
88
+
89
+ # Install to ~/tmp/bin
90
+ ghcurl BetaPictoris/timeleft -i ~/tmp/bin
91
+
92
+ # Download as /tmp/github-cli and install
93
+ ghcurl gh -o /tmp/github-cli -i
94
+
95
+ # Install and rename it to, here, 'tldr' in /usr/local/bin
96
+ ghcurl dbrgn/tealdeer x86_64 -i -r 'tldr'
97
+
98
+ # or, like this
99
+ ghcurl dlvhdr/gh-dash linux-amd64 -i ~/tmp/bin/gd
100
+ ```
101
+
102
+ <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[]