pb-serializer 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/pb/serializable.rb +9 -1
- data/lib/pb/serializer/version.rb +1 -1
- data/pb-serializer.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b46a686595d5e9e919c21ff7e6902cec71be97d716085dc38b8b2ef0192e7cf1
|
4
|
+
data.tar.gz: c453986c407e5e567bce43f3f45429697c552dedc44356ffee2a8e0b4d5eaea7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c58c5ab0714bd7bee52f3f30ede95b676b849cdf0be482a9de0187287d3ecfd0e758b6cc7c17831965d7e8e54fc13763c6290607330077c3a2135c6fe9cfd439
|
7
|
+
data.tar.gz: 7b3cc2224f7550c72714cc21c1e656182891788b1f0aa67b02dce177ea44cb6dfef5115073aeb08eb130fe40decc15551e73bbb2aa6ec77c0fc997e8fbf3477f
|
data/CHANGELOG.md
CHANGED
data/lib/pb/serializable.rb
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
module Pb
|
2
2
|
module Serializable
|
3
|
+
extend ActiveSupport::Concern
|
4
|
+
include ComputedModel::Model
|
3
5
|
def self.included(base)
|
4
6
|
base.extend ClassMethods
|
5
|
-
base.include ComputedModel
|
6
7
|
base.singleton_class.prepend Hook
|
7
8
|
end
|
8
9
|
|
@@ -154,6 +155,13 @@ module Pb
|
|
154
155
|
with = ::Pb::Serializer::NormalizedMask.build(with)
|
155
156
|
with = with.reject { |c| (__pb_serializer_attrs & (c.kind_of?(Hash) ? c.keys : [c])).empty? }
|
156
157
|
|
158
|
+
primary_object_name = __pb_serializer_primary_model_name
|
159
|
+
if primary_object_name
|
160
|
+
(with[primary_object_name] ||= []) << true
|
161
|
+
elsif self < Serializer::Base
|
162
|
+
(with[:object] ||= []) << true
|
163
|
+
end
|
164
|
+
|
157
165
|
bulk_load_and_compute(with, **args)
|
158
166
|
end
|
159
167
|
|
data/pb-serializer.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
rails_versions = [">= 5.2", "< 6.1"]
|
30
30
|
spec.add_runtime_dependency "google-protobuf", "~> 3.0"
|
31
31
|
spec.add_runtime_dependency "the_pb", "~> 0.0.1"
|
32
|
-
spec.add_runtime_dependency "computed_model", "~> 0.
|
32
|
+
spec.add_runtime_dependency "computed_model", "~> 0.3.0"
|
33
33
|
|
34
34
|
spec.add_development_dependency "activerecord", rails_versions
|
35
35
|
spec.add_development_dependency "bundler", "~> 2.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pb-serializer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- izumin5210
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: google-protobuf
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: 0.3.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
54
|
+
version: 0.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: activerecord
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|