octokit 3.3.0 → 3.3.1

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
  SHA1:
3
- metadata.gz: 50843d946bedec18101a1a6e8d891bd90300c10f
4
- data.tar.gz: 7d1676c589e378ccda28887ea873674bd22e5c8b
3
+ metadata.gz: e93f44b8f48aa69b44b90370ff09aaad974503bf
4
+ data.tar.gz: a57e4ac826765d57536728784d62f72c0a8ed42b
5
5
  SHA512:
6
- metadata.gz: 9dc114a9fd18130673eabe703a7f730690342b4b951ee48fe89a2aee0c055847e0a77eb621109ea6ba7db98a7bfe9bc0bfc82d7947c5877692df6123fe91d8fc
7
- data.tar.gz: a28fcc8ccdef9d3b8b84685e9d3d0365351cea24640420414abefaf310b02cee1642bea38ddc39f9ad9f3bba5af0bf80d5eb1b36a18318a15ba04f5905fd5179
6
+ metadata.gz: 9387f542df7e3bb64f3309128812807a9bee867e477c0d37408a0d8627fa430345d932afb0dd8041c27cbe0ddd57c5e0d15f724b2f8afdf2f491f5ce020e04bb
7
+ data.tar.gz: 8924124444df41bc5e5637fd6c9dbf641b63507386bc2670611550f688005a9b4321c4bf3c0c87520dc8337ddb27cd2dce19339e8051fc77efa20ffb5b5c7a68
@@ -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
- # # Invite a member to a team. The user won't be added to the
310
- # # team until he/she accepts the invite via email.
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
- # Invite a user to a team
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
@@ -2,6 +2,6 @@ module Octokit
2
2
 
3
3
  # Current version
4
4
  # @return [String]
5
- VERSION = "3.3.0".freeze
5
+ VERSION = "3.3.1".freeze
6
6
 
7
7
  end
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.0
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-06 00:00:00.000000000 Z
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: