tinybucket 1.3.0 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +10 -1
  3. data/Gemfile +8 -7
  4. data/README.md +28 -5
  5. data/Rakefile +1 -0
  6. data/lib/faraday_middleware/follow_oauth_redirects.rb +5 -2
  7. data/lib/tinybucket.rb +2 -0
  8. data/lib/tinybucket/api.rb +3 -0
  9. data/lib/tinybucket/api/base_api.rb +2 -0
  10. data/lib/tinybucket/api/branch_restrictions_api.rb +6 -5
  11. data/lib/tinybucket/api/branches_api.rb +48 -0
  12. data/lib/tinybucket/api/build_status_api.rb +15 -1
  13. data/lib/tinybucket/api/comments_api.rb +7 -6
  14. data/lib/tinybucket/api/commits_api.rb +25 -4
  15. data/lib/tinybucket/api/diff_api.rb +4 -3
  16. data/lib/tinybucket/api/helper.rb +3 -0
  17. data/lib/tinybucket/api/helper/api_helper.rb +2 -0
  18. data/lib/tinybucket/api/helper/branch_restrictions_helper.rb +2 -0
  19. data/lib/tinybucket/api/helper/branches_helper.rb +29 -0
  20. data/lib/tinybucket/api/helper/build_status_helper.rb +11 -0
  21. data/lib/tinybucket/api/helper/comments_helper.rb +2 -0
  22. data/lib/tinybucket/api/helper/commits_helper.rb +8 -0
  23. data/lib/tinybucket/api/helper/diff_helper.rb +2 -0
  24. data/lib/tinybucket/api/helper/pull_requests_helper.rb +2 -0
  25. data/lib/tinybucket/api/helper/repo_helper.rb +2 -0
  26. data/lib/tinybucket/api/helper/repos_helper.rb +2 -0
  27. data/lib/tinybucket/api/helper/team_helper.rb +2 -0
  28. data/lib/tinybucket/api/helper/user_helper.rb +2 -0
  29. data/lib/tinybucket/api/pull_requests_api.rb +4 -3
  30. data/lib/tinybucket/api/repo_api.rb +4 -3
  31. data/lib/tinybucket/api/repos_api.rb +3 -1
  32. data/lib/tinybucket/api/team_api.rb +4 -2
  33. data/lib/tinybucket/api/user_api.rb +3 -1
  34. data/lib/tinybucket/api_factory.rb +2 -0
  35. data/lib/tinybucket/client.rb +3 -2
  36. data/lib/tinybucket/config.rb +5 -1
  37. data/lib/tinybucket/connection.rb +21 -8
  38. data/lib/tinybucket/constants.rb +2 -0
  39. data/lib/tinybucket/enumerator.rb +2 -0
  40. data/lib/tinybucket/error.rb +2 -0
  41. data/lib/tinybucket/error/base_error.rb +2 -0
  42. data/lib/tinybucket/error/conflict.rb +2 -0
  43. data/lib/tinybucket/error/not_found.rb +2 -0
  44. data/lib/tinybucket/error/service_error.rb +2 -0
  45. data/lib/tinybucket/iterator.rb +4 -2
  46. data/lib/tinybucket/model.rb +3 -0
  47. data/lib/tinybucket/model/base.rb +2 -2
  48. data/lib/tinybucket/model/branch.rb +48 -0
  49. data/lib/tinybucket/model/branch_restriction.rb +4 -2
  50. data/lib/tinybucket/model/build_status.rb +3 -1
  51. data/lib/tinybucket/model/comment.rb +4 -2
  52. data/lib/tinybucket/model/commit.rb +6 -2
  53. data/lib/tinybucket/model/concerns.rb +2 -0
  54. data/lib/tinybucket/model/concerns/acceptable_attributes.rb +2 -0
  55. data/lib/tinybucket/model/concerns/api_callable.rb +2 -0
  56. data/lib/tinybucket/model/concerns/enumerable.rb +2 -0
  57. data/lib/tinybucket/model/concerns/reloadable.rb +2 -0
  58. data/lib/tinybucket/model/concerns/repository_keys.rb +2 -0
  59. data/lib/tinybucket/model/error_response.rb +4 -2
  60. data/lib/tinybucket/model/page.rb +4 -2
  61. data/lib/tinybucket/model/profile.rb +4 -2
  62. data/lib/tinybucket/model/pull_request.rb +4 -2
  63. data/lib/tinybucket/model/repository.rb +31 -5
  64. data/lib/tinybucket/model/team.rb +4 -2
  65. data/lib/tinybucket/null_logger.rb +2 -0
  66. data/lib/tinybucket/parser.rb +5 -0
  67. data/lib/tinybucket/parser/base_parser.rb +3 -2
  68. data/lib/tinybucket/parser/branch_parser.rb +13 -0
  69. data/lib/tinybucket/parser/branch_restriction_parser.rb +2 -0
  70. data/lib/tinybucket/parser/branch_restrictions_parser.rb +2 -0
  71. data/lib/tinybucket/parser/branches_parser.rb +11 -0
  72. data/lib/tinybucket/parser/build_status_parser.rb +2 -0
  73. data/lib/tinybucket/parser/builds_parser.rb +11 -0
  74. data/lib/tinybucket/parser/comment_parser.rb +2 -0
  75. data/lib/tinybucket/parser/comments_parser.rb +2 -0
  76. data/lib/tinybucket/parser/commit_parser.rb +2 -0
  77. data/lib/tinybucket/parser/commits_parser.rb +2 -0
  78. data/lib/tinybucket/parser/profile_parser.rb +2 -0
  79. data/lib/tinybucket/parser/profiles_parser.rb +2 -0
  80. data/lib/tinybucket/parser/pull_request_parser.rb +2 -0
  81. data/lib/tinybucket/parser/pull_requests_parser.rb +2 -0
  82. data/lib/tinybucket/parser/repo_parser.rb +2 -0
  83. data/lib/tinybucket/parser/repos_parser.rb +2 -0
  84. data/lib/tinybucket/parser/team_parser.rb +2 -0
  85. data/lib/tinybucket/parser/teams_parser.rb +2 -0
  86. data/lib/tinybucket/request.rb +2 -0
  87. data/lib/tinybucket/resource.rb +3 -0
  88. data/lib/tinybucket/resource/base.rb +6 -0
  89. data/lib/tinybucket/resource/branch_restrictions.rb +2 -0
  90. data/lib/tinybucket/resource/branches.rb +35 -0
  91. data/lib/tinybucket/resource/commit/base.rb +2 -0
  92. data/lib/tinybucket/resource/commit/build_statuses.rb +6 -3
  93. data/lib/tinybucket/resource/commit/comments.rb +2 -0
  94. data/lib/tinybucket/resource/commits.rb +13 -0
  95. data/lib/tinybucket/resource/forks.rb +2 -0
  96. data/lib/tinybucket/resource/pull_request/base.rb +2 -0
  97. data/lib/tinybucket/resource/pull_request/comments.rb +2 -0
  98. data/lib/tinybucket/resource/pull_request/commits.rb +2 -0
  99. data/lib/tinybucket/resource/pull_requests.rb +2 -0
  100. data/lib/tinybucket/resource/repos.rb +2 -0
  101. data/lib/tinybucket/resource/team/base.rb +2 -0
  102. data/lib/tinybucket/resource/team/followers.rb +2 -0
  103. data/lib/tinybucket/resource/team/following.rb +2 -0
  104. data/lib/tinybucket/resource/team/members.rb +2 -0
  105. data/lib/tinybucket/resource/team/repos.rb +2 -0
  106. data/lib/tinybucket/resource/user/base.rb +2 -0
  107. data/lib/tinybucket/resource/user/followers.rb +2 -0
  108. data/lib/tinybucket/resource/user/following.rb +2 -0
  109. data/lib/tinybucket/resource/user/repos.rb +2 -0
  110. data/lib/tinybucket/resource/watchers.rb +2 -0
  111. data/lib/tinybucket/response.rb +2 -0
  112. data/lib/tinybucket/response/handler.rb +2 -0
  113. data/lib/tinybucket/version.rb +3 -1
  114. data/tinybucket.gemspec +1 -1
  115. metadata +11 -193
  116. data/.coveralls.yml +0 -1
  117. data/.gitignore +0 -33
  118. data/.rspec +0 -1
  119. data/.travis.yml +0 -13
  120. data/Guardfile +0 -13
  121. data/spec/fixtures/branch_restriction.json +0 -17
  122. data/spec/fixtures/build_status.json +0 -16
  123. data/spec/fixtures/comment.json +0 -30
  124. data/spec/fixtures/commit.json +0 -83
  125. data/spec/fixtures/profile.json +0 -29
  126. data/spec/fixtures/pull_request.json +0 -106
  127. data/spec/fixtures/repositories/get.json +0 -78
  128. data/spec/fixtures/repositories/test_owner/get.json +0 -78
  129. data/spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/1/get.json +0 -17
  130. data/spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/get.json +0 -101
  131. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/approve/post.json +0 -16
  132. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/1/get.json +0 -38
  133. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/get.json +0 -40
  134. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/get.json +0 -83
  135. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/post.json +0 -16
  136. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/test_status/get.json +0 -16
  137. data/spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/test_status/put.json +0 -16
  138. data/spec/fixtures/repositories/test_owner/test_repo/commits/get.json +0 -73
  139. data/spec/fixtures/repositories/test_owner/test_repo/diff/1/get.json +0 -21
  140. data/spec/fixtures/repositories/test_owner/test_repo/forks/get.json +0 -78
  141. data/spec/fixtures/repositories/test_owner/test_repo/get.json +0 -71
  142. data/spec/fixtures/repositories/test_owner/test_repo/patch/1/get.json +0 -29
  143. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/delete.json +0 -3
  144. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/post.json +0 -3
  145. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/1/get.json +0 -30
  146. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/get.json +0 -44
  147. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/commits/get.json +0 -66
  148. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/decline/post.json +0 -116
  149. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/diff/get.txt +0 -13
  150. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/get.json +0 -164
  151. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/merge/post.json +0 -123
  152. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get.json +0 -112
  153. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_declined.json +0 -112
  154. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_merged.json +0 -112
  155. data/spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_open.json +0 -112
  156. data/spec/fixtures/repositories/test_owner/test_repo/watchers/get.json +0 -32
  157. data/spec/fixtures/repository.json +0 -72
  158. data/spec/fixtures/team.json +0 -32
  159. data/spec/fixtures/teams/test_team/followers/get.json +0 -36
  160. data/spec/fixtures/teams/test_team/following/get.json +0 -39
  161. data/spec/fixtures/teams/test_team/get.json +0 -32
  162. data/spec/fixtures/teams/test_team/members/get.json +0 -36
  163. data/spec/fixtures/teams/test_team/repositories/get.json +0 -125
  164. data/spec/fixtures/users/test_owner/followers/get.json +0 -65
  165. data/spec/fixtures/users/test_owner/following/get.json +0 -100
  166. data/spec/fixtures/users/test_owner/get.json +0 -29
  167. data/spec/lib/tinybucket/api/branch_restrictions_api_spec.rb +0 -77
  168. data/spec/lib/tinybucket/api/build_status_api_spec.rb +0 -65
  169. data/spec/lib/tinybucket/api/comments_api_spec.rb +0 -132
  170. data/spec/lib/tinybucket/api/commits_api_spec.rb +0 -152
  171. data/spec/lib/tinybucket/api/diff_api_spec.rb +0 -5
  172. data/spec/lib/tinybucket/api/pull_requests_api_spec.rb +0 -259
  173. data/spec/lib/tinybucket/api/repo_api_spec.rb +0 -99
  174. data/spec/lib/tinybucket/api/repos_api_spec.rb +0 -27
  175. data/spec/lib/tinybucket/api/team_api_spec.rb +0 -82
  176. data/spec/lib/tinybucket/api/user_api_spec.rb +0 -73
  177. data/spec/lib/tinybucket/api_factory_spec.rb +0 -18
  178. data/spec/lib/tinybucket/client_spec.rb +0 -100
  179. data/spec/lib/tinybucket/connection_spec.rb +0 -30
  180. data/spec/lib/tinybucket/error/service_error_spec.rb +0 -23
  181. data/spec/lib/tinybucket/model/branch_restriction_spec.rb +0 -35
  182. data/spec/lib/tinybucket/model/build_status_spec.rb +0 -66
  183. data/spec/lib/tinybucket/model/comment_spec.rb +0 -37
  184. data/spec/lib/tinybucket/model/commit_spec.rb +0 -108
  185. data/spec/lib/tinybucket/model/page_spec.rb +0 -28
  186. data/spec/lib/tinybucket/model/profile_spec.rb +0 -52
  187. data/spec/lib/tinybucket/model/pull_request_spec.rb +0 -141
  188. data/spec/lib/tinybucket/model/repository_spec.rb +0 -131
  189. data/spec/lib/tinybucket/model/team_spec.rb +0 -70
  190. data/spec/lib/tinybucket/null_logger_spec.rb +0 -53
  191. data/spec/lib/tinybucket/resource/branch_restrictions_spec.rb +0 -60
  192. data/spec/lib/tinybucket/resource/commit/build_statuses_spec.rb +0 -50
  193. data/spec/lib/tinybucket/resource/commit/comments_spec.rb +0 -49
  194. data/spec/lib/tinybucket/resource/commits_spec.rb +0 -43
  195. data/spec/lib/tinybucket/resource/forks_spec.rb +0 -36
  196. data/spec/lib/tinybucket/resource/pull_request/comments_spec.rb +0 -41
  197. data/spec/lib/tinybucket/resource/pull_request/commits_spec.rb +0 -41
  198. data/spec/lib/tinybucket/resource/pull_requests_spec.rb +0 -59
  199. data/spec/lib/tinybucket/resource/repos_spec.rb +0 -76
  200. data/spec/lib/tinybucket/resource/team/followers_spec.rb +0 -27
  201. data/spec/lib/tinybucket/resource/team/following_spec.rb +0 -27
  202. data/spec/lib/tinybucket/resource/team/members_spec.rb +0 -27
  203. data/spec/lib/tinybucket/resource/team/repos_spec.rb +0 -27
  204. data/spec/lib/tinybucket/resource/user/followers_spec.rb +0 -27
  205. data/spec/lib/tinybucket/resource/user/following_spec.rb +0 -27
  206. data/spec/lib/tinybucket/resource/user/repos_spec.rb +0 -27
  207. data/spec/lib/tinybucket/resource/watchers_spec.rb +0 -38
  208. data/spec/lib/tinybucket_spec.rb +0 -42
  209. data/spec/spec_helper.rb +0 -45
  210. data/spec/support/api_response_macros.rb +0 -74
  211. data/spec/support/fixture_macros.rb +0 -5
  212. data/spec/support/model_macros.rb +0 -103
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  class Base
@@ -14,6 +16,10 @@ module Tinybucket
14
16
  end
15
17
  end
16
18
 
19
+ def respond_to_missing?(symbol, include_all)
20
+ enumerator.respond_to?(symbol, include_all)
21
+ end
22
+
17
23
  def create_enumerator(api_client, method, *args, &block)
18
24
  iter = Tinybucket::Iterator.new(api_client, method, *args)
19
25
  Tinybucket::Enumerator.new(iter, block)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  class BranchRestrictions < Base
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Tinybucket
4
+ module Resource
5
+ class Branches < Tinybucket::Resource::Base
6
+ def initialize(repo, options)
7
+ @repo = repo
8
+ @args = [options]
9
+ end
10
+
11
+ # Find the branch
12
+ #
13
+ # @param branch [String]
14
+ # @param options [Hash]
15
+ # @return [Tinybucket::Model::Branch]
16
+ def find(branch, options = {})
17
+ branches_api.find(branch, options).tap do |m|
18
+ inject_repo_keys(m, @repo.repo_keys)
19
+ end
20
+ end
21
+
22
+ private
23
+
24
+ def branches_api
25
+ create_api('Branches', @repo.repo_keys)
26
+ end
27
+
28
+ def enumerator
29
+ create_enumerator(branches_api, :list, *@args) do |m|
30
+ inject_repo_keys(m, @repo.repo_keys)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Commit
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Commit
@@ -34,12 +36,13 @@ module Tinybucket
34
36
  private
35
37
 
36
38
  def build_status_api
37
- create_api('BuildStatus', @commit.repo_keys)
39
+ create_api('BuildStatus', @commit.repo_keys).tap do |api|
40
+ api.revision = @commit.hash
41
+ end
38
42
  end
39
43
 
40
- # FIXME: raise NoMethodError on method_missing.
41
44
  def enumerator
42
- nil
45
+ create_enumerator(build_status_api, :list, *@args)
43
46
  end
44
47
  end
45
48
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Commit
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  class Commits < Base
@@ -17,6 +19,17 @@ module Tinybucket
17
19
  end
18
20
  end
19
21
 
22
+ # Returns the commits for a specific branch
23
+ #
24
+ # @param name [String]
25
+ # @param options [Hash]
26
+ # @return [Tinybucket::Iterator]
27
+ def branch(name, options = {})
28
+ create_enumerator(commits_api, :branch, name, options) do |m|
29
+ inject_repo_keys(m, @repo.repo_keys)
30
+ end
31
+ end
32
+
20
33
  private
21
34
 
22
35
  def commits_api
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  class Forks < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module PullRequest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module PullRequest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module PullRequest
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  class PullRequests < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  class Repos < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Team
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Team
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Team
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Team
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module Team
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module User
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module User
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module User
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  module User
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Resource
3
5
  class Watchers < Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Response
3
5
  extend ActiveSupport::Autoload
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
4
  module Response
3
5
  class Handler < Faraday::Response::Middleware
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Tinybucket
2
- VERSION = '1.3.0'.freeze
4
+ VERSION = '1.4.0'.freeze
3
5
  end
@@ -13,7 +13,7 @@ Gem::Specification.new do |spec|
13
13
  spec.homepage = 'http://hirakiuc.github.io/tinybucket/'
14
14
  spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0")
16
+ spec.files = Dir['lib/**/*', 'LICENSE', 'Rakefile', 'Gemfile', 'tinybucket.gemspec', 'README.md', '.rubocop.yml']
17
17
  spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(/^(test|spec|features)\//)
19
19
  spec.require_paths = ['lib']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tinybucket
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - hirakiuc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-16 00:00:00.000000000 Z
11
+ date: 2017-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -115,13 +115,8 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - ".coveralls.yml"
119
- - ".gitignore"
120
- - ".rspec"
121
118
  - ".rubocop.yml"
122
- - ".travis.yml"
123
119
  - Gemfile
124
- - Guardfile
125
120
  - LICENSE
126
121
  - README.md
127
122
  - Rakefile
@@ -130,6 +125,7 @@ files:
130
125
  - lib/tinybucket/api.rb
131
126
  - lib/tinybucket/api/base_api.rb
132
127
  - lib/tinybucket/api/branch_restrictions_api.rb
128
+ - lib/tinybucket/api/branches_api.rb
133
129
  - lib/tinybucket/api/build_status_api.rb
134
130
  - lib/tinybucket/api/comments_api.rb
135
131
  - lib/tinybucket/api/commits_api.rb
@@ -137,6 +133,7 @@ files:
137
133
  - lib/tinybucket/api/helper.rb
138
134
  - lib/tinybucket/api/helper/api_helper.rb
139
135
  - lib/tinybucket/api/helper/branch_restrictions_helper.rb
136
+ - lib/tinybucket/api/helper/branches_helper.rb
140
137
  - lib/tinybucket/api/helper/build_status_helper.rb
141
138
  - lib/tinybucket/api/helper/comments_helper.rb
142
139
  - lib/tinybucket/api/helper/commits_helper.rb
@@ -165,6 +162,7 @@ files:
165
162
  - lib/tinybucket/iterator.rb
166
163
  - lib/tinybucket/model.rb
167
164
  - lib/tinybucket/model/base.rb
165
+ - lib/tinybucket/model/branch.rb
168
166
  - lib/tinybucket/model/branch_restriction.rb
169
167
  - lib/tinybucket/model/build_status.rb
170
168
  - lib/tinybucket/model/comment.rb
@@ -184,9 +182,12 @@ files:
184
182
  - lib/tinybucket/null_logger.rb
185
183
  - lib/tinybucket/parser.rb
186
184
  - lib/tinybucket/parser/base_parser.rb
185
+ - lib/tinybucket/parser/branch_parser.rb
187
186
  - lib/tinybucket/parser/branch_restriction_parser.rb
188
187
  - lib/tinybucket/parser/branch_restrictions_parser.rb
188
+ - lib/tinybucket/parser/branches_parser.rb
189
189
  - lib/tinybucket/parser/build_status_parser.rb
190
+ - lib/tinybucket/parser/builds_parser.rb
190
191
  - lib/tinybucket/parser/comment_parser.rb
191
192
  - lib/tinybucket/parser/comments_parser.rb
192
193
  - lib/tinybucket/parser/commit_parser.rb
@@ -203,6 +204,7 @@ files:
203
204
  - lib/tinybucket/resource.rb
204
205
  - lib/tinybucket/resource/base.rb
205
206
  - lib/tinybucket/resource/branch_restrictions.rb
207
+ - lib/tinybucket/resource/branches.rb
206
208
  - lib/tinybucket/resource/commit/base.rb
207
209
  - lib/tinybucket/resource/commit/build_statuses.rb
208
210
  - lib/tinybucket/resource/commit/comments.rb
@@ -226,98 +228,6 @@ files:
226
228
  - lib/tinybucket/response.rb
227
229
  - lib/tinybucket/response/handler.rb
228
230
  - lib/tinybucket/version.rb
229
- - spec/fixtures/branch_restriction.json
230
- - spec/fixtures/build_status.json
231
- - spec/fixtures/comment.json
232
- - spec/fixtures/commit.json
233
- - spec/fixtures/profile.json
234
- - spec/fixtures/pull_request.json
235
- - spec/fixtures/repositories/get.json
236
- - spec/fixtures/repositories/test_owner/get.json
237
- - spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/1/get.json
238
- - spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/get.json
239
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/approve/post.json
240
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/1/get.json
241
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/get.json
242
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/get.json
243
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/post.json
244
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/test_status/get.json
245
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/test_status/put.json
246
- - spec/fixtures/repositories/test_owner/test_repo/commits/get.json
247
- - spec/fixtures/repositories/test_owner/test_repo/diff/1/get.json
248
- - spec/fixtures/repositories/test_owner/test_repo/forks/get.json
249
- - spec/fixtures/repositories/test_owner/test_repo/get.json
250
- - spec/fixtures/repositories/test_owner/test_repo/patch/1/get.json
251
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/delete.json
252
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/post.json
253
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/1/get.json
254
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/get.json
255
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/commits/get.json
256
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/decline/post.json
257
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/diff/get.txt
258
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/get.json
259
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/merge/post.json
260
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get.json
261
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_declined.json
262
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_merged.json
263
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_open.json
264
- - spec/fixtures/repositories/test_owner/test_repo/watchers/get.json
265
- - spec/fixtures/repository.json
266
- - spec/fixtures/team.json
267
- - spec/fixtures/teams/test_team/followers/get.json
268
- - spec/fixtures/teams/test_team/following/get.json
269
- - spec/fixtures/teams/test_team/get.json
270
- - spec/fixtures/teams/test_team/members/get.json
271
- - spec/fixtures/teams/test_team/repositories/get.json
272
- - spec/fixtures/users/test_owner/followers/get.json
273
- - spec/fixtures/users/test_owner/following/get.json
274
- - spec/fixtures/users/test_owner/get.json
275
- - spec/lib/tinybucket/api/branch_restrictions_api_spec.rb
276
- - spec/lib/tinybucket/api/build_status_api_spec.rb
277
- - spec/lib/tinybucket/api/comments_api_spec.rb
278
- - spec/lib/tinybucket/api/commits_api_spec.rb
279
- - spec/lib/tinybucket/api/diff_api_spec.rb
280
- - spec/lib/tinybucket/api/pull_requests_api_spec.rb
281
- - spec/lib/tinybucket/api/repo_api_spec.rb
282
- - spec/lib/tinybucket/api/repos_api_spec.rb
283
- - spec/lib/tinybucket/api/team_api_spec.rb
284
- - spec/lib/tinybucket/api/user_api_spec.rb
285
- - spec/lib/tinybucket/api_factory_spec.rb
286
- - spec/lib/tinybucket/client_spec.rb
287
- - spec/lib/tinybucket/connection_spec.rb
288
- - spec/lib/tinybucket/error/service_error_spec.rb
289
- - spec/lib/tinybucket/model/branch_restriction_spec.rb
290
- - spec/lib/tinybucket/model/build_status_spec.rb
291
- - spec/lib/tinybucket/model/comment_spec.rb
292
- - spec/lib/tinybucket/model/commit_spec.rb
293
- - spec/lib/tinybucket/model/page_spec.rb
294
- - spec/lib/tinybucket/model/profile_spec.rb
295
- - spec/lib/tinybucket/model/pull_request_spec.rb
296
- - spec/lib/tinybucket/model/repository_spec.rb
297
- - spec/lib/tinybucket/model/team_spec.rb
298
- - spec/lib/tinybucket/null_logger_spec.rb
299
- - spec/lib/tinybucket/resource/branch_restrictions_spec.rb
300
- - spec/lib/tinybucket/resource/commit/build_statuses_spec.rb
301
- - spec/lib/tinybucket/resource/commit/comments_spec.rb
302
- - spec/lib/tinybucket/resource/commits_spec.rb
303
- - spec/lib/tinybucket/resource/forks_spec.rb
304
- - spec/lib/tinybucket/resource/pull_request/comments_spec.rb
305
- - spec/lib/tinybucket/resource/pull_request/commits_spec.rb
306
- - spec/lib/tinybucket/resource/pull_requests_spec.rb
307
- - spec/lib/tinybucket/resource/repos_spec.rb
308
- - spec/lib/tinybucket/resource/team/followers_spec.rb
309
- - spec/lib/tinybucket/resource/team/following_spec.rb
310
- - spec/lib/tinybucket/resource/team/members_spec.rb
311
- - spec/lib/tinybucket/resource/team/repos_spec.rb
312
- - spec/lib/tinybucket/resource/user/followers_spec.rb
313
- - spec/lib/tinybucket/resource/user/following_spec.rb
314
- - spec/lib/tinybucket/resource/user/repos_spec.rb
315
- - spec/lib/tinybucket/resource/watchers_spec.rb
316
- - spec/lib/tinybucket_spec.rb
317
- - spec/spec_helper.rb
318
- - spec/support/api_response_macros.rb
319
- - spec/support/fixture_macros.rb
320
- - spec/support/model_macros.rb
321
231
  - tinybucket.gemspec
322
232
  homepage: http://hirakiuc.github.io/tinybucket/
323
233
  licenses:
@@ -339,101 +249,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
339
249
  version: '0'
340
250
  requirements: []
341
251
  rubyforge_project:
342
- rubygems_version: 2.5.1
252
+ rubygems_version: 2.6.10
343
253
  signing_key:
344
254
  specification_version: 4
345
255
  summary: ruby wrapper for the Bitbucket REST API (v2) with oauth
346
- test_files:
347
- - spec/fixtures/branch_restriction.json
348
- - spec/fixtures/build_status.json
349
- - spec/fixtures/comment.json
350
- - spec/fixtures/commit.json
351
- - spec/fixtures/profile.json
352
- - spec/fixtures/pull_request.json
353
- - spec/fixtures/repositories/get.json
354
- - spec/fixtures/repositories/test_owner/get.json
355
- - spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/1/get.json
356
- - spec/fixtures/repositories/test_owner/test_repo/branch-restrictions/get.json
357
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/approve/post.json
358
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/1/get.json
359
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/comments/get.json
360
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/get.json
361
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/post.json
362
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/test_status/get.json
363
- - spec/fixtures/repositories/test_owner/test_repo/commit/1/statuses/build/test_status/put.json
364
- - spec/fixtures/repositories/test_owner/test_repo/commits/get.json
365
- - spec/fixtures/repositories/test_owner/test_repo/diff/1/get.json
366
- - spec/fixtures/repositories/test_owner/test_repo/forks/get.json
367
- - spec/fixtures/repositories/test_owner/test_repo/get.json
368
- - spec/fixtures/repositories/test_owner/test_repo/patch/1/get.json
369
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/delete.json
370
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/approve/post.json
371
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/1/get.json
372
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/comments/get.json
373
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/commits/get.json
374
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/decline/post.json
375
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/diff/get.txt
376
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/get.json
377
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/1/merge/post.json
378
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get.json
379
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_declined.json
380
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_merged.json
381
- - spec/fixtures/repositories/test_owner/test_repo/pullrequests/get_state_open.json
382
- - spec/fixtures/repositories/test_owner/test_repo/watchers/get.json
383
- - spec/fixtures/repository.json
384
- - spec/fixtures/team.json
385
- - spec/fixtures/teams/test_team/followers/get.json
386
- - spec/fixtures/teams/test_team/following/get.json
387
- - spec/fixtures/teams/test_team/get.json
388
- - spec/fixtures/teams/test_team/members/get.json
389
- - spec/fixtures/teams/test_team/repositories/get.json
390
- - spec/fixtures/users/test_owner/followers/get.json
391
- - spec/fixtures/users/test_owner/following/get.json
392
- - spec/fixtures/users/test_owner/get.json
393
- - spec/lib/tinybucket/api/branch_restrictions_api_spec.rb
394
- - spec/lib/tinybucket/api/build_status_api_spec.rb
395
- - spec/lib/tinybucket/api/comments_api_spec.rb
396
- - spec/lib/tinybucket/api/commits_api_spec.rb
397
- - spec/lib/tinybucket/api/diff_api_spec.rb
398
- - spec/lib/tinybucket/api/pull_requests_api_spec.rb
399
- - spec/lib/tinybucket/api/repo_api_spec.rb
400
- - spec/lib/tinybucket/api/repos_api_spec.rb
401
- - spec/lib/tinybucket/api/team_api_spec.rb
402
- - spec/lib/tinybucket/api/user_api_spec.rb
403
- - spec/lib/tinybucket/api_factory_spec.rb
404
- - spec/lib/tinybucket/client_spec.rb
405
- - spec/lib/tinybucket/connection_spec.rb
406
- - spec/lib/tinybucket/error/service_error_spec.rb
407
- - spec/lib/tinybucket/model/branch_restriction_spec.rb
408
- - spec/lib/tinybucket/model/build_status_spec.rb
409
- - spec/lib/tinybucket/model/comment_spec.rb
410
- - spec/lib/tinybucket/model/commit_spec.rb
411
- - spec/lib/tinybucket/model/page_spec.rb
412
- - spec/lib/tinybucket/model/profile_spec.rb
413
- - spec/lib/tinybucket/model/pull_request_spec.rb
414
- - spec/lib/tinybucket/model/repository_spec.rb
415
- - spec/lib/tinybucket/model/team_spec.rb
416
- - spec/lib/tinybucket/null_logger_spec.rb
417
- - spec/lib/tinybucket/resource/branch_restrictions_spec.rb
418
- - spec/lib/tinybucket/resource/commit/build_statuses_spec.rb
419
- - spec/lib/tinybucket/resource/commit/comments_spec.rb
420
- - spec/lib/tinybucket/resource/commits_spec.rb
421
- - spec/lib/tinybucket/resource/forks_spec.rb
422
- - spec/lib/tinybucket/resource/pull_request/comments_spec.rb
423
- - spec/lib/tinybucket/resource/pull_request/commits_spec.rb
424
- - spec/lib/tinybucket/resource/pull_requests_spec.rb
425
- - spec/lib/tinybucket/resource/repos_spec.rb
426
- - spec/lib/tinybucket/resource/team/followers_spec.rb
427
- - spec/lib/tinybucket/resource/team/following_spec.rb
428
- - spec/lib/tinybucket/resource/team/members_spec.rb
429
- - spec/lib/tinybucket/resource/team/repos_spec.rb
430
- - spec/lib/tinybucket/resource/user/followers_spec.rb
431
- - spec/lib/tinybucket/resource/user/following_spec.rb
432
- - spec/lib/tinybucket/resource/user/repos_spec.rb
433
- - spec/lib/tinybucket/resource/watchers_spec.rb
434
- - spec/lib/tinybucket_spec.rb
435
- - spec/spec_helper.rb
436
- - spec/support/api_response_macros.rb
437
- - spec/support/fixture_macros.rb
438
- - spec/support/model_macros.rb
256
+ test_files: []
439
257
  has_rdoc: