octokit 3.4.0 → 3.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/octokit/client/contents.rb +1 -1
- data/lib/octokit/client/organizations.rb +0 -27
- data/lib/octokit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c5011173f4e1967f5ab1b429c825bce76fb1b3a
|
4
|
+
data.tar.gz: 215d8fc1199586fdbb9981234b20e319a6854fef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c950fef2931dad1f1dddf4f6bdd3773cdaccf399cf1f929fbce6308140508db97f1d9458ddb2c27e051daf9ded21341e726073f8574d7051fe9720523b4dcf3
|
7
|
+
data.tar.gz: d0370c088b60747a0919f188b879597fa2a1bfa98c13ed01e22a736b53e2c12ddf8c1f2fcc6a146c5ad56a5d32c13f904ed041f1ce4cd6af71458969834e55c6
|
data/README.md
CHANGED
@@ -221,7 +221,7 @@ user = client.user 'defunkt'
|
|
221
221
|
[auth]: http://developer.github.com/v3/#authentication
|
222
222
|
[oauth]: http://developer.github.com/v3/oauth/
|
223
223
|
[access scopes]: http://developer.github.com/v3/oauth/#scopes
|
224
|
-
[app-creds]: http://developer.github.com/v3/#unauthenticated-rate-
|
224
|
+
[app-creds]: http://developer.github.com/v3/#increasing-the-unauthenticated-rate-limit-for-oauth-applications
|
225
225
|
|
226
226
|
## Pagination
|
227
227
|
|
@@ -6,8 +6,6 @@ module Octokit
|
|
6
6
|
# @see https://developer.github.com/v3/orgs/
|
7
7
|
module Organizations
|
8
8
|
|
9
|
-
ORG_INVITATIONS_PREVIEW_MEDIA_TYPE = "application/vnd.github.the-wasp-preview+json".freeze
|
10
|
-
|
11
9
|
# Get an organization
|
12
10
|
#
|
13
11
|
# @param org [String, Integer] Organization GitHub login or id.
|
@@ -498,7 +496,6 @@ module Octokit
|
|
498
496
|
# @example Check if a user has a membership for a team
|
499
497
|
# @client.team_membership(1234, 'pengwynn')
|
500
498
|
def team_membership(team_id, user, options = {})
|
501
|
-
options = ensure_org_invitations_api_media_type(options)
|
502
499
|
get "teams/#{team_id}/memberships/#{user}", options
|
503
500
|
end
|
504
501
|
|
@@ -514,7 +511,6 @@ module Octokit
|
|
514
511
|
# @example Check if a user has a membership for a team
|
515
512
|
# @client.add_team_membership(1234, 'pengwynn')
|
516
513
|
def add_team_membership(team_id, user, options = {})
|
517
|
-
options = ensure_org_invitations_api_media_type(options)
|
518
514
|
put "teams/#{team_id}/memberships/#{user}", options
|
519
515
|
end
|
520
516
|
|
@@ -527,7 +523,6 @@ module Octokit
|
|
527
523
|
# @example
|
528
524
|
# @client.remove_team_membership(100000, 'pengwynn')
|
529
525
|
def remove_team_membership(team_id, user, options = {})
|
530
|
-
options = ensure_org_invitations_api_media_type(options)
|
531
526
|
boolean_from_response :delete, "teams/#{team_id}/memberships/#{user}", options
|
532
527
|
end
|
533
528
|
|
@@ -536,7 +531,6 @@ module Octokit
|
|
536
531
|
# @return [Array<Sawyer::Resource>] Array of organizations memberships.
|
537
532
|
# @see https://developer.github.com/v3/orgs/members/#list-your-organization-memberships
|
538
533
|
def organization_memberships(options = {})
|
539
|
-
options = ensure_org_invitations_api_media_type(options)
|
540
534
|
paginate "user/memberships/orgs", options
|
541
535
|
end
|
542
536
|
alias :org_memberships :organization_memberships
|
@@ -547,7 +541,6 @@ module Octokit
|
|
547
541
|
# @return [Sawyer::Resource] Hash representing the organization membership.
|
548
542
|
# @see https://developer.github.com/v3/orgs/members/#get-your-organization-membership
|
549
543
|
def organization_membership(org, options = {})
|
550
|
-
options = ensure_org_invitations_api_media_type(options)
|
551
544
|
get "user/memberships/orgs/#{org}", options
|
552
545
|
end
|
553
546
|
alias :org_membership :organization_membership
|
@@ -559,29 +552,9 @@ module Octokit
|
|
559
552
|
# @return [Sawyer::Resource] Hash representing the updated organization membership.
|
560
553
|
# @see https://developer.github.com/v3/orgs/members/#edit-your-organization-membership
|
561
554
|
def update_organization_membership(org, options = {})
|
562
|
-
options = ensure_org_invitations_api_media_type(options)
|
563
555
|
patch "user/memberships/orgs/#{org}", options
|
564
556
|
end
|
565
557
|
alias :update_org_membership :update_organization_membership
|
566
|
-
|
567
|
-
private
|
568
|
-
|
569
|
-
def ensure_org_invitations_api_media_type(options = {})
|
570
|
-
if options[:accept].nil?
|
571
|
-
options[:accept] = ORG_INVITATIONS_PREVIEW_MEDIA_TYPE
|
572
|
-
warn_org_invitations_preview
|
573
|
-
end
|
574
|
-
|
575
|
-
options
|
576
|
-
end
|
577
|
-
|
578
|
-
def warn_org_invitations_preview
|
579
|
-
octokit_warn \
|
580
|
-
"WARNING: The preview version of the Organization Team Memberships API " \
|
581
|
-
"is not yet suitable for production use. You can avoid this message by " \
|
582
|
-
"supplying an appropriate media type in the 'Accept' request header. " \
|
583
|
-
"See the blog post for details: http://git.io/a9jglQ"
|
584
|
-
end
|
585
558
|
end
|
586
559
|
end
|
587
560
|
end
|
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.4.
|
4
|
+
version: 3.4.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-
|
13
|
+
date: 2014-10-15 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|