scoped_serializer 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/scoped_serializer/base_serializer.rb +5 -1
- data/lib/scoped_serializer/version.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: 15e358c712160fea2d887dfaae7c4e65ee406fde
|
4
|
+
data.tar.gz: 3527182be7af9dcd647ce89e2e1c80be3e304bce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70209dd855839e6e5e9ee42af7d8d38ffdd5d62e1ca9d7d798771451058c186115d15bc77a56f74fed416de824b6f9a96f9c93599447766eda742d2c1b8bb677
|
7
|
+
data.tar.gz: 36805def7e73a315630b86444b8e7a22fb3d69e9fcbf75bc09e898abc35ffffa7deba0bae0b87f8e1ca94d2d370550e78f0594b5f3c7ef7aa60c4f3eb060c3d6
|
@@ -44,12 +44,16 @@ module ScopedSerializer
|
|
44
44
|
options = @options.merge(options)
|
45
45
|
|
46
46
|
if options[:root]
|
47
|
-
{ options[:root].to_sym => serializable_hash }.merge(meta_hash)
|
47
|
+
{ options[:root].to_sym => serializable_hash }.merge(meta_hash).merge(data_hash)
|
48
48
|
else
|
49
49
|
serializable_hash
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
+
def data_hash
|
54
|
+
@options[:data] || {}
|
55
|
+
end
|
56
|
+
|
53
57
|
def meta_hash
|
54
58
|
if meta.present?
|
55
59
|
{ :meta => meta }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scoped_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arjen Oosterkamp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|