media_types-deserialization 0.1.0 → 0.1.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
  SHA256:
3
- metadata.gz: 6fee00006a57b04944e81dbf523c45f93dcce8bf3b4297eefbf19b4d390e3fa5
4
- data.tar.gz: 119622b47be1ee5d10d0bc73fbd4319f079c8d65b2c405070bb74bd675abbaec
3
+ metadata.gz: 522ed41fba09def86e1607d0eea9fd6661b49f304155ff2cfeaf0bc1f41623cc
4
+ data.tar.gz: ce054679126400c621bd4ebebc01fd9e9e0520b15a5ba94bf5d655919ad658c6
5
5
  SHA512:
6
- metadata.gz: 54df1ef93343f130c527d60d1ce21a06ff299a6859391cc4d8109aa69824703e6b334d4c3a6b27b52376c742b00303b8b13b90966293f8f4cb725d0cf0872b46
7
- data.tar.gz: 378d743f205ae9ae6947118aa613450605a7292c79a147f4a546d9df618aa74c39d53073bd43f301b00cd570d8768919626e5f8ad207f6ccfcc1b5f95b43e725
6
+ metadata.gz: 319400731c644fd7dc7c34f134e9e9da7bbe70bd6d486f0457ccb6617f24f1558da0cda2b394b2c84ede86f222d03b7e79fbf2e63ac9a93fa73d0f30dd183008
7
+ data.tar.gz: 6ced0fb8124fea89ecf00e9c28d11b43639505f883d4f2a4ace3696d581f32f2ba78134710dd00d857dde3bd2b1042e4fe391769fcaa1c6b22671b6f2349c54a
data/.idea/.rakeTasks CHANGED
@@ -4,4 +4,4 @@ You are allowed to:
4
4
  1. Remove rake task
5
5
  2. Add existing rake tasks
6
6
  To add existing rake tasks automatically delete this file and reload the project.
7
- --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build media_types-deserialization-0.1.0.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install media_types-deserialization-0.1.0.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install media_types-deserialization-0.1.0.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.0 and build and push media_types-deserialization-0.1.0.gem to rubygems.org" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
7
+ --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Build media_types-deserialization-0.1.1.gem into the pkg directory" fullCmd="build" taksId="build" /><RakeTask description="Remove any temporary products" fullCmd="clean" taksId="clean" /><RakeTask description="Remove any generated files" fullCmd="clobber" taksId="clobber" /><RakeTask description="Build and install media_types-deserialization-0.1.1.gem into system gems" fullCmd="install" taksId="install" /><RakeGroup description="" fullCmd="" taksId="install"><RakeTask description="Build and install media_types-deserialization-0.1.1.gem into system gems without network access" fullCmd="install:local" taksId="local" /></RakeGroup><RakeTask description="Create tag v0.1.1 and build and push media_types-deserialization-0.1.1.gem to rubygems.org" fullCmd="release[remote]" taksId="release[remote]" /><RakeTask description="Run tests" fullCmd="test" taksId="test" /><RakeTask description="" fullCmd="default" taksId="default" /><RakeTask description="" fullCmd="release" taksId="release" /><RakeGroup description="" fullCmd="" taksId="release"><RakeTask description="" fullCmd="release:guard_clean" taksId="guard_clean" /><RakeTask description="" fullCmd="release:rubygem_push" taksId="rubygem_push" /><RakeTask description="" fullCmd="release:source_control_push" taksId="source_control_push" /></RakeGroup></RakeGroup></Settings>
@@ -26,23 +26,23 @@
26
26
  <content url="file://$MODULE_DIR$" />
27
27
  <orderEntry type="jdk" jdkName="ruby-2.5.3-p105" jdkType="RUBY_SDK" />
28
28
  <orderEntry type="sourceFolder" forTests="false" />
29
- <orderEntry type="library" scope="PROVIDED" name="actionpack (v5.2.2, ruby-2.5.3-p105) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="actionview (v5.2.2, ruby-2.5.3-p105) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="activesupport (v5.2.2, ruby-2.5.3-p105) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="actionpack (v5.2.2.1, ruby-2.5.3-p105) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="actionview (v5.2.2.1, ruby-2.5.3-p105) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="activesupport (v5.2.2.1, ruby-2.5.3-p105) [gem]" level="application" />
32
32
  <orderEntry type="library" scope="PROVIDED" name="builder (v3.2.3, ruby-2.5.3-p105) [gem]" level="application" />
33
33
  <orderEntry type="library" scope="PROVIDED" name="bundler (v2.0.1, ruby-2.5.3-p105) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.4, ruby-2.5.3-p105) [gem]" level="application" />
34
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.1.5, ruby-2.5.3-p105) [gem]" level="application" />
35
35
  <orderEntry type="library" scope="PROVIDED" name="crass (v1.0.4, ruby-2.5.3-p105) [gem]" level="application" />
36
36
  <orderEntry type="library" scope="PROVIDED" name="erubi (v1.8.0, ruby-2.5.3-p105) [gem]" level="application" />
37
37
  <orderEntry type="library" scope="PROVIDED" name="http_headers-content_type (v0.1.1, ruby-2.5.3-p105) [gem]" level="application" />
38
38
  <orderEntry type="library" scope="PROVIDED" name="http_headers-utils (v0.2.0, ruby-2.5.3-p105) [gem]" level="application" />
39
- <orderEntry type="library" scope="PROVIDED" name="i18n (v1.5.3, ruby-2.5.3-p105) [gem]" level="application" />
39
+ <orderEntry type="library" scope="PROVIDED" name="i18n (v1.6.0, ruby-2.5.3-p105) [gem]" level="application" />
40
40
  <orderEntry type="library" scope="PROVIDED" name="loofah (v2.2.3, ruby-2.5.3-p105) [gem]" level="application" />
41
- <orderEntry type="library" scope="PROVIDED" name="media_types (v0.6.0, ruby-2.5.3-p105) [gem]" level="application" />
41
+ <orderEntry type="library" scope="PROVIDED" name="media_types (v0.6.1, ruby-2.5.3-p105) [gem]" level="application" />
42
42
  <orderEntry type="library" scope="PROVIDED" name="mini_portile2 (v2.4.0, ruby-2.5.3-p105) [gem]" level="application" />
43
43
  <orderEntry type="library" scope="PROVIDED" name="minitest (v5.11.3, ruby-2.5.3-p105) [gem]" level="application" />
44
44
  <orderEntry type="library" scope="PROVIDED" name="nokogiri (v1.10.1, ruby-2.5.3-p105) [gem]" level="application" />
45
- <orderEntry type="library" scope="PROVIDED" name="oj (v3.7.8, ruby-2.5.3-p105) [gem]" level="application" />
45
+ <orderEntry type="library" scope="PROVIDED" name="oj (v3.7.10, ruby-2.5.3-p105) [gem]" level="application" />
46
46
  <orderEntry type="library" scope="PROVIDED" name="rack (v2.0.6, ruby-2.5.3-p105) [gem]" level="application" />
47
47
  <orderEntry type="library" scope="PROVIDED" name="rack-test (v1.1.0, ruby-2.5.3-p105) [gem]" level="application" />
48
48
  <orderEntry type="library" scope="PROVIDED" name="rails-dom-testing (v2.0.3, ruby-2.5.3-p105) [gem]" level="application" />
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.1.1
4
+
5
+ - Fix error regarding ContentTypeNotRecognised (called as function instead of error class)
6
+ - Change `lookup_media_type_by_symbol` interface so that MediaTypes and Mime types can be mixed as return value
7
+
3
8
  ## 0.1.0
4
9
 
5
10
  :baby: initial release
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- media_types-deserialization (0.1.0)
4
+ media_types-deserialization (0.1.1)
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)
@@ -9,42 +9,44 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (5.2.2)
13
- actionview (= 5.2.2)
14
- activesupport (= 5.2.2)
12
+ actionpack (5.2.2.1)
13
+ actionview (= 5.2.2.1)
14
+ activesupport (= 5.2.2.1)
15
15
  rack (~> 2.0)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
19
- actionview (5.2.2)
20
- activesupport (= 5.2.2)
19
+ actionview (5.2.2.1)
20
+ activesupport (= 5.2.2.1)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
25
- activesupport (5.2.2)
25
+ activesupport (5.2.2.1)
26
26
  concurrent-ruby (~> 1.0, >= 1.0.2)
27
27
  i18n (>= 0.7, < 2)
28
28
  minitest (~> 5.1)
29
29
  tzinfo (~> 1.1)
30
30
  builder (3.2.3)
31
- concurrent-ruby (1.1.4)
31
+ concurrent-ruby (1.1.5)
32
32
  crass (1.0.4)
33
33
  erubi (1.8.0)
34
34
  http_headers-content_type (0.1.1)
35
35
  http_headers-utils (>= 0.2.0, < 1.0.0)
36
36
  http_headers-utils (0.2.0)
37
- i18n (1.5.3)
37
+ i18n (1.6.0)
38
38
  concurrent-ruby (~> 1.0)
39
39
  loofah (2.2.3)
40
40
  crass (~> 1.0.2)
41
41
  nokogiri (>= 1.5.9)
42
- media_types (0.6.0)
42
+ media_types (0.6.1)
43
43
  mini_portile2 (2.4.0)
44
44
  minitest (5.11.3)
45
+ nokogiri (1.10.1)
46
+ mini_portile2 (~> 2.4.0)
45
47
  nokogiri (1.10.1-x64-mingw32)
46
48
  mini_portile2 (~> 2.4.0)
47
- oj (3.7.8)
49
+ oj (3.7.10)
48
50
  rack (2.0.6)
49
51
  rack-test (1.1.0)
50
52
  rack (>= 1.0, < 3)
@@ -59,6 +61,7 @@ GEM
59
61
  thread_safe (~> 0.1)
60
62
 
61
63
  PLATFORMS
64
+ ruby
62
65
  x64-mingw32
63
66
 
64
67
  DEPENDENCIES
@@ -72,7 +72,7 @@ module MediaTypes
72
72
  instance_exec(content_type, &lookup_content_type_symbol) :
73
73
  lookup_content_type_via_mime_type(content_type)
74
74
 
75
- raise ContentTypeNotRecognised(content_type) unless result
75
+ raise ContentTypeNotRecognised, content_type unless result
76
76
  return result if result.is_a?(Symbol)
77
77
  (result.respond_to?(:symbol) && result.symbol) || result.to_sym || DEFAULT_LOOKUP_TABLE[result.to_s]
78
78
  end
@@ -90,8 +90,9 @@ module MediaTypes
90
90
 
91
91
  next_symbol = symbol
92
92
 
93
- if lookup_media_type_by_symbol.respond_to?(:call)
94
- next_symbol = instance_exec(symbol, &lookup_media_type_by_symbol)&.suffix&.to_sym
93
+ if lookup_media_type_by_symbol.respond_to?(:call) && symbol != :json
94
+ media_type = instance_exec(symbol, &lookup_media_type_by_symbol)
95
+ next_symbol = media_type.respond_to?(:symbol) && media_type.symbol || media_type&.suffix
95
96
  return deserializer_for_content_type(next_symbol) if next_symbol != symbol && next_symbol
96
97
  end
97
98
 
@@ -1,5 +1,5 @@
1
1
  module MediaTypes
2
2
  module Deserialization
3
- VERSION = '0.1.0'
3
+ VERSION = '0.1.1'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: media_types-deserialization
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derk-Jan Karrenbeld
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-02-17 00:00:00.000000000 Z
11
+ date: 2019-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport