octokit 3.7.1 → 3.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/octokit/client/hooks.rb +1 -1
- data/lib/octokit/client/releases.rb +17 -0
- data/lib/octokit/error.rb +6 -0
- data/lib/octokit/version.rb +2 -2
- 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: f2dedaa6599d61d3a75894f9d9650fc19f795510
|
4
|
+
data.tar.gz: cb4a2597cfa0df06f1f82c002e81e1dec0fee990
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b7d47dd30eff757599a6ce3080c60f7fdbdb99089cc9c9cee724f8e7cd5255b10a714698725a3f00ed59aee32e620e6ae9e6ac86f8c88590bccb463dcd72fb7
|
7
|
+
data.tar.gz: 826384c7909a6dcfd31f8590a9a6eeadbdda2a9b4b281f0bcb06d601e2d9ba74b0533d1cd946820650c09be07639236e1dde5b1549043ee6c430061a3ce5ac0f
|
data/lib/octokit/client/hooks.rb
CHANGED
@@ -292,7 +292,7 @@ module Octokit
|
|
292
292
|
octokit_warn <<-EOS
|
293
293
|
WARNING: The preview version of the Org Hooks API is not yet suitable for production use.
|
294
294
|
You can avoid this message by supplying an appropriate media type in the 'Accept' request
|
295
|
-
header. See the blog post for details: http://git.io
|
295
|
+
header. See the blog post for details: http://git.io/uucWqg
|
296
296
|
EOS
|
297
297
|
end
|
298
298
|
end
|
@@ -127,6 +127,23 @@ module Octokit
|
|
127
127
|
boolean_from_response(:delete, asset_url, options)
|
128
128
|
end
|
129
129
|
|
130
|
+
# Get the release for a given tag
|
131
|
+
#
|
132
|
+
# @param repo [Integer, String, Repository, Hash] A GitHub repository
|
133
|
+
# @param tag_name [String] the name for a tag
|
134
|
+
# @return [Sawyer::Resource] The release
|
135
|
+
def release_for_tag(repo, tag_name, options = {})
|
136
|
+
get "#{Repository.path repo}/releases/tags/#{tag_name}", options
|
137
|
+
end
|
138
|
+
|
139
|
+
# Get the latest release
|
140
|
+
#
|
141
|
+
# @param repo [Integer, String, Repository, Hash] A GitHub repository
|
142
|
+
# @return [Sawyer::Resource] The release
|
143
|
+
def latest_release(repo, options = {})
|
144
|
+
get "#{Repository.path repo}/releases/latest", options
|
145
|
+
end
|
146
|
+
|
130
147
|
private
|
131
148
|
|
132
149
|
def content_type_from_file(file)
|
data/lib/octokit/error.rb
CHANGED
@@ -64,6 +64,8 @@ module Octokit
|
|
64
64
|
Octokit::TooManyLoginAttempts
|
65
65
|
elsif body =~ /abuse/i
|
66
66
|
Octokit::AbuseDetected
|
67
|
+
elsif body =~ /repository access blocked/i
|
68
|
+
Octokit::RepositoryUnavailable
|
67
69
|
else
|
68
70
|
Octokit::Forbidden
|
69
71
|
end
|
@@ -193,6 +195,10 @@ module Octokit
|
|
193
195
|
# and body matches 'abuse'
|
194
196
|
class AbuseDetected < Forbidden; end
|
195
197
|
|
198
|
+
# Raised when GitHub returns a 403 HTTP status code
|
199
|
+
# and body matches 'repository access blocked'
|
200
|
+
class RepositoryUnavailable < Forbidden; end
|
201
|
+
|
196
202
|
# Raised when GitHub returns a 404 HTTP status code
|
197
203
|
class NotFound < ClientError; end
|
198
204
|
|
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
|
+
version: 3.8.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: 2015-02-
|
13
|
+
date: 2015-02-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: bundler
|