media_types-deserialization 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: 522ed41fba09def86e1607d0eea9fd6661b49f304155ff2cfeaf0bc1f41623cc
4
- data.tar.gz: ce054679126400c621bd4ebebc01fd9e9e0520b15a5ba94bf5d655919ad658c6
3
+ metadata.gz: 1bbd23e88f2aede4504ab00dc8bbbdf38dcd23bf0ac7eeaa27703a08e467918a
4
+ data.tar.gz: 37cce138d77c59e7c42b7928eab60a6837ef3e93cb31cea00374e4e47e992fcd
5
5
  SHA512:
6
- metadata.gz: 319400731c644fd7dc7c34f134e9e9da7bbe70bd6d486f0457ccb6617f24f1558da0cda2b394b2c84ede86f222d03b7e79fbf2e63ac9a93fa73d0f30dd183008
7
- data.tar.gz: 6ced0fb8124fea89ecf00e9c28d11b43639505f883d4f2a4ace3696d581f32f2ba78134710dd00d857dde3bd2b1042e4fe391769fcaa1c6b22671b6f2349c54a
6
+ metadata.gz: 5d732f74c55fe45c860686f857218e240181e5055765d4abf0da4347213ecc00296b8a7d3a51667f21c97c15f191a9272ba7303d709f97fed7b3e218f4bfe1f4
7
+ data.tar.gz: ffae9954054d4c84cdb8303e7d392f7ea12ad6659cc5c28eabba73b2681b1c4c337d604327ff7703d593cc51ba2ee9b3eb8cf56124b8596513486c33adfe4c54
data/CHANGELOG.md CHANGED
@@ -1,8 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.2
4
+
5
+ - Fix `ContentTypeNotRecognised` backtrace
6
+ - Fix issue when there is no content ánd no content-type (explicit nil)
7
+
3
8
  ## 0.1.1
4
9
 
5
- - Fix error regarding ContentTypeNotRecognised (called as function instead of error class)
10
+ - Fix error regarding `ContentTypeNotRecognised` (called as function instead of error class)
6
11
  - Change `lookup_media_type_by_symbol` interface so that MediaTypes and Mime types can be mixed as return value
7
12
 
8
13
  ## 0.1.0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- media_types-deserialization (0.1.1)
4
+ media_types-deserialization (0.1.2)
5
5
  activesupport (>= 4.0.0)
6
6
  http_headers-content_type (>= 0.1.1, < 1.0.0)
7
7
  media_types (>= 0.6.0)
@@ -68,6 +68,7 @@ module MediaTypes
68
68
 
69
69
  def request_content_type_symbol
70
70
  content_type = request_content_type
71
+ return nil unless content_type
71
72
  result = lookup_content_type_symbol.respond_to?(:call) ?
72
73
  instance_exec(content_type, &lookup_content_type_symbol) :
73
74
  lookup_content_type_via_mime_type(content_type)
@@ -4,7 +4,6 @@ module MediaTypes
4
4
  module Deserialization
5
5
  class ContentTypeNotRecognised < Error
6
6
  def initialize(content_type)
7
- set_backtrace(source.backtrace)
8
7
  super format(
9
8
  'The Content-Type: %<content_type>s is not recognised or supported',
10
9
  content_type: content_type
@@ -1,5 +1,5 @@
1
1
  module MediaTypes
2
2
  module Deserialization
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: media_types-deserialization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld