Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
zqzas committed Mar 15, 2015
1 parent 6a4e41f commit b86f22a
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/octokit/client/licenses.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ module Licenses
# @example
# Octokit.licenses
def licenses(options = {})
options = ensure_deployments_api_media_type(options)
get "licenses", options
options = ensure_license_api_media_type(options)
paginate "licenses", options
end

# List an individual license
Expand All @@ -26,21 +26,21 @@ def licenses(options = {})
# @example
# Octokit.license 'mit'
def license(license_name, options = {})
options = ensure_deployments_api_media_type(options)
options = ensure_license_api_media_type(options)
get "licenses/#{license_name}", options
end

def ensure_deployments_api_media_type(options = {})
def ensure_license_api_media_type(options = {})
if options[:accept].nil?
options[:accept] = LICENSES_PREVIEW_MEDIA_TYPE
warn_deployments_preview
warn_license_preview
end
options
end

def warn_deployments_preview
def warn_license_preview
warn <<-EOS
WARNING: The preview version of the Deployments API is not yet suitable for production use.
WARNING: The preview version of the License API is not yet suitable for production use.
You can avoid this message by supplying an appropriate media type in the 'Accept' request
header.
EOS
Expand Down

0 comments on commit b86f22a

Please sign in to comment.