dandy 0.11.0 → 0.11.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
  SHA1:
3
- metadata.gz: 44208350faa4b49a2b907fb4894e37763c50f2cc
4
- data.tar.gz: a39b0f9a8990f40a4f04b65c49f3c9377d4445d2
3
+ metadata.gz: 4dd632af42e18c575b066bdc64e5006ddb3c01cd
4
+ data.tar.gz: e584f947fbb113360fff69464fa5ec7f14d97dc0
5
5
  SHA512:
6
- metadata.gz: 6ae6c24615f86775e5ab079c846225ccc40b3633d0ca4105bb1b94145641770998688cf8bf3f8e7300ece8b00cd0a161b9e808c0a12346fe1e90068a5c707c47
7
- data.tar.gz: 0315435cf5dd9ba67e9726b7cd5ab351fbbbd83e9e16ace5870aa503d3021020745124b57eda8fe2be4b0c25dbf477c05b15c7e7ab6933ddd3688d05cd954c3d
6
+ metadata.gz: f4a39f04fcd2bd19b3570c3e8952dffaa50017c965e1e3dd6103a7db861dfadf31bf10e5c635347f2596173baddef348376b87e959f3c7b70293df2318258797
7
+ data.tar.gz: 1b333a87f034910b0e71ded685484388c5da1531e8ec1cf78d96bf2094b310bc473f507055d54a59d54850e8e5d7e667122674d8be566508d9549e1a3b2ec9c5
data/lib/dandy/request.rb CHANGED
@@ -49,7 +49,7 @@ module Dandy
49
49
  if chain_result.is_a?(String)
50
50
  body = chain_result
51
51
  else # generate JSON when nothing other is requested
52
- if headers['Keys-Format'] == 'camel'
52
+ if headers['Keys-Format'] == 'camel' && chain_result.is_a?(Hash)
53
53
  chain_result = chain_result.to_camelback_keys
54
54
  end
55
55
 
data/lib/dandy/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dandy
2
- VERSION = '0.11.0'.freeze
2
+ VERSION = '0.11.1'.freeze
3
3
  end
@@ -11,7 +11,7 @@ module Dandy
11
11
  end
12
12
 
13
13
  def create(name, content_type, options = {})
14
- type = content_type.split('/')[1]
14
+ type = content_type ? content_type.split('/')[1] : 'json'
15
15
  template = @template_registry.get(name, type)
16
16
  builder = @view_builder_registry.get(type)
17
17
  view = builder.new(template, @container, options)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dandy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.11.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vladimir Kalinkin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-05-08 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hypo