gitea-client 0.1.0 → 0.3.1

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: 33b5240a586da262af061839660d5fc9b2f062aa5d41748c1a3f3b18557fba2e
4
- data.tar.gz: f8a356016bb0bc6d9f4d9811ddb09491fddb4ccd6df1e3e149e8a05cc5fe8848
3
+ metadata.gz: 00a61b85656cd49d12e8cb527932bf2fda9f278c74e429e2a02c9129abd38e72
4
+ data.tar.gz: 59e2fd242597710a5e70699cf652fe36b1fd41b61e68e46cce267ca997f9d76e
5
5
  SHA512:
6
- metadata.gz: 7517a190b3c7d9cd21ddb0408a1dbe8cd2798dc82f47c61146eb2510b53b4ce2731759ecad399774cca871c5a0f0bf28c4a6b937031e13f121ed30e6f5f08802
7
- data.tar.gz: 118fb8e4b1d98fee9254cdb0e94e66ac693aa6f2a9128d9dd7b62876ee1b861ce3dc8bc327f12824edf125383904067e0c3eb5f10514aec2ffb22056d3295f12
6
+ metadata.gz: 48b592aa0060598b48712b147f7c048121b39553f9da87c96715cb2f5aff0e4298db8d61e9414cfc57a43fbc231ae4b4e6fd3c70f25d088321b3fc5b54a8149f
7
+ data.tar.gz: c62bf41fe2dfc47a7d59bd26d738eb128ceeab2cfb66c1de736e029d4b76106360525b9b334edf00eb93de288cc083bff4b6d72ac29470bb837d9cfca2cd3167
data/Gemfile.lock CHANGED
@@ -1,7 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitea-client (0.1.0)
4
+ gitea-client (0.3.1)
5
+ rest-client (~> 2.1.0)
5
6
 
6
7
  GEM
7
8
  remote: https://gems.ruby-china.com/
@@ -2,9 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  require "bundler/setup"
5
- require 'rest-client'
6
- require './lib/gitea/api'
7
- require './lib/gitea/version'
5
+ require 'gitea-client'
8
6
 
9
7
  # You can add fixtures and/or initialization code here to make experimenting
10
8
  # with your gem easier. You can also use a different console, if you like.
@@ -14,4 +12,4 @@ require './lib/gitea/version'
14
12
  # Pry.start
15
13
 
16
14
  require "irb"
17
- IRB.start(__FILE__)
15
+ IRB.start(__FILE__)
data/gitea-client.gemspec CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://github.com/viletyy/gitea-client"
19
- spec.metadata["changelog_uri"] = "https://github.com/viletyy/gitea-client"
19
+ spec.metadata["changelog_uri"] = "https://github.com/viletyy/gitea-client/blob/master/CHANGELOG.md"
20
20
 
21
21
  # Specify which files should be added to the gem when it is released.
22
22
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
30
30
  spec.require_paths = ["lib"]
31
31
 
32
+ spec.add_dependency('rest-client', '~> 2.1.0')
32
33
  # Uncomment to register a new dependency of your gem
33
34
  # spec.add_dependency "example-gem", "~> 1.0"
34
35
 
@@ -49,6 +49,10 @@ module Gitea
49
49
  @http.patch("/repos/#{owner}/#{repo}/branch_protections/#{name}", opt)
50
50
  end
51
51
 
52
+ def get_repos_branch_tag_count_by_owner_repo(owenr, repo, opt={})
53
+ @http.get("/repos/#{owner}/#{repo}/branch_tag_count", opt)
54
+ end
55
+
52
56
  def get_repos_branches_by_owner_repo(owner, repo, opt = {})
53
57
  @http.get("/repos/#{owner}/#{repo}/branches", opt)
54
58
  end
@@ -105,10 +109,26 @@ module Gitea
105
109
  @http.delete("/repos/#{owner}/#{repo}/contents/#{filepath}", opt)
106
110
  end
107
111
 
112
+ def get_repos_contributors_by_owner_repo(owner, repo, opt={})
113
+ @http.get("/repos/#{owner}/#{repo}/contributors", opt)
114
+ end
115
+
116
+ def get_repos_count_by_owner_repo(owner, repo, opt={})
117
+ @http.get("/repos/#{owner}/#{repo}/count", opt)
118
+ end
119
+
108
120
  def get_repos_editorconfig_by_owner_repo_filepath(owner, repo, filepath, opt = {})
109
121
  @http.get("/repos/#{owner}/#{repo}/editorconfig/#{filepath}", opt)
110
122
  end
111
123
 
124
+ def get_repos_file_commits_by_owner_repo_filepath(owner, repo, filepath, opt={})
125
+ @http.get("/repos/#{owner}/#{repo}/file_commits/#{filepath}", opt)
126
+ end
127
+
128
+ def get_repos_find_by_owner_repo_filepath(owner, repo, filepath, opt={})
129
+ @http.get("/repos/#{owner}/#{repo}/find", opt)
130
+ end
131
+
112
132
  def get_repos_forks_by_owner_repo(owner, repo, opt = {})
113
133
  @http.get("/repos/#{owner}/#{repo}/forks", opt)
114
134
  end
@@ -177,6 +197,10 @@ module Gitea
177
197
  @http.patch("/repos/#{owner}/#{repo}/hooks/#{id}", opt)
178
198
  end
179
199
 
200
+ def get_repos_hooks_hooktasks_by_owner_repo_id(owner, repo, id, opt={})
201
+ @http.get("/repos/#{owner}/#{repo}/hooks/#{id}/hooktasks", opt)
202
+ end
203
+
180
204
  def post_repos_hooks_tests_by_owner_repo_id(owner, repo, id, opt = {})
181
205
  @http.post("/repos/#{owner}/#{repo}/hooks/#{id}/tests", opt)
182
206
  end
@@ -217,6 +241,10 @@ module Gitea
217
241
  @http.post("/repos/#{owner}/#{repo}/pulls", opt)
218
242
  end
219
243
 
244
+ def get_repos_pulls_by_owner_repo_index(owner, repo, opt = {})
245
+ @http.get("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
246
+ end
247
+
220
248
  def patch_repos_pulls_by_owner_repo_index(owner, repo, index, opt = {})
221
249
  @http.patch("/repos/#{owner}/#{repo}/pulls/#{index}", opt)
222
250
  end
@@ -281,6 +309,14 @@ module Gitea
281
309
  @http.get("/repos/#{owner}/#{repo}/raw/#{filepath}", opt)
282
310
  end
283
311
 
312
+ def get_repos_readme_by_owner_repo(owner, repo, opt={})
313
+ @http.get("/repos/#{owner}/#{repo}/readme", opt)
314
+ end
315
+
316
+ def get_repos_readme_by_owner_repo_dir(owner, repo, dir, opt={})
317
+ @http.get("/repos/#{owner}/#{repo}/readme/#{dir}", opt)
318
+ end
319
+
284
320
  def get_repos_releases_by_owner_repo(owner, repo, opt = {})
285
321
  @http.get("/repos/#{owner}/#{repo}/releases", opt)
286
322
  end
@@ -166,6 +166,10 @@ 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
+
169
173
  def get_users_keys_by_username(username, opt={})
170
174
  @http.get("/user/#{username}/keys", opt)
171
175
  end
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.1.0"
4
+ VERSION = "0.3.1"
5
5
  end
@@ -0,0 +1,3 @@
1
+ require 'rest-client'
2
+ require_relative "gitea/version"
3
+ require_relative "gitea/api"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitea-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - viletyy
@@ -9,7 +9,21 @@ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2022-05-05 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rest-client
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 2.1.0
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 2.1.0
13
27
  description: ''
14
28
  email:
15
29
  - yystopf@163.com
@@ -25,9 +39,10 @@ files:
25
39
  - LICENSE.txt
26
40
  - README.md
27
41
  - Rakefile
28
- - bin/giteaclient
42
+ - bin/console
29
43
  - bin/setup
30
44
  - gitea-client.gemspec
45
+ - lib/gitea-client.rb
31
46
  - lib/gitea/api.rb
32
47
  - lib/gitea/api/admin.rb
33
48
  - lib/gitea/api/client.rb
@@ -52,7 +67,7 @@ licenses:
52
67
  metadata:
53
68
  homepage_uri: https://github.com/viletyy/gitea-client
54
69
  source_code_uri: https://github.com/viletyy/gitea-client
55
- changelog_uri: https://github.com/viletyy/gitea-client
70
+ changelog_uri: https://github.com/viletyy/gitea-client/blob/master/CHANGELOG.md
56
71
  post_install_message:
57
72
  rdoc_options: []
58
73
  require_paths: