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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/service_entity.rb +2 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cfa97af270a2651e6695af06ef2b001c4a3ba0bee775ad5cfea7d30dc5d9f2e9
4
- data.tar.gz: 01f00976261919b140097614e36001d21f942f4ad9a4a477e98a6e956913c218
3
+ metadata.gz: bff6bfc2f9daebaf7b839d06d8a7dc59734e8c859a19a8503ff20d606b69de58
4
+ data.tar.gz: 10665fc048f7dce670298d5f199850aa3114ff2a1404ce0cb786e81c80451cd4
5
5
  SHA512:
6
- metadata.gz: c90a384ad283847198c2f5a3544e898d5f4f4a23ec1beb636aa0eba1d34bf3a5ee116edbb66d5d9b291da317365f42ec727e4dfd05575ac3823f2b4d1db350fd
7
- data.tar.gz: 6fdc09250e663c544ebf5be5c63ace711d0a34bd8c399492bfb79865665ed065303fd8653affc8855f52d984dc06140fc1c1d6988ea6969b2d70bc75fe3900a5
6
+ metadata.gz: 8fbbb67bbcce96eadec2fe4141ce55da277f669f2ee5d2bc76323ef481bea762cc0ed951b4c28cd478b78ae41ac4ff694bd558d2bca031dbb0d110c43fbed3f7
7
+ data.tar.gz: f1fd9e853fce60b99fc1c1965ac90b8f9217fefbbc9005a1eba38f659e49e75a37aeea50c177eab01e1f1475cfdb6acffa46c977aa45ac78bbb87c60c3b9cdf6
@@ -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.0
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-02-07 00:00:00.000000000 Z
11
+ date: 2023-04-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape-entity