grape_serializer 0.0.2 → 0.0.5

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
  SHA256:
3
- metadata.gz: f9dbd01e375d06a2462322e613fb2d0ab162acc2083939239f5ced69ea817089
4
- data.tar.gz: 20e7ebdb8c92741fd806f0426e6169f7b2a13c4bbc016b5ae3dbcfc6df70e879
3
+ metadata.gz: c09cc52b2bfefd96aec2f54dac4199444ac6e3611f330119a25b758f51776830
4
+ data.tar.gz: 31227436c21622e5e7af7bd1512bed9097fa290542e0ff0c4a89c10422a28044
5
5
  SHA512:
6
- metadata.gz: c7e2a65b7dfc4d8fc6ffa532f08cdd1c05087723eeac572bc3505b67ded86e6cf71f1ec759b627e6ff34c17c4e99e33d4517285e70c5123557be5cc651d22c3d
7
- data.tar.gz: cd9957ee846504f20ad3e0e5b2e640ac6ab35228d9a7df807ff59f16a6b8f020f7508c720f0383b220cbcff86660b7084aaffee26964a421c42072ee84838e8e
6
+ metadata.gz: 38a5f2f7618612e6f121c5f7732dcad5e4144b090ca47e7d68b0899fd77713c5e4c26891ad64417434f7fe4f0e25ad0c207b871ae9ab8ebec5ca972eaf533527
7
+ data.tar.gz: 17d45f79a20b39fb772d60d195a1859189b169034cce94f0b155b916390d7d3dfaccc4bdfe9c4a81ef527e7c93e95a4c583a6b5c19960c6ba1031e282468727c
@@ -9,9 +9,11 @@ module GrapeResponse
9
9
  private
10
10
 
11
11
  def current_member
12
+ super
12
13
  end
13
14
 
14
15
  def controller_path
16
+ super
15
17
  end
16
18
 
17
19
  def serializer_class
@@ -2,6 +2,9 @@ require 'grape-entity'
2
2
 
3
3
  class ServiceEntity < Grape::Entity
4
4
 
5
+ # expose append info
6
+ expose :append_info, merge: true, if: :append
7
+
5
8
  # expose service additional info by default
6
9
  expose :service_info, merge: true, if: :service
7
10
 
@@ -12,4 +15,9 @@ class ServiceEntity < Grape::Entity
12
15
  service_name = service.class.name.underscore
13
16
  send(service_name) rescue nil || send(service_name.split('/').last) rescue {}
14
17
  end
18
+
19
+ def append_info
20
+ options[:append]
21
+ end
22
+
15
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.0.2
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - JiaRou Lee
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-03 00:00:00.000000000 Z
11
+ date: 2022-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: grape-entity
@@ -37,7 +37,7 @@ homepage: https://github.com/kdan-mobile-software-ltd/grape_serializer
37
37
  licenses:
38
38
  - MIT
39
39
  metadata: {}
40
- post_install_message:
40
+ post_install_message:
41
41
  rdoc_options: []
42
42
  require_paths:
43
43
  - lib
@@ -52,8 +52,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  requirements: []
55
- rubygems_version: 3.2.3
56
- signing_key:
55
+ rubygems_version: 3.2.22
56
+ signing_key:
57
57
  specification_version: 4
58
58
  summary: Serializer for Grape Entity
59
59
  test_files: []