github_api 0.17.0 → 0.18.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/github_api.rb +38 -76
- data/lib/github_api/api.rb +35 -18
- data/lib/github_api/api/arguments.rb +5 -0
- data/lib/github_api/api/config.rb +2 -4
- data/lib/github_api/api/config/property_set.rb +1 -0
- data/lib/github_api/authorization.rb +2 -0
- data/lib/github_api/client.rb +2 -0
- data/lib/github_api/client/activity.rb +2 -0
- data/lib/github_api/client/activity/events.rb +2 -0
- data/lib/github_api/client/activity/feeds.rb +2 -0
- data/lib/github_api/client/activity/notifications.rb +2 -0
- data/lib/github_api/client/activity/starring.rb +2 -0
- data/lib/github_api/client/activity/watching.rb +2 -0
- data/lib/github_api/client/authorizations.rb +2 -0
- data/lib/github_api/client/authorizations/app.rb +3 -1
- data/lib/github_api/client/emojis.rb +2 -0
- data/lib/github_api/client/gists.rb +2 -0
- data/lib/github_api/client/gists/comments.rb +2 -0
- data/lib/github_api/client/git_data.rb +2 -0
- data/lib/github_api/client/git_data/blobs.rb +2 -1
- data/lib/github_api/client/git_data/commits.rb +2 -0
- data/lib/github_api/client/git_data/references.rb +2 -0
- data/lib/github_api/client/git_data/tags.rb +2 -0
- data/lib/github_api/client/git_data/trees.rb +2 -0
- data/lib/github_api/client/gitignore.rb +2 -0
- data/lib/github_api/client/issues.rb +2 -0
- data/lib/github_api/client/issues/assignees.rb +35 -0
- data/lib/github_api/client/issues/comments.rb +2 -0
- data/lib/github_api/client/issues/events.rb +2 -0
- data/lib/github_api/client/issues/labels.rb +2 -0
- data/lib/github_api/client/issues/milestones.rb +2 -0
- data/lib/github_api/client/markdown.rb +3 -1
- data/lib/github_api/client/meta.rb +2 -0
- data/lib/github_api/client/orgs.rb +2 -0
- data/lib/github_api/client/orgs/hooks.rb +2 -0
- data/lib/github_api/client/orgs/members.rb +2 -0
- data/lib/github_api/client/orgs/memberships.rb +2 -0
- data/lib/github_api/client/orgs/projects.rb +2 -0
- data/lib/github_api/client/orgs/teams.rb +2 -0
- data/lib/github_api/client/projects.rb +2 -0
- data/lib/github_api/client/projects/cards.rb +3 -1
- data/lib/github_api/client/projects/columns.rb +2 -0
- data/lib/github_api/client/pull_requests.rb +2 -0
- data/lib/github_api/client/pull_requests/comments.rb +2 -0
- data/lib/github_api/client/pull_requests/reviews.rb +2 -0
- data/lib/github_api/client/repos.rb +17 -13
- data/lib/github_api/client/repos/branches.rb +48 -0
- data/lib/github_api/client/repos/branches/protections.rb +75 -0
- data/lib/github_api/client/repos/collaborators.rb +2 -1
- data/lib/github_api/client/repos/comments.rb +2 -0
- data/lib/github_api/client/repos/commits.rb +2 -0
- data/lib/github_api/client/repos/contents.rb +2 -0
- data/lib/github_api/client/repos/deployments.rb +2 -0
- data/lib/github_api/client/repos/downloads.rb +2 -0
- data/lib/github_api/client/repos/forks.rb +2 -0
- data/lib/github_api/client/repos/hooks.rb +2 -0
- data/lib/github_api/client/repos/keys.rb +2 -0
- data/lib/github_api/client/repos/merging.rb +2 -0
- data/lib/github_api/client/repos/pages.rb +2 -0
- data/lib/github_api/client/repos/projects.rb +4 -2
- data/lib/github_api/client/repos/pub_sub_hubbub.rb +2 -0
- data/lib/github_api/client/repos/releases.rb +2 -0
- data/lib/github_api/client/repos/releases/assets.rb +3 -1
- data/lib/github_api/client/repos/releases/tags.rb +2 -0
- data/lib/github_api/client/repos/statistics.rb +2 -0
- data/lib/github_api/client/repos/statuses.rb +2 -0
- data/lib/github_api/client/say.rb +2 -0
- data/lib/github_api/client/scopes.rb +2 -0
- data/lib/github_api/client/search.rb +3 -0
- data/lib/github_api/client/search/legacy.rb +2 -0
- data/lib/github_api/client/users.rb +2 -0
- data/lib/github_api/client/users/emails.rb +3 -0
- data/lib/github_api/client/users/followers.rb +2 -0
- data/lib/github_api/client/users/keys.rb +2 -0
- data/lib/github_api/configuration.rb +2 -1
- data/lib/github_api/connection.rb +4 -0
- data/lib/github_api/error.rb +1 -4
- data/lib/github_api/error/client_error.rb +2 -0
- data/lib/github_api/error/service_error.rb +2 -0
- data/lib/github_api/ext/faraday.rb +1 -1
- data/lib/github_api/middleware.rb +7 -7
- data/lib/github_api/page_iterator.rb +4 -1
- data/lib/github_api/page_links.rb +4 -0
- data/lib/github_api/paged_request.rb +2 -0
- data/lib/github_api/pagination.rb +4 -1
- data/lib/github_api/parameter_filter.rb +4 -1
- data/lib/github_api/params_hash.rb +3 -0
- data/lib/github_api/request.rb +5 -5
- data/lib/github_api/request/jsonize.rb +0 -1
- data/lib/github_api/request/oauth2.rb +2 -0
- data/lib/github_api/request/verbs.rb +3 -0
- data/lib/github_api/response/header.rb +2 -0
- data/lib/github_api/response/raise_error.rb +2 -1
- data/lib/github_api/response_wrapper.rb +5 -0
- data/lib/github_api/utils/url.rb +2 -0
- data/lib/github_api/validations.rb +5 -8
- data/lib/github_api/validations/format.rb +2 -0
- data/lib/github_api/validations/presence.rb +2 -0
- data/lib/github_api/validations/required.rb +2 -0
- data/lib/github_api/version.rb +1 -1
- metadata +9 -34
@@ -1,5 +1,9 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
require 'forwardable'
|
4
|
+
|
5
|
+
require_relative 'pagination'
|
6
|
+
|
3
7
|
module Github
|
4
8
|
# A class responsible for proxing to faraday response
|
5
9
|
class ResponseWrapper
|
@@ -19,6 +23,7 @@ module Github
|
|
19
23
|
@response = response
|
20
24
|
@current_api = current_api
|
21
25
|
@env = response.env
|
26
|
+
@body = nil
|
22
27
|
end
|
23
28
|
|
24
29
|
# Overwrite methods to hash keys
|
data/lib/github_api/utils/url.rb
CHANGED
@@ -1,14 +1,12 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
+
require_relative 'validations/format'
|
4
|
+
require_relative 'validations/presence'
|
5
|
+
require_relative 'validations/required'
|
6
|
+
require_relative 'validations/token'
|
7
|
+
|
3
8
|
module Github
|
4
9
|
module Validations
|
5
|
-
|
6
|
-
Github::require_all 'github_api/validations',
|
7
|
-
'presence',
|
8
|
-
'token',
|
9
|
-
'format',
|
10
|
-
'required'
|
11
|
-
|
12
10
|
include Presence
|
13
11
|
include Format
|
14
12
|
include Token
|
@@ -20,6 +18,5 @@ module Github
|
|
20
18
|
'auto_pagination',
|
21
19
|
'jsonp_callback'
|
22
20
|
]
|
23
|
-
|
24
21
|
end # Validation
|
25
22
|
end # Github
|
data/lib/github_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.18.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Murach
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-10-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 2.4
|
19
|
+
version: '2.4'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 2.4
|
26
|
+
version: '2.4'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hashie
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -45,9 +45,6 @@ dependencies:
|
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0.8'
|
48
|
-
- - "<"
|
49
|
-
- !ruby/object:Gem::Version
|
50
|
-
version: '0.10'
|
51
48
|
type: :runtime
|
52
49
|
prerelease: false
|
53
50
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -55,9 +52,6 @@ dependencies:
|
|
55
52
|
- - "~>"
|
56
53
|
- !ruby/object:Gem::Version
|
57
54
|
version: '0.8'
|
58
|
-
- - "<"
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
version: '0.10'
|
61
55
|
- !ruby/object:Gem::Dependency
|
62
56
|
name: oauth2
|
63
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -86,26 +80,6 @@ dependencies:
|
|
86
80
|
- - "~>"
|
87
81
|
- !ruby/object:Gem::Version
|
88
82
|
version: 0.0.4
|
89
|
-
- !ruby/object:Gem::Dependency
|
90
|
-
name: mime-types
|
91
|
-
requirement: !ruby/object:Gem::Requirement
|
92
|
-
requirements:
|
93
|
-
- - ">="
|
94
|
-
- !ruby/object:Gem::Version
|
95
|
-
version: '1.16'
|
96
|
-
- - "<"
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '3.0'
|
99
|
-
type: :runtime
|
100
|
-
prerelease: false
|
101
|
-
version_requirements: !ruby/object:Gem::Requirement
|
102
|
-
requirements:
|
103
|
-
- - ">="
|
104
|
-
- !ruby/object:Gem::Version
|
105
|
-
version: '1.16'
|
106
|
-
- - "<"
|
107
|
-
- !ruby/object:Gem::Version
|
108
|
-
version: '3.0'
|
109
83
|
- !ruby/object:Gem::Dependency
|
110
84
|
name: bundler
|
111
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -188,14 +162,14 @@ dependencies:
|
|
188
162
|
requirements:
|
189
163
|
- - "~>"
|
190
164
|
- !ruby/object:Gem::Version
|
191
|
-
version:
|
165
|
+
version: 3.0.1
|
192
166
|
type: :development
|
193
167
|
prerelease: false
|
194
168
|
version_requirements: !ruby/object:Gem::Requirement
|
195
169
|
requirements:
|
196
170
|
- - "~>"
|
197
171
|
- !ruby/object:Gem::Version
|
198
|
-
version:
|
172
|
+
version: 3.0.1
|
199
173
|
description: " Ruby client that supports all of the GitHub API methods. It's build
|
200
174
|
in a modular way, that is, you can either instantiate the whole api wrapper Github.new
|
201
175
|
or use parts of it e.i. Github::Client::Repos.new if working solely with repositories
|
@@ -258,6 +232,8 @@ files:
|
|
258
232
|
- lib/github_api/client/pull_requests/comments.rb
|
259
233
|
- lib/github_api/client/pull_requests/reviews.rb
|
260
234
|
- lib/github_api/client/repos.rb
|
235
|
+
- lib/github_api/client/repos/branches.rb
|
236
|
+
- lib/github_api/client/repos/branches/protections.rb
|
261
237
|
- lib/github_api/client/repos/collaborators.rb
|
262
238
|
- lib/github_api/client/repos/comments.rb
|
263
239
|
- lib/github_api/client/repos/commits.rb
|
@@ -343,7 +319,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
343
319
|
requirements:
|
344
320
|
- - ">="
|
345
321
|
- !ruby/object:Gem::Version
|
346
|
-
version:
|
322
|
+
version: 2.0.0
|
347
323
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
348
324
|
requirements:
|
349
325
|
- - ">="
|
@@ -356,4 +332,3 @@ signing_key:
|
|
356
332
|
specification_version: 4
|
357
333
|
summary: Ruby client for the official GitHub API
|
358
334
|
test_files: []
|
359
|
-
has_rdoc:
|