gitea-client 0.6.2 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ae418c26d24a55d1a2894fde3b209eb2480df36a60406985c9f9deacbd09bbd1
4
- data.tar.gz: 8f3417141703a80a14d9e704cd7c7483f9e3c6deeb1cfee6fe8c73644991bee9
3
+ metadata.gz: 5f940ef48dd56c5ab28738720b797684e95456d751340c87cdd1ec0c2458660f
4
+ data.tar.gz: 90a8175b27a667047220b8f7a1d4fa95f7198a2f4032c8235cab0723aaa8f27c
5
5
  SHA512:
6
- metadata.gz: 46e99dde1fdf46cb980be9d2e06892237fa859494ee6a09d2f72900fb72fb8b4049027103df43f77cfabc3aa554d6d51a8511167f3b8cddabf9f7bad50693acc
7
- data.tar.gz: 5edeb5c5242313a2a0d4702986b8d6fda118bc9fc4231272e269515daa498fd264a4fd1f877bb3d8126ba4fe7a9cfe39bca1cd6fb5edb96b8ff6725425974738
6
+ metadata.gz: eff8e4121964f07831277221e86b2b9b6340220d81948350298889cad5a73baaf0d18e1acc9efeff67b7ea71ef9d6e5eda9fa9c306cc904621f0650c9d5cb13e
7
+ data.tar.gz: 1df9ecf2fdf4f0b01393dc8a778dfb9d4d7e36ec84ecb28c03ef140cce93604538f36ec920d63107fe744b75108a00b3a7d9edeac43f89b5dac5400306059a2f
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitea-client (0.6.2)
4
+ gitea-client (0.8.0)
5
5
  rest-client (~> 2.1.0)
6
6
 
7
7
  GEM
@@ -44,7 +44,6 @@ module Gitea
44
44
  include Gitea::Api::Notification
45
45
  include Gitea::Api::Miscellaneous
46
46
  include Gitea::Api::Admin
47
- include Gitea::Api::Activity
48
47
  end
49
48
  end # User
50
49
  end # Gitea
@@ -30,6 +30,10 @@ module Gitea
30
30
  do_request('PUT', api_url, http_options, &block)
31
31
  end
32
32
 
33
+ def patch(api_url = '', http_options = {}, &block)
34
+ do_request('PATCH', api_url, http_options, &block)
35
+ end
36
+
33
37
  def post(api_url = '', http_options = {}, &block)
34
38
  do_request('POST', api_url, http_options, &block)
35
39
  end
@@ -100,7 +104,7 @@ module Gitea
100
104
  response.return!
101
105
  end
102
106
 
103
- JSON.parse(response)
107
+ JSON.parse(response) rescue {}
104
108
  end
105
109
 
106
110
  def get_user_agent
@@ -29,10 +29,6 @@ module Gitea
29
29
  @http.get("/repos/#{owner}/#{repo}/assignees", opt)
30
30
  end
31
31
 
32
- def get_repos_branch_name_set_by_owner_repo(owner, repo, opt = {})
33
- @http.get("/repos/#{owner}/#{repo}/branch_name_set", opt)
34
- end
35
-
36
32
  def get_repos_branch_protections_by_owner_repo(owner, repo, opt = {})
37
33
  @http.get("/repos/#{owner}/#{repo}/branch_protections", opt)
38
34
  end
@@ -53,10 +49,6 @@ module Gitea
53
49
  @http.patch("/repos/#{owner}/#{repo}/branch_protections/#{name}", opt)
54
50
  end
55
51
 
56
- def get_repos_branch_tag_count_by_owner_repo(owner, repo, opt={})
57
- @http.get("/repos/#{owner}/#{repo}/branch_tag_count", opt)
58
- end
59
-
60
52
  def get_repos_branches_by_owner_repo(owner, repo, opt = {})
61
53
  @http.get("/repos/#{owner}/#{repo}/branches", opt)
62
54
  end
@@ -65,10 +57,6 @@ module Gitea
65
57
  @http.get("/repos/#{owner}/#{repo}/branches", opt)
66
58
  end
67
59
 
68
- def get_repos_branches_branches_slice_by_owner_repo(owner, repo, opt = {})
69
- @http.get("/repos/#{owner}/#{repo}/branches/branches_slice", opt)
70
- end
71
-
72
60
  def get_repos_branches_by_owner_repo_branch(owner, repo, branch, opt = {})
73
61
  @http.get("/repos/#{owner}/#{repo}/branches/#{branch}", opt)
74
62
  end
@@ -101,10 +89,6 @@ module Gitea
101
89
  @http.get("/repos/#{owner}/#{repo}/commits/#{ref}/statuses", opt)
102
90
  end
103
91
 
104
- def get_repos_commits_slice_by_owner_repo(owner, repo, opt = {})
105
- @http.get("/repos/#{owner}/#{repo}/commits_slice", opt)
106
- end
107
-
108
92
  def get_repos_contents_by_owner_repo(owner, repo, opt = {})
109
93
  @http.get("/repos/#{owner}/#{repo}/contents", opt)
110
94
  end
@@ -125,26 +109,10 @@ module Gitea
125
109
  @http.delete("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
126
110
  end
127
111
 
128
- def get_repos_contributors_by_owner_repo(owner, repo, opt={})
129
- @http.get("/repos/#{owner}/#{repo}/contributors", opt)
130
- end
131
-
132
- def get_repos_count_by_owner_repo(owner, repo, opt={})
133
- @http.get("/repos/#{owner}/#{repo}/count", opt)
134
- end
135
-
136
112
  def get_repos_editorconfig_by_owner_repo_filepath(owner, repo, filepath, opt = {})
137
113
  @http.get("/repos/#{owner}/#{repo}/editorconfig/#{filepath}", opt)
138
114
  end
139
115
 
140
- def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt={})
141
- @http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
142
- end
143
-
144
- def get_repos_find_by_owner_repo_filepath(owner, repo, filepath, opt={})
145
- @http.get("/repos/#{owner}/#{repo}/find", opt)
146
- end
147
-
148
116
  def get_repos_forks_by_owner_repo(owner, repo, opt = {})
149
117
  @http.get("/repos/#{owner}/#{repo}/forks", opt)
150
118
  end
@@ -213,10 +181,6 @@ module Gitea
213
181
  @http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
214
182
  end
215
183
 
216
- def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt={})
217
- @http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
218
- end
219
-
220
184
  def post_repos_hooks_tests_by_owner_repo_id(owner, repo, id, opt = {})
221
185
  @http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
222
186
  end
@@ -257,10 +221,6 @@ module Gitea
257
221
  @http.post("/repos/#{owner}/#{repo}/pulls", opt)
258
222
  end
259
223
 
260
- def get_repos_pulls_by_owner_repo_index(owner, repo, opt = {})
261
- @http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
262
- end
263
-
264
224
  def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
265
225
  @http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
266
226
  end
@@ -325,14 +285,6 @@ module Gitea
325
285
  @http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
326
286
  end
327
287
 
328
- def get_repos_readme_by_owner_repo(owner, repo, opt={})
329
- @http.get("/repos/#{owner}/#{repo}/readme", opt)
330
- end
331
-
332
- def get_repos_readme_by_owner_repo_dir(owner, repo, dir, opt={})
333
- @http.get("/repos/#{owner}/#{repo}/readme/#{dir}", opt)
334
- end
335
-
336
288
  def get_repos_releases_by_owner_repo(owner, repo, opt = {})
337
289
  @http.get("/repos/#{owner}/#{repo}/releases", opt)
338
290
  end
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gitea
4
- VERSION = "0.6.2"
4
+ VERSION = "0.8.0"
5
5
  end
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.6.2
4
+ version: 0.8.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-06-22 00:00:00.000000000 Z
11
+ date: 2022-06-23 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
@@ -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