Sha256: be8f63940db99577fa3be3afde17e3b9d7b07aa07ca165d4752aae39f5849d19

Contents?: true

Size: 524 Bytes

Versions: 16

Compression:

Stored size: 524 Bytes

Contents

# Re-register application/json, adding our own vendored mime types as aliases

# TODO Be more generous about accepting version constraints. Currently,
# requesting v1.5 when we're running v1.5.2 will return a 406.

api_mime_types = %W(
  application/vnd.landable.v#{Landable::VERSION::MAJOR}+json
  application/vnd.landable.v#{Landable::VERSION::STRING}+json
  application/vnd.landable+json
  text/x-json
  application/jsonrequest
)

Mime::Type.unregister :json
Mime::Type.register 'application/json', :json, api_mime_types

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
landable-1.13.1 lib/landable/mime_types.rb
landable-1.12.3 lib/landable/mime_types.rb
landable-1.12.2 lib/landable/mime_types.rb
landable-1.12.1 lib/landable/mime_types.rb
landable-1.11.1 lib/landable/mime_types.rb
landable-1.11.0 lib/landable/mime_types.rb
landable-1.10.0.rc2 lib/landable/mime_types.rb
landable-1.10.0.rc1 lib/landable/mime_types.rb
landable-1.9.2 lib/landable/mime_types.rb
landable-1.9.1 lib/landable/mime_types.rb
landable-1.9.0 lib/landable/mime_types.rb
landable-1.9.0.rc2 lib/landable/mime_types.rb
landable-1.9.0.rc1 lib/landable/mime_types.rb
landable-1.8.0 lib/landable/mime_types.rb
landable-1.7.1.rc1 lib/landable/mime_types.rb
landable-1.7.0 lib/landable/mime_types.rb