gitea-client 0.9.2 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/gitea-client.gemspec +1 -1
- data/lib/gitea/api/client.rb +0 -1
- data/lib/gitea/api/http.rb +5 -1
- data/lib/gitea/api/repository.rb +0 -64
- data/lib/gitea/api/user.rb +0 -4
- data/lib/gitea/api.rb +0 -1
- data/lib/gitea/version.rb +1 -1
- metadata +3 -4
- data/lib/gitea/api/activity.rb +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 605d11fb123f4c898b008d3da526274385664c501355b3d872d2c378d20f9de1
|
4
|
+
data.tar.gz: 1b7f6891a857fb252d4edb5ab6c7b70bffa17388bb50555ae1b7b6c8dd88dcdc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c176deaccda27b95ada570893d800eb2744948c65e103698381e3356d9299b48be947c94b5a5dcaf5084715eccc32c4870fbbeead5ec1da13c7f83e19882b136
|
7
|
+
data.tar.gz: 391aaac009078324bd447c07bcb0c24463b9c32b8058aea148c5ed3f636cc1313cb20e3296463ac6b377cc98e74f17aa632dd1d0a666a253d40698e327e7778d
|
data/Gemfile.lock
CHANGED
data/gitea-client.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.description = ""
|
13
13
|
spec.homepage = "https://github.com/viletyy/gitea-client"
|
14
14
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = ">= 2.
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
16
16
|
|
17
17
|
spec.metadata["homepage_uri"] = spec.homepage
|
18
18
|
spec.metadata["source_code_uri"] = "https://github.com/viletyy/gitea-client"
|
data/lib/gitea/api/client.rb
CHANGED
data/lib/gitea/api/http.rb
CHANGED
@@ -104,7 +104,11 @@ module Gitea
|
|
104
104
|
response.return!
|
105
105
|
end
|
106
106
|
|
107
|
-
|
107
|
+
if response.headers.has_key?(:x_total)
|
108
|
+
return {data: JSON.parse(response), total_data: response.headers[:x_total]}
|
109
|
+
else
|
110
|
+
return JSON.parse(response)
|
111
|
+
end rescue {}
|
108
112
|
end
|
109
113
|
|
110
114
|
def get_user_agent
|
data/lib/gitea/api/repository.rb
CHANGED
@@ -29,14 +29,6 @@ module Gitea
|
|
29
29
|
@http.get("/repos/#{owner}/#{repo}/assignees", opt)
|
30
30
|
end
|
31
31
|
|
32
|
-
def get_repos_blame_by_owner_repo(owner, repo, opt = {})
|
33
|
-
@http.get("/repos/#{owner}/#{repo}/blame", opt)
|
34
|
-
end
|
35
|
-
|
36
|
-
def get_repos_branch_name_set_by_owner_repo(owner, repo, opt = {})
|
37
|
-
@http.get("/repos/#{owner}/#{repo}/branch_name_set", opt)
|
38
|
-
end
|
39
|
-
|
40
32
|
def get_repos_branch_protections_by_owner_repo(owner, repo, opt = {})
|
41
33
|
@http.get("/repos/#{owner}/#{repo}/branch_protections", opt)
|
42
34
|
end
|
@@ -57,10 +49,6 @@ module Gitea
|
|
57
49
|
@http.patch("/repos/#{owner}/#{repo}/branch_protections/#{name}", opt)
|
58
50
|
end
|
59
51
|
|
60
|
-
def get_repos_branch_tag_count_by_owner_repo(owner, repo, opt={})
|
61
|
-
@http.get("/repos/#{owner}/#{repo}/branch_tag_count", opt)
|
62
|
-
end
|
63
|
-
|
64
52
|
def get_repos_branches_by_owner_repo(owner, repo, opt = {})
|
65
53
|
@http.get("/repos/#{owner}/#{repo}/branches", opt)
|
66
54
|
end
|
@@ -69,14 +57,6 @@ module Gitea
|
|
69
57
|
@http.post("/repos/#{owner}/#{repo}/branches", opt)
|
70
58
|
end
|
71
59
|
|
72
|
-
def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
|
73
|
-
@http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
|
74
|
-
end
|
75
|
-
|
76
|
-
def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
|
77
|
-
@http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
|
78
|
-
end
|
79
|
-
|
80
60
|
def get_repos_branches_by_owner_repo_branch(owner, repo, branch, opt = {})
|
81
61
|
@http.get("/repos/#{owner}/#{repo}/branches/#{branch}", opt)
|
82
62
|
end
|
@@ -101,10 +81,6 @@ module Gitea
|
|
101
81
|
@http.get("/repos/#{owner}/#{repo}/commits", opt)
|
102
82
|
end
|
103
83
|
|
104
|
-
def get_repos_commits_diff_by_owner_repo(owner, repo, opt = {})
|
105
|
-
@http.get("/repos/#{owner}/#{repo}/commits/diff", opt)
|
106
|
-
end
|
107
|
-
|
108
84
|
def get_repos_commits_status_by_owner_repo_ref(owner, repo, ref, opt = {})
|
109
85
|
@http.get("/repos/#{owner}/#{repo}/commits/#{ref}/status", opt)
|
110
86
|
end
|
@@ -113,18 +89,10 @@ module Gitea
|
|
113
89
|
@http.get("/repos/#{owner}/#{repo}/commits/#{ref}/statuses", opt)
|
114
90
|
end
|
115
91
|
|
116
|
-
def get_repos_commits_slice_by_owner_repo(owner, repo, opt = {})
|
117
|
-
@http.get("/repos/#{owner}/#{repo}/commits_slice", opt)
|
118
|
-
end
|
119
|
-
|
120
92
|
def get_repos_contents_by_owner_repo(owner, repo, opt = {})
|
121
93
|
@http.get("/repos/#{owner}/#{repo}/contents", opt)
|
122
94
|
end
|
123
95
|
|
124
|
-
def post_repos_contents_batch_by_owner_repo(owner, repo, opt = {})
|
125
|
-
@http.post("/repos/#{owner}/#{repo}/contents/batch", opt)
|
126
|
-
end
|
127
|
-
|
128
96
|
def get_repos_contents_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
129
97
|
@http.get("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
|
130
98
|
end
|
@@ -141,26 +109,10 @@ module Gitea
|
|
141
109
|
@http.delete("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
|
142
110
|
end
|
143
111
|
|
144
|
-
def get_repos_contributors_by_owner_repo(owner, repo, opt={})
|
145
|
-
@http.get("/repos/#{owner}/#{repo}/contributors", opt)
|
146
|
-
end
|
147
|
-
|
148
|
-
def get_repos_count_by_owner_repo(owner, repo, opt={})
|
149
|
-
@http.get("/repos/#{owner}/#{repo}/count", opt)
|
150
|
-
end
|
151
|
-
|
152
112
|
def get_repos_editorconfig_by_owner_repo_filepath(owner, repo, filepath, opt = {})
|
153
113
|
@http.get("/repos/#{owner}/#{repo}/editorconfig/#{filepath}", opt)
|
154
114
|
end
|
155
115
|
|
156
|
-
def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt={})
|
157
|
-
@http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
|
158
|
-
end
|
159
|
-
|
160
|
-
def get_repos_find_by_owner_repo_filepath(owner, repo, filepath, opt={})
|
161
|
-
@http.get("/repos/#{owner}/#{repo}/find", opt)
|
162
|
-
end
|
163
|
-
|
164
116
|
def get_repos_forks_by_owner_repo(owner, repo, opt = {})
|
165
117
|
@http.get("/repos/#{owner}/#{repo}/forks", opt)
|
166
118
|
end
|
@@ -229,10 +181,6 @@ module Gitea
|
|
229
181
|
@http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
|
230
182
|
end
|
231
183
|
|
232
|
-
def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt={})
|
233
|
-
@http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
|
234
|
-
end
|
235
|
-
|
236
184
|
def post_repos_hooks_tests_by_owner_repo_id(owner, repo, id, opt = {})
|
237
185
|
@http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
|
238
186
|
end
|
@@ -273,10 +221,6 @@ module Gitea
|
|
273
221
|
@http.post("/repos/#{owner}/#{repo}/pulls", opt)
|
274
222
|
end
|
275
223
|
|
276
|
-
def get_repos_pulls_by_owner_repo_index(owner, repo, opt = {})
|
277
|
-
@http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
|
278
|
-
end
|
279
|
-
|
280
224
|
def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
|
281
225
|
@http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
|
282
226
|
end
|
@@ -341,14 +285,6 @@ module Gitea
|
|
341
285
|
@http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
|
342
286
|
end
|
343
287
|
|
344
|
-
def get_repos_readme_by_owner_repo(owner, repo, opt={})
|
345
|
-
@http.get("/repos/#{owner}/#{repo}/readme", opt)
|
346
|
-
end
|
347
|
-
|
348
|
-
def get_repos_readme_by_owner_repo_dir(owner, repo, dir, opt={})
|
349
|
-
@http.get("/repos/#{owner}/#{repo}/readme/#{dir}", opt)
|
350
|
-
end
|
351
|
-
|
352
288
|
def get_repos_releases_by_owner_repo(owner, repo, opt = {})
|
353
289
|
@http.get("/repos/#{owner}/#{repo}/releases", opt)
|
354
290
|
end
|
data/lib/gitea/api/user.rb
CHANGED
@@ -166,10 +166,6 @@ module Gitea
|
|
166
166
|
@http.get("/user/#{username}/gpg_keys", opt)
|
167
167
|
end
|
168
168
|
|
169
|
-
def get_users_heatmap_by_username(username, opt={})
|
170
|
-
@http.get("/users/#{username}/heatmap", opt)
|
171
|
-
end
|
172
|
-
|
173
169
|
def get_users_keys_by_username(username, opt={})
|
174
170
|
@http.get("/user/#{username}/keys", opt)
|
175
171
|
end
|
data/lib/gitea/api.rb
CHANGED
@@ -7,7 +7,6 @@ require_relative 'api/organization'
|
|
7
7
|
require_relative 'api/notification'
|
8
8
|
require_relative 'api/miscellaneous'
|
9
9
|
require_relative 'api/admin'
|
10
|
-
require_relative 'api/activity'
|
11
10
|
require_relative 'api/client'
|
12
11
|
require_relative 'api/config'
|
13
12
|
require_relative 'api/exception'
|
data/lib/gitea/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitea-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- viletyy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-07-
|
11
|
+
date: 2022-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -44,7 +44,6 @@ files:
|
|
44
44
|
- gitea-client.gemspec
|
45
45
|
- lib/gitea-client.rb
|
46
46
|
- lib/gitea/api.rb
|
47
|
-
- lib/gitea/api/activity.rb
|
48
47
|
- lib/gitea/api/admin.rb
|
49
48
|
- lib/gitea/api/client.rb
|
50
49
|
- lib/gitea/api/config.rb
|
@@ -77,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
77
76
|
requirements:
|
78
77
|
- - ">="
|
79
78
|
- !ruby/object:Gem::Version
|
80
|
-
version: 2.
|
79
|
+
version: 2.6.0
|
81
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
81
|
requirements:
|
83
82
|
- - ">="
|
data/lib/gitea/api/activity.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
module Gitea
|
2
|
-
module Api
|
3
|
-
module Activity
|
4
|
-
def get_activity(opt={})
|
5
|
-
@http.get("/activity", opt)
|
6
|
-
end
|
7
|
-
|
8
|
-
def get_activity_develop(opt={})
|
9
|
-
@http.get("/activity/develop", opt)
|
10
|
-
end
|
11
|
-
|
12
|
-
def get_activity_project(opt={})
|
13
|
-
@http.get("/activity/project", opt)
|
14
|
-
end
|
15
|
-
end # Activity
|
16
|
-
end # Api
|
17
|
-
end # Gitea
|