octokit 2.5.0 → 2.5.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: 8c21feeb271532d08aa8fab12592183f7b641475
4
- data.tar.gz: 54713209e7ff15a840bde44b91f20ef838f411d1
3
+ metadata.gz: c3cf1af069f8340a238fee661f517dbf868eb9b6
4
+ data.tar.gz: 2bab369c18b322be7db2c851bd83252d9709a4be
5
5
  SHA512:
6
- metadata.gz: 73e5cd0618ca59735e3edfca2f76d264dc32f964cd48fdeeee738480fbf2f0ffeab399e6ebeb73f3707b8ec94043f54070811e5d6eb2b17ca62aa584652bc0f2
7
- data.tar.gz: 78266ae30f9cd5e5f85a4b13c81bd0903854fb94a89c44eff851413b872d2bc40043a53a20e625faaa4659a21def7c7a32e3fbc8a53434f01b9cfbec92ab79fe
6
+ metadata.gz: 8395f228a0a1c37f53b9deb90e4fe2966a76e149c94090140d9f2b23ec32a808be5349148a0d104ffed5443b4aa0f4efb428ee3460a77432e82af51133650a06
7
+ data.tar.gz: 75ed932cc964201d45e62d154cc955e586e10cff2f7e8302adf271a2c1185c95c103ba7cea096c08ee0a06b235bf6029ac49c3bbdbe047c5a4041594de0bca4b
@@ -6,17 +6,12 @@ module Octokit
6
6
  # @see http://developer.github.com/v3/repos/releases/
7
7
  module Releases
8
8
 
9
- # @private
10
- PREVIEW_MEDIA_TYPE = "application/vnd.github.manifold-preview".freeze
11
-
12
9
  # List releases for a repository
13
10
  #
14
11
  # @param repo [String, Repository, Hash] A GitHub repository
15
12
  # @return [Array<Sawyer::Resource>] A list of releases
16
13
  # @see http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
17
14
  def releases(repo, options = {})
18
- options[:accept] ||= PREVIEW_MEDIA_TYPE
19
- warn_releases_preview
20
15
  paginate "repos/#{Repository.new(repo)}/releases", options
21
16
  end
22
17
  alias :list_releases :releases
@@ -33,8 +28,6 @@ module Octokit
33
28
  # @return [Sawyer::Resource] The release
34
29
  # @see http://developer.github.com/v3/repos/releases/#create-a-release
35
30
  def create_release(repo, tag_name, options = {})
36
- options[:accept] ||= PREVIEW_MEDIA_TYPE
37
- warn_releases_preview
38
31
  opts = options.merge(:tag_name => tag_name)
39
32
  post "repos/#{Repository.new(repo)}/releases", opts
40
33
  end
@@ -45,8 +38,6 @@ module Octokit
45
38
  # @return [Sawyer::Resource] The release
46
39
  # @see http://developer.github.com/v3/repos/releases/#get-a-single-release
47
40
  def release(url, options = {})
48
- options[:accept] ||= PREVIEW_MEDIA_TYPE
49
- warn_releases_preview
50
41
  get url, options
51
42
  end
52
43
 
@@ -61,8 +52,6 @@ module Octokit
61
52
  # @return [Sawyer::Resource] The release
62
53
  # @see http://developer.github.com/v3/repos/releases/#edit-a-release
63
54
  def update_release(url, options = {})
64
- options[:accept] ||= PREVIEW_MEDIA_TYPE
65
- warn_releases_preview
66
55
  patch url, options
67
56
  end
68
57
  alias :edit_release :update_release
@@ -73,8 +62,6 @@ module Octokit
73
62
  # @return [Boolean] Success or failure
74
63
  # @see http://developer.github.com/v3/repos/releases/#delete-a-release
75
64
  def delete_release(url, options = {})
76
- options[:accept] ||= PREVIEW_MEDIA_TYPE
77
- warn_releases_preview
78
65
  boolean_from_response(:delete, url, options)
79
66
  end
80
67
 
@@ -84,8 +71,6 @@ module Octokit
84
71
  # @return [Array<Sawyer::Resource>] A list of release assets
85
72
  # @see http://developer.github.com/v3/repos/releases/#list-assets-for-a-release
86
73
  def release_assets(release_url, options = {})
87
- options[:accept] ||= PREVIEW_MEDIA_TYPE
88
- warn_releases_preview
89
74
  paginate release(release_url).rels[:assets].href, options
90
75
  end
91
76
 
@@ -98,8 +83,6 @@ module Octokit
98
83
  # @return [Sawyer::Resource] The release asset
99
84
  # @see http://developer.github.com/v3/repos/releases/#upload-a-release-asset
100
85
  def upload_asset(release_url, path_or_file, options = {})
101
- options[:accept] ||= PREVIEW_MEDIA_TYPE
102
- warn_releases_preview
103
86
  file = path_or_file.respond_to?(:read) ? path_or_file : File.new(path_or_file, "r+b")
104
87
  options[:content_type] ||= content_type_from_file(file)
105
88
  raise Octokit::MissingContentType.new if options[:content_type].nil?
@@ -120,8 +103,6 @@ module Octokit
120
103
  # @return [Sawyer::Resource] The release asset
121
104
  # @see http://developer.github.com/v3/repos/releases/#get-a-single-release-asset
122
105
  def release_asset(asset_url, options = {})
123
- options[:accept] ||= PREVIEW_MEDIA_TYPE
124
- warn_releases_preview
125
106
  get(asset_url, options)
126
107
  end
127
108
 
@@ -133,8 +114,6 @@ module Octokit
133
114
  # @return [Sawyer::Resource] The release asset
134
115
  # @see http://developer.github.com/v3/repos/releases/#get-a-single-release-asset
135
116
  def update_release_asset(asset_url, options = {})
136
- options[:accept] ||= PREVIEW_MEDIA_TYPE
137
- warn_releases_preview
138
117
  patch(asset_url, options)
139
118
  end
140
119
  alias :edit_release_asset :update_release_asset
@@ -145,8 +124,6 @@ module Octokit
145
124
  # @return [Boolean] Success or failure
146
125
  # @see http://developer.github.com/v3/repos/releases/#delete-a-release-asset
147
126
  def delete_release_asset(asset_url, options = {})
148
- options[:accept] ||= PREVIEW_MEDIA_TYPE
149
- warn_releases_preview
150
127
  boolean_from_response(:delete, asset_url, options)
151
128
  end
152
129
 
@@ -162,12 +139,6 @@ module Octokit
162
139
  raise Octokit::MissingContentType.new msg
163
140
  end
164
141
 
165
- def warn_releases_preview
166
- warn <<-EOS
167
- WARNING: The preview version of the Releases API is not yet suitable for production use.
168
- See the blog post for details: http://git.io/gMY9sA
169
- EOS
170
- end
171
142
  end
172
143
  end
173
144
  end
@@ -67,11 +67,6 @@ module Octokit
67
67
 
68
68
  def search(path, query, options = {})
69
69
  opts = options.merge(:q => query)
70
- opts[:accept] ||= "application/vnd.github.preview"
71
- warn <<-EOS
72
- WARNING: The preview version of the Search API is not yet suitable for production use.
73
- See the blog post for details: http://git.io/_-FA3g
74
- EOS
75
70
  paginate path, opts
76
71
  end
77
72
  end
@@ -2,6 +2,6 @@ module Octokit
2
2
 
3
3
  # Current version
4
4
  # @return [String]
5
- VERSION = "2.5.0".freeze
5
+ VERSION = "2.5.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: 2.5.0
4
+ version: 2.5.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: 2013-10-22 00:00:00.000000000 Z
13
+ date: 2013-10-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
@@ -124,4 +124,3 @@ signing_key:
124
124
  specification_version: 4
125
125
  summary: Ruby toolkit for working with the GitHub API
126
126
  test_files: []
127
- has_rdoc: