Sha256: 549d2c98eaf77149a96858b3a65d5fda95df7eb4ac7f1d0315641f8fa23c0b7b
Contents?: true
Size: 723 Bytes
Versions: 2
Compression:
Stored size: 723 Bytes
Contents
module Octokit # Default setup options for preview features module Preview PREVIEW_TYPES = { :migrations => 'application/vnd.github.wyandotte-preview+json'.freeze, :licenses => 'application/vnd.github.drax-preview+json'.freeze } def ensure_api_media_type(type, options) if options[:accept].nil? options[:accept] = PREVIEW_TYPES[type] warn_preview(:migrations) end options end def warn_preview(type) warn <<-EOS WARNING: The preview version of the #{type.to_s.capitalize} 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 end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octokit-4.1.1 | lib/octokit/preview.rb |
octokit-4.1.0 | lib/octokit/preview.rb |