grape_serializer 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 +4 -4
- data/lib/service_entity.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bff6bfc2f9daebaf7b839d06d8a7dc59734e8c859a19a8503ff20d606b69de58
|
4
|
+
data.tar.gz: 10665fc048f7dce670298d5f199850aa3114ff2a1404ce0cb786e81c80451cd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fbbb67bbcce96eadec2fe4141ce55da277f669f2ee5d2bc76323ef481bea762cc0ed951b4c28cd478b78ae41ac4ff694bd558d2bca031dbb0d110c43fbed3f7
|
7
|
+
data.tar.gz: f1fd9e853fce60b99fc1c1965ac90b8f9217fefbbc9005a1eba38f659e49e75a37aeea50c177eab01e1f1475cfdb6acffa46c977aa45ac78bbb87c60c3b9cdf6
|
data/lib/service_entity.rb
CHANGED
@@ -12,12 +12,12 @@ class ServiceEntity < Grape::Entity
|
|
12
12
|
|
13
13
|
def service_info
|
14
14
|
service = options[:service]
|
15
|
-
service_name = service.class.name.underscore
|
15
|
+
service_name = options[:service_name] || service.class.name.underscore
|
16
16
|
send(service_name) rescue nil || send(service_name.split('/').last) rescue {}
|
17
17
|
end
|
18
18
|
|
19
19
|
def append_info
|
20
20
|
options[:append]
|
21
21
|
end
|
22
|
-
|
22
|
+
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape_serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JiaRou Lee
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape-entity
|