tinybucket2 1.7.1 → 1.7.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: 2b8bb2395f595e0ddf2adca0de7d06ece6c6ace35ca71e20158564757aa608ab
4
- data.tar.gz: 3ec65a067eabe7f0d3e751f92cd45d5defb2be511a39cc36264c197b6607ba3d
3
+ metadata.gz: d966a20bf2ccd1e21640fb3808c0d5b4f319e22d58815df5868e263e9d6e548e
4
+ data.tar.gz: d63838fb613a5821c9c254a78778a21de1f62ad233faba654319ca203a32684e
5
5
  SHA512:
6
- metadata.gz: a458cb1ec0a07adf9db8a6018e699ec4d2bc4a787e89d98aa2078f59e4e06e5fa34e82fbc9ac868d79c48aafd785bec909a578ddd98a3f30849518e2fe0ca57b
7
- data.tar.gz: 542a1fe591cb9c2502052f69fbc5296078b5fbdd2852f842bdeca4089725e1659fe18a2b9fbaece3a1e3d6834195a598e3f5d9cf8e9dbf2110e7d94fa2b4967f
6
+ metadata.gz: 71ceb22c592b6136bc1ae78f6fb27c9bc33451704370cf043795c80d579a4776c12fd32b1ce51148b143f49efa3c81a56ce25d666516a5ccc0b4f25d594cdabc
7
+ data.tar.gz: 97a78d7c049802d8c399fc20476b62fe289916c996f6feac9462c7a3e7e25fab2e23157200960527574fd72a235383c6900a7517e0b5b4dfd086356f521f93b2
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tinybucket
4
+ module Api
5
+ module Helper
6
+ module IssuesHelper
7
+ include ::Tinybucket::Api::Helper::ApiHelper
8
+
9
+ private
10
+
11
+ def path_to_list
12
+ build_path(base_path)
13
+ end
14
+
15
+ def path_to_find(issue)
16
+ build_path(base_path,
17
+ [issue, 'issue'])
18
+ end
19
+
20
+ def base_path
21
+ build_path('/repositories',
22
+ [repo_owner, 'repo_owner'],
23
+ [repo_slug, 'repo_slug'],
24
+ 'issues')
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,48 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tinybucket
4
+ module Api
5
+ # Issues Api client
6
+ #
7
+ # @!attribute [rw] repo_owner
8
+ # @return [String] repository owner name.
9
+ # @!attribute [rw] repo_slug
10
+ # @return [String] {https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D repo_slug}.
11
+ class IssuesApi < BaseApi
12
+ include Tinybucket::Api::Helper::IssuesHelper
13
+
14
+ attr_accessor :repo_owner, :repo_slug
15
+
16
+ # Send 'GET a issues list for a repository' request
17
+ #
18
+ # @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues#get
19
+ # GET a issues list for a repository
20
+ #
21
+ # @param options [Hash]
22
+ # @return [Tinybucket::Model::Page]
23
+ def list(options = {})
24
+ get_path(
25
+ path_to_list,
26
+ options,
27
+ get_parser(:collection, Tinybucket::Model::Issue)
28
+ )
29
+ end
30
+
31
+ # Send 'GET an individual issue' request
32
+ #
33
+ # @see https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Busername%7D/%7Brepo_slug%7D/issues/%7Bname%7D#get
34
+ # GET an individual issue
35
+ #
36
+ # @param name [String] The issue name
37
+ # @param options [Hash]
38
+ # @return [Tinybucket::Model::Issue]
39
+ def find(name, options = {})
40
+ get_path(
41
+ path_to_find(name),
42
+ options,
43
+ get_parser(:object, Tinybucket::Model::Issue)
44
+ )
45
+ end
46
+ end
47
+ end
48
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Tinybucket
4
- VERSION = '1.7.1'.freeze
4
+ VERSION = '1.7.2'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinybucket2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.1
4
+ version: 1.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - hirakiuc
@@ -138,12 +138,14 @@ files:
138
138
  - lib/tinybucket/api/helper/comments_helper.rb
139
139
  - lib/tinybucket/api/helper/commits_helper.rb
140
140
  - lib/tinybucket/api/helper/diff_helper.rb
141
+ - lib/tinybucket/api/helper/issues_helper.rb
141
142
  - lib/tinybucket/api/helper/projects_helper.rb
142
143
  - lib/tinybucket/api/helper/pull_requests_helper.rb
143
144
  - lib/tinybucket/api/helper/repo_helper.rb
144
145
  - lib/tinybucket/api/helper/repos_helper.rb
145
146
  - lib/tinybucket/api/helper/team_helper.rb
146
147
  - lib/tinybucket/api/helper/user_helper.rb
148
+ - lib/tinybucket/api/issues_api.rb
147
149
  - lib/tinybucket/api/projects_api.rb
148
150
  - lib/tinybucket/api/pull_requests_api.rb
149
151
  - lib/tinybucket/api/repo_api.rb