octokit 4.10.0 → 4.11.0

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: a460f667b29d977f38ccdc7c2c57d2460c599c70
4
- data.tar.gz: edcff602f1d864efef9472b3245cc6f8f87fc09d
3
+ metadata.gz: e90c0bdd450abdce8099b97ae69f993e36ccd98d
4
+ data.tar.gz: a8c2537d2382898f39fda8e9b8c798008f770ce6
5
5
  SHA512:
6
- metadata.gz: 22491d526fdcaf97d1f5d910cac626ecbf19acc6729e43746743b4394bc46a7b923db762874400fdcecb65cdbe2ea6e7487ce3c66f5656d45c9409755a10dc2f
7
- data.tar.gz: eedcea418fbc75dea800de3700d5dd48a62f1b2f47702b470ca1b1c4c3d564f8a4f2e5f58b8754f27a11aac64e0f8ddd5eea0e576ed2a046812d38ef532a73df
6
+ metadata.gz: 64bbf163e56cfddb84ae0c7650f4139cf2a44d333b2db15ce8a6198c9d4c06c7ffe6a211c157aea389a325d5bfd09d1319a6e7a0124d2b6c24faaa91f87c3b28
7
+ data.tar.gz: ccd20f1bf0165f330ebd2fea63753c4c4665bfaa5d888be64443d3b58ca4628e131722a8aee898e278930bea103c042ccf5d597ce43f90a3e89f9a5d392f1952
data/README.md CHANGED
@@ -73,6 +73,10 @@ Install via Rubygems
73
73
 
74
74
  gem "octokit", "~> 4.0"
75
75
 
76
+ Access the library in Ruby:
77
+
78
+ require 'octokit'
79
+
76
80
  ### Making requests
77
81
 
78
82
  [API methods][] are available as client instance methods.
@@ -63,7 +63,7 @@ module Octokit
63
63
  # @return [<Sawyer::Resource>] An installation token
64
64
  def create_app_installation_access_token(installation, options = {})
65
65
  opts = ensure_api_media_type(:integrations, options)
66
- post "installations/#{installation}/access_tokens", opts
66
+ post "app/installations/#{installation}/access_tokens", opts
67
67
  end
68
68
  alias create_installation_access_token create_app_installation_access_token
69
69
 
@@ -77,6 +77,45 @@ module Octokit
77
77
  create_app_installation_access_token(installation, options)
78
78
  end
79
79
 
80
+ # Enables an app to find the organization's installation information.
81
+ #
82
+ # @param org [String] Organization GitHub login
83
+ # @param options [Hash] A customizable set of options
84
+ #
85
+ # @see https://developer.github.com/v3/apps/#find-organization-installation
86
+ #
87
+ # @return [Sawyer::Resource] Installation information
88
+ def find_organization_installation(organization, options = {})
89
+ opts = ensure_api_media_type(:integrations, options)
90
+ get "#{Organization.path(organization)}/installation", opts
91
+ end
92
+
93
+ # Enables an app to find the repository's installation information.
94
+ #
95
+ # @param repo [String] A GitHub repository
96
+ # @param options [Hash] A customizable set of options
97
+ #
98
+ # @see https://developer.github.com/v3/apps/#find-repository-installation
99
+ #
100
+ # @return [Sawyer::Resource] Installation information
101
+ def find_repository_installation(repo, options = {})
102
+ opts = ensure_api_media_type(:integrations, options)
103
+ get "#{Repository.path(repo)}/installation", opts
104
+ end
105
+
106
+ # Enables an app to find the user's installation information.
107
+ #
108
+ # @param user [String] GitHub user login
109
+ # @param options [Hash] A customizable set of options
110
+ #
111
+ # @see https://developer.github.com/v3/apps/#find-user-installation
112
+ #
113
+ # @return [Sawyer::Resource] Installation information
114
+ def find_user_installation(user, options = {})
115
+ opts = ensure_api_media_type(:integrations, options)
116
+ get "#{User.path(user)}/installation", opts
117
+ end
118
+
80
119
  # List repositories that are accessible to the authenticated installation
81
120
  #
82
121
  # @param options [Hash] A customizable set of options
@@ -231,7 +231,7 @@ module Octokit
231
231
  #
232
232
  # @param org [String, Integer] Organization GitHub login or id.
233
233
  # @return [Array<Sawyer::Resource>] Array of hashes representing users.
234
- # @see https://developer.github.com/v3/orgs/outside-collaborators/#list-outside-collaborators
234
+ # @see https://developer.github.com/v3/orgs/outside_collaborators/#list-outside-collaborators
235
235
  #
236
236
  # @example
237
237
  # @client.outside_collaborators('github')
@@ -524,7 +524,7 @@ module Octokit
524
524
  # @example Add a team with admin permissions
525
525
  # @client.add_team_repository(100000, 'github/developer.github.com', permission: 'admin')
526
526
  def add_team_repository(team_id, repo, options = {})
527
- boolean_from_response :put, "teams/#{team_id}/repos/#{Repository.new(repo)}", options.merge(:name => Repository.new(repo))
527
+ boolean_from_response :put, "teams/#{team_id}/repos/#{Repository.new(repo)}", options
528
528
  end
529
529
  alias :add_team_repo :add_team_repository
530
530
 
@@ -5,7 +5,7 @@ module Octokit
5
5
 
6
6
  # Current minor release.
7
7
  # @return [Integer]
8
- MINOR = 10
8
+ MINOR = 11
9
9
 
10
10
  # Current patch level.
11
11
  # @return [Integer]
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: 4.10.0
4
+ version: 4.11.0
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: 2018-08-09 00:00:00.000000000 Z
13
+ date: 2018-08-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler