octokit 3.3.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/octokit/client.rb +1 -0
- data/lib/octokit/client/organizations.rb +4 -5
- data/lib/octokit/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e93f44b8f48aa69b44b90370ff09aaad974503bf
|
4
|
+
data.tar.gz: a57e4ac826765d57536728784d62f72c0a8ed42b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9387f542df7e3bb64f3309128812807a9bee867e477c0d37408a0d8627fa430345d932afb0dd8041c27cbe0ddd57c5e0d15f724b2f8afdf2f491f5ce020e04bb
|
7
|
+
data.tar.gz: 8924124444df41bc5e5637fd6c9dbf641b63507386bc2670611550f688005a9b4321c4bf3c0c87520dc8337ddb27cd2dce19339e8051fc77efa20ffb5b5c7a68
|
data/lib/octokit/client.rb
CHANGED
@@ -220,6 +220,7 @@ module Octokit
|
|
220
220
|
def agent
|
221
221
|
@agent ||= Sawyer::Agent.new(api_endpoint, sawyer_options) do |http|
|
222
222
|
http.headers[:accept] = default_media_type
|
223
|
+
http.headers[:content_type] = "application/json"
|
223
224
|
http.headers[:user_agent] = user_agent
|
224
225
|
if basic_authenticated?
|
225
226
|
http.basic_auth(@login, @password)
|
@@ -306,8 +306,9 @@ module Octokit
|
|
306
306
|
# @client.add_team_member(100000, 'pengwynn')
|
307
307
|
#
|
308
308
|
# @example
|
309
|
-
# #
|
310
|
-
# # team
|
309
|
+
# # Opt-in to future behavior for this endpoint. Adds the member to the
|
310
|
+
# # team if they're already an org member. If not, the method will return
|
311
|
+
# # 422 and indicate the user should call the new Team Membership endpoint.
|
311
312
|
# @client.add_team_member \
|
312
313
|
# 100000,
|
313
314
|
# 'pengwynn',
|
@@ -496,13 +497,12 @@ module Octokit
|
|
496
497
|
#
|
497
498
|
# @example Check if a user has a membership for a team
|
498
499
|
# @client.team_membership(1234, 'pengwynn')
|
499
|
-
# => false
|
500
500
|
def team_membership(team_id, user, options = {})
|
501
501
|
options = ensure_org_invitations_api_media_type(options)
|
502
502
|
get "teams/#{team_id}/memberships/#{user}", options
|
503
503
|
end
|
504
504
|
|
505
|
-
#
|
505
|
+
# Add or invite a user to a team
|
506
506
|
#
|
507
507
|
# @param team_id [Integer] Team id.
|
508
508
|
# @param user [String] GitHub username of the user to invite.
|
@@ -513,7 +513,6 @@ module Octokit
|
|
513
513
|
#
|
514
514
|
# @example Check if a user has a membership for a team
|
515
515
|
# @client.add_team_membership(1234, 'pengwynn')
|
516
|
-
# => false
|
517
516
|
def add_team_membership(team_id, user, options = {})
|
518
517
|
options = ensure_org_invitations_api_media_type(options)
|
519
518
|
put "teams/#{team_id}/memberships/#{user}", options
|
data/lib/octokit/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octokit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.3.
|
4
|
+
version: 3.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wynn Netherland
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2014-08-
|
13
|
+
date: 2014-08-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|
@@ -131,3 +131,4 @@ signing_key:
|
|
131
131
|
specification_version: 4
|
132
132
|
summary: Ruby toolkit for working with the GitHub API
|
133
133
|
test_files: []
|
134
|
+
has_rdoc:
|