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 +4 -4
- data/lib/dandy/request.rb +1 -1
- data/lib/dandy/version.rb +1 -1
- data/lib/dandy/view_factory.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dd632af42e18c575b066bdc64e5006ddb3c01cd
|
4
|
+
data.tar.gz: e584f947fbb113360fff69464fa5ec7f14d97dc0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
data/lib/dandy/view_factory.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2018-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hypo
|