gitee-cli 0.2.0.rc.1 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d467c371c2809e90242a66403acede6456ce30f22223375aeafa393d24e741a2
4
- data.tar.gz: 58b51db8af485df6fd507f39f6afe6e3aa24bc235111b5abbf0dee6132dbd4ff
3
+ metadata.gz: 3152b7535b6e704388456ee6d86f841afa554e54722141e8b7dff4e6b17b9d51
4
+ data.tar.gz: a3c514a46ad51ceae1c315c74154a3ac51c56160e133612da4895d0d24ab4b65
5
5
  SHA512:
6
- metadata.gz: cbd53c4fbdae7a373ce0f8907f9a274d3074bb0a3d97c537d2ff97324d5179f0c4be327f49d8ef0faef6b802fd06ae692be10dd957a2ddf2cfa460df6400f35f
7
- data.tar.gz: 37409fff215e69399610daeaaab272c847918f8a3086780637ed91cd31fdf506a4cfa23d66da73cbbfbdea4fca391bbe92da92e2e336942e3b12da469fbc45f5
6
+ metadata.gz: ecc8fa0820605bedb7af26f7a9227e2a91a654d2a0a01ad342793dfbd761cb975dbef826e1e749ab6eed3d66d39fe37f98079dfefaddae67d0131a30e197718c
7
+ data.tar.gz: ed461d6cac655cf23daad68b271b53b36d2818103d25e93cc1f63aec598cfd042b23dbaa69efb78c00eaedad96e4486a2b2ec0b098c24d18c7b1f6d41ff50197
data/.yardopts ADDED
@@ -0,0 +1,6 @@
1
+ lib
2
+ --type-name-tag HTTP:HTTP method
3
+ -m markdown
4
+ --asset images
5
+ -
6
+ CHANGELOG.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,67 @@
1
+ # Changelog
2
+
3
+ ## [Unreleased](#) (2023-05-19)
4
+
5
+ <br>
6
+
7
+ ## [v0.2.1](#) (2023-05-19)
8
+
9
+ ### Enhancements:
10
+
11
+ - Enhance online docs
12
+
13
+ <br>
14
+
15
+ ## [v0.2.0](#) (2023-05-08)
16
+
17
+ ### New features:
18
+
19
+ - Add `YARD` documents
20
+ - Add authorization `task auth:apply`
21
+ - Support auto refresh access token
22
+
23
+ ### Enhancements:
24
+
25
+ - Reserve temporary authorization `task auth:temp_apply`
26
+ - Load faster
27
+
28
+ ### Deprecations:
29
+
30
+ - Remove support of `GITEE_TOKEN_FILE`
31
+
32
+ <br>
33
+
34
+ ## [v0.1.0](#) (2023-05-01)
35
+
36
+ ### New features:
37
+
38
+ - Get token ~~from file by `GITEE_TOKEN_FILE` or~~ directly from environment variable `GITEE_TOKEN`
39
+
40
+ Not support `GITEE_TOKEN_FILE` since `v0.2.0`
41
+
42
+ - ~~Add compromising method to get token by hand `task auth:apply`~~
43
+
44
+ Changed to `task auth:temp_apply` since `v0.2.0`
45
+
46
+ - Support
47
+
48
+ - `repo:branches`
49
+ - `repo:create`
50
+ - `repo:delete`
51
+ - `repo:view`
52
+ - `repo:list`
53
+
54
+ - Work basically
55
+
56
+ <br>
57
+
58
+ ## [Initialize](#) (2023-04-28)
59
+
60
+ Begin to work.
61
+
62
+ <br>
63
+
64
+ <hr>
65
+
66
+ This Changelog is maintained with [chlog](https://github.com/ccmywish/chlog)
67
+
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present Aoran Zeng. All rights reserved.
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 ADDED
@@ -0,0 +1,86 @@
1
+ # Gitee CLI in Ruby
2
+
3
+ ![Banner](./images/banner.jpg)
4
+
5
+ Work with [Gitee](https://gitee.com/) from the command line.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ $ gem install gitee-cli
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ 开发/维护文档: https://rubydoc.info/gems/gitee-cli
16
+
17
+ <br>
18
+
19
+ 使用`gitee-cli`需要`Gitee Access Token`,我们可以通过以下两种方式实现:
20
+
21
+ ### 方式1(推荐)
22
+
23
+ 正常情况下,您应当使用该方式。在[Gitee个人设置](https://gitee.com/profile/account_information) -> [第三方应用](https://gitee.com/oauth/applications),创建要接入Gitee的应用,我们在此创建一个应用叫做`gitee-cli`,我们填入以下资料:
24
+
25
+ ```bash
26
+ # 应用名称
27
+ gitee-cli
28
+
29
+ # 应用描述
30
+ 第三方Gitee命令行客户端gitee-cli
31
+
32
+ # 应用主页
33
+ https://gitee.com/ccmywish/gitee-cli
34
+
35
+ # 应用回调地址(必填以下内容)
36
+ http://localhost
37
+
38
+ # 权限,一般勾选以下即可
39
+ - user_info
40
+ - projects
41
+ - pull_requests
42
+ - issues
43
+
44
+ # Logo上传gitee-cli的logo即可
45
+ # 使用下面命令下载
46
+ curl -fsSL https://gitee.com/ccmywish/gitee-cli/raw/main/images/AppLogo.jpg -o ~/Desktop/GiteeCLIAppLogo.jpg
47
+ ```
48
+
49
+ 注册完成后,我们会得到`Client ID`和`Client Secret`。最后一步,在命令行上运行:
50
+ ```bash
51
+ # 注意,括号和逗号都是必需的,之间是否空格没有要求
52
+ $ gitee auth:apply[id, secret]
53
+ ```
54
+
55
+ 之后,便可以使用任何其它`gitee`命令了。
56
+
57
+ <br>
58
+
59
+ ### 方式2(临时)
60
+
61
+ 如果您只想临时使用,或者不方便将token等关键信息存储在本机,请运行:
62
+ ```bash
63
+ $ gitee auth:temp_apply
64
+ ```
65
+ 跟随返回的地址申请`token`。
66
+
67
+ 之后,在使用任何其它`gitee`命令时,带上参数`GITEE_TOKEN=xxx`即可,例如:
68
+ ```bash
69
+ $ gitee repo:branches[ccmywish, gitee-cli] GITEE_TOKEN=xxx
70
+ ```
71
+
72
+ ## 命令行
73
+
74
+ ```bash
75
+ gitee -T [pattern] # 显示可执行命令,可以使用pattern来搜索相关命令
76
+
77
+ gitee auth:apply[id,secret] # Apply for an access token using Gitee app
78
+ gitee auth:temp_apply # Apply for an access token temporarily
79
+ gitee repo:branches[user,repo] # Get all branches of a repository
80
+ gitee repo:create[repo] # Create a repository under your space
81
+ gitee repo:delete[user,repo] # Delete the '<user>/<repo>' repository
82
+ gitee repo:list[user] # List repositories owned by user/organization
83
+ gitee repo:view[user,repo] # View the repository's README
84
+ ```
85
+
86
+ <br>
Binary file
data/images/banner.jpg ADDED
Binary file
data/lib/gitee/cli.rb CHANGED
@@ -2,12 +2,11 @@
2
2
  # File : cli.rb
3
3
  # Authors : Aoran Zeng <ccmywish@qq.com>
4
4
  # Created on : <2023-04-28>
5
- # Last modified : <2023-05-08>
5
+ # Last modified : <2023-05-19>
6
6
  #
7
7
  # cli:
8
8
  #
9
9
  # Comamnd line processing by first hand
10
- #
11
10
  # ---------------------------------------------------------------
12
11
 
13
12
  require 'rake'
@@ -32,7 +31,7 @@ module Gitee
32
31
  module CLI
33
32
 
34
33
  # gitee-cli version
35
- VERSION = "0.2.0.rc.1"
34
+ VERSION = "0.2.1"
36
35
 
37
36
  DEFAULT_TOKEN_DIR = File.join ENV['AppData'], "Gitee CLI in Ruby"
38
37
  DEFAULT_TOKEN_FILE = File.join DEFAULT_TOKEN_DIR, "sec.json"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitee-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0.rc.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aoran Zeng
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-05-08 00:00:00.000000000 Z
11
+ date: 2023-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -75,7 +75,13 @@ executables:
75
75
  extensions: []
76
76
  extra_rdoc_files: []
77
77
  files:
78
+ - ".yardopts"
79
+ - CHANGELOG.md
80
+ - LICENSE.txt
81
+ - README.md
78
82
  - exe/gitee
83
+ - images/AppLogo.jpg
84
+ - images/banner.jpg
79
85
  - lib/gitee-cli.rb
80
86
  - lib/gitee/cli.rb
81
87
  - lib/gitee/cli/Rakefile
@@ -85,8 +91,8 @@ homepage: https://gitee.com/ccmywish
85
91
  licenses:
86
92
  - MIT
87
93
  metadata:
88
- bug_tracker_uri: https://gitee.com/ccmywish
89
- source_code_uri: https://gitee.com/ccmywish
94
+ bug_tracker_uri: https://gitee.com/ccmywish/gitee-cli/issues
95
+ source_code_uri: https://gitee.com/ccmywish/gitee-cli
90
96
  post_install_message:
91
97
  rdoc_options: []
92
98
  require_paths:
@@ -98,12 +104,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
104
  version: 3.1.0
99
105
  required_rubygems_version: !ruby/object:Gem::Requirement
100
106
  requirements:
101
- - - ">"
107
+ - - ">="
102
108
  - !ruby/object:Gem::Version
103
- version: 1.3.1
109
+ version: '0'
104
110
  requirements: []
105
111
  rubygems_version: 3.4.8
106
112
  signing_key:
107
113
  specification_version: 4
108
- summary: 'gitee-cli: Gitee command line tools (3rd party client)'
114
+ summary: Unofficial Gitee command line client
109
115
  test_files: []