gitearb 0.1.1 → 0.1.2

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: c69d14b4480523c201fc11f1a0aa0e49cb97762f43085b1d282c7930e7c9ab72
4
- data.tar.gz: 42ecd75e0029ddbafd8d1566cc9975ad2b34722ffdb2b827e57211380f92d7f0
3
+ metadata.gz: b9d322ad7cea3712f32a04f5d2d4402d61e8b43f6aad0ca470566f6c4f34d851
4
+ data.tar.gz: 273c36d0ccc26ae602a1a9cc6ea80d57171185633cf72d1d72a489ea0c982937
5
5
  SHA512:
6
- metadata.gz: 3fa788ffb7c750c447234d57d00d37a7aa680081b7e78c6a809634fbc57087354f2fb6bd5334cba907e994113dbcef57b325c81f98161b804c2e87783d54ff5b
7
- data.tar.gz: 853ac5731bd6d586771aafe2f366c03e71e1d4ce19a15743b4cc2c90dcc346d265422465637b5a9314b8b104b482c29ea905e1b91abc204d3180b8b918c77a40
6
+ metadata.gz: cc9afeaf15ba7cfdd058b801ffe8666c2805ef516f058723c032df695e21c7b858e02552d65a59872667d8eeea1c776ce3f683afbaf894e889891117c5183e06
7
+ data.tar.gz: 21f78ef489bddeaff89a2d280e8abc27ef8f120fd73e7d822c912953e878334f497af724828ff0887f7366bea862f906ff64996da0eb504468c11c2298aa9ef5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitearb (0.1.1)
4
+ gitearb (0.1.2)
5
5
  faraday (~> 2.0)
6
6
 
7
7
  GEM
data/lib/gitea/client.rb CHANGED
@@ -37,6 +37,10 @@ module Gitea
37
37
  RepoHooksResource.new(self)
38
38
  end
39
39
 
40
+ def commit_statuses
41
+ CommitStatusesResource.new(self)
42
+ end
43
+
40
44
  def connection
41
45
  full_url = [url, "api/v1"].join("/")
42
46
 
@@ -0,0 +1,4 @@
1
+ module Gitea
2
+ class CommitStatus < Object
3
+ end
4
+ end
@@ -0,0 +1,14 @@
1
+ module Gitea
2
+ class CommitStatusesResource < Resource
3
+
4
+ def list(owner:, repo:, sha:, **params)
5
+ response = get_request("repos/#{owner}/#{repo}/statuses/#{sha}", params: params)
6
+ Collection.from_response(response, type: CommitStatus)
7
+ end
8
+
9
+ def create(owner:, repo:, sha:, **args)
10
+ CommitStatus.new post_request("repos/#{owner}/#{repo}/statuses/#{sha}", body: args).body
11
+ end
12
+
13
+ end
14
+ end
data/lib/gitea/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gitea
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/gitea.rb CHANGED
@@ -17,11 +17,13 @@ module Gitea
17
17
  autoload :UserReposResource, "gitea/resources/user_repos"
18
18
  autoload :ReposResource, "gitea/resources/repos"
19
19
  autoload :RepoHooksResource, "gitea/resources/repo_hooks"
20
+ autoload :CommitStatusesResource, "gitea/resources/commit_statuses"
20
21
 
21
22
  autoload :User, "gitea/objects/user"
22
23
  autoload :Email, "gitea/objects/email"
23
24
  autoload :Org, "gitea/objects/org"
24
25
  autoload :Hook, "gitea/objects/hook"
25
26
  autoload :Repo, "gitea/objects/repo"
27
+ autoload :CommitStatus, "gitea/objects/commit_status"
26
28
 
27
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitearb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dean Perry
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-14 00:00:00.000000000 Z
11
+ date: 2023-02-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -48,12 +48,14 @@ files:
48
48
  - lib/gitea/collection.rb
49
49
  - lib/gitea/error.rb
50
50
  - lib/gitea/object.rb
51
+ - lib/gitea/objects/commit_status.rb
51
52
  - lib/gitea/objects/email.rb
52
53
  - lib/gitea/objects/hook.rb
53
54
  - lib/gitea/objects/org.rb
54
55
  - lib/gitea/objects/repo.rb
55
56
  - lib/gitea/objects/user.rb
56
57
  - lib/gitea/resource.rb
58
+ - lib/gitea/resources/commit_statuses.rb
57
59
  - lib/gitea/resources/org_hooks.rb
58
60
  - lib/gitea/resources/orgs.rb
59
61
  - lib/gitea/resources/repo_hooks.rb