serega 0.5.1 → 0.6.0

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: 05a77befd912dc89f845aec700c3a2a47bb1030359bdc25dadd8d422b0db4350
4
- data.tar.gz: a85cbbe5ae86efb44f42023f3c080ced2211f8cb5030af63503a897865cc1f7e
3
+ metadata.gz: b72ad9dbc7d5e4c23d627b78d898b5eea3df96eb1b5925b34c99905362727151
4
+ data.tar.gz: c99f2d871340151b6631c659bd6b49687f4b0f1230ca8966b8031d34372a99cb
5
5
  SHA512:
6
- metadata.gz: 02f2dfb9c421a2edac54363cdf00041503c2383c5968642f7c1134b7f62a484f91b8d775d25f08e09f888d0a13fe238193f2b7959d361e4efd6fdb146a67802b
7
- data.tar.gz: 66b6f087f473595cb9c2ab06de05e0d8d0560ee3d47c4e7144f1814d47fe55340662133762392bf38390e0c0f0c067a441f8a5c05ea89368547d5a32c853f073
6
+ metadata.gz: 7a5a3a16c35e75266c4a6f86459605965e237dd7b98ae0c2faa9929bccfee070a7fc62a3aac956a26223236af152990e4e6224b494c0f22cbafefbc35b5812f9
7
+ data.tar.gz: 19bd1265a2c1160b715a457c274ac58f679a201664c31bb0ec3f5316a6b1b480ac6618b2bbcbc56493462a82f9e45059f11fb8618157dd0ed9c36c8574c81a57
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.6.0
@@ -21,11 +21,6 @@ class Serega
21
21
  def nested_object_serializer
22
22
  attribute.serializer::SeregaObjectSerializer
23
23
  end
24
-
25
- # TODO: remove, we use this method in tests only
26
- def ==(other)
27
- (other.attribute == attribute) && (other.nested_points == nested_points)
28
- end
29
24
  end
30
25
 
31
26
  extend Serega::SeregaHelpers::SerializerClassHelper
@@ -39,7 +39,7 @@ class Serega
39
39
  def keys_values
40
40
  ids = keys.keys
41
41
 
42
- point.batch.loader.call(ids, object_serializer.context, point.nested_points).tap do |vals|
42
+ point.batch.loader.call(ids, object_serializer.context, point).tap do |vals|
43
43
  next if vals.is_a?(Hash)
44
44
 
45
45
  attribute_name = "#{point.class.serializer_class}.#{point.name}"
@@ -44,11 +44,11 @@ class Serega
44
44
  end
45
45
 
46
46
  def block_parameters_error
47
- "Invalid :batch option :loader. When it is a Proc it can have maximum three regular parameters (keys, context, points)"
47
+ "Invalid :batch option :loader. When it is a Proc it can have maximum three regular parameters (keys, context, point)"
48
48
  end
49
49
 
50
50
  def callable_parameters_error
51
- "Invalid :batch option :loader. When it is a callable object it must have three regular parameters (keys, context, points)"
51
+ "Invalid :batch option :loader. When it is a callable object it must have three regular parameters (keys, context, point)"
52
52
  end
53
53
 
54
54
  def must_be_callable
metadata CHANGED
@@ -1,16 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serega
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Glushkov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-21 00:00:00.000000000 Z
11
+ date: 2022-12-01 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
+ JSON Serializer
15
+
14
16
  - Simple and clear DSL
15
17
  - Ability to manually select serialized fields
16
18
  - Multiple ways to solve N+1 problems
@@ -112,5 +114,5 @@ requirements: []
112
114
  rubygems_version: 3.3.15
113
115
  signing_key:
114
116
  specification_version: 4
115
- summary: JSON Serializer for REST API
117
+ summary: JSON Serializer
116
118
  test_files: []