pb-serializer 0.5.2 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b06e7d595d2212e0d8c6d36bc652acccb3020094b6370c9494476eb0de483487
4
- data.tar.gz: 13efc77cdd5a595a0763b16989f7064a5c1f79ebd3bdff7330964eadd7569db7
3
+ metadata.gz: 9af1a5991c847f416646d4d15bae84654e0c7ef8e7882d7dac3bf6c05b2eaf89
4
+ data.tar.gz: 774ee2f7de5eb0a4a9e16cbea7392d63e0586d453728191d2bd85be7bbf91a95
5
5
  SHA512:
6
- metadata.gz: 936b879ffebc21afb812bb8763cfc57132c19db685138ba0b69c74ab156c70909a2f35482464c0c35ed776e5b2ff02546b1f55699bc48b5f44568890771da0b8
7
- data.tar.gz: 6da97182764357672107dbacf6184e723f55ad203078dc9c660e53741d861ae39e210cf5d7ecb6a9b4155e618273e0963a97bc322bba7e579faa8f066b36a5bb
6
+ metadata.gz: 8033c801f4e94b1dccb22245f4460926c30c29f762be71e68243c75fc24c50f67c258ea10fb30d24ddde120fb1d36498a0e85aac44b80be8493b682fa8d969b6
7
+ data.tar.gz: 5295c8ae6f9c580edf34c96dc13d8b37f3920d999d440d0003efa885ee7b165ef938a1ed0df3e822de279f33b611a283de20455e0f7d78baa3b4c5d85447c80d
@@ -9,10 +9,9 @@ jobs:
9
9
  fail-fast: false
10
10
  matrix:
11
11
  os: [ ubuntu-latest, macos-latest ]
12
- # TODO: Wait for supporting Ruby 3.0 in simplecov-cobertura.
13
- # See https://github.com/dashingrocket/simplecov-cobertura/pull/16
14
- # ruby: [ 2.5, 2.6, 2.7, 3.0 ]
15
- ruby: [ 2.5, 2.6, 2.7 ]
12
+ ruby: [ '3.0', '3.1', '3.2', '3.3' ]
13
+ exclude:
14
+ - { os: macos-latest, ruby: '2.5' }
16
15
  runs-on: ${{ matrix.os }}
17
16
 
18
17
  steps:
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  ## Unreleased
2
2
 
3
+ ## 0.6.0
4
+
5
+ - Change default value of `missing_field_behavior` from `:raise` to `:ignore` https://github.com/wantedly/pb-serializer/pull/56
6
+ - Update CI Ruby versions to 3.0+ https://github.com/wantedly/pb-serializer/pull/56
7
+ - Update `simplecov-cobertura` to latest version https://github.com/wantedly/pb-serializer/pull/56
8
+
3
9
  ## 0.5.2
4
10
 
5
11
  - Generate the default mask lazily to prevent infinite recursions https://github.com/wantedly/pb-serializer/pull/52
@@ -26,15 +32,14 @@
26
32
 
27
33
  - Support `if` option https://github.com/wantedly/pb-serializer/pull/24
28
34
  - Improve error handling https://github.com/wantedly/pb-serializer/pull/26
29
- - raise `MissingMessageTypeError` if `message` declaration is missed
30
- - raise `MissingFieldError` if `attribute` declaration is missed
31
- - raise `InvalidOptionError` when `attribute` receives invalid params
35
+ - raise `MissingMessageTypeError` if `message` declaration is missed
36
+ - raise `MissingFieldError` if `attribute` declaration is missed
37
+ - raise `InvalidOptionError` when `attribute` receives invalid params
32
38
  - Introduce Pb::Serializer.configure https://github.com/wantedly/pb-serializer/pull/27
33
- - Add `missing_field_behavior` config to suppress `MissingFieldError`
34
- - Rename `InvalidOptionError` -> `InvalidAttributeOptionError`
39
+ - Add `missing_field_behavior` config to suppress `MissingFieldError`
40
+ - Rename `InvalidOptionError` -> `InvalidAttributeOptionError`
35
41
  - Skip serializing when a value is already serialized https://github.com/wantedly/pb-serializer/pull/29
36
42
 
37
-
38
43
  ## 0.2.1
39
44
 
40
45
  - **BREAKING CHANGE** `required` -> `allow_nil` https://github.com/wantedly/pb-serializer/pull/21
@@ -48,7 +53,6 @@
48
53
  - Change API
49
54
  - Add example specs https://github.com/wantedly/pb-serializer/pull/18
50
55
 
51
-
52
56
  ## 0.1.0
53
57
 
54
58
  Initial release.
@@ -1,5 +1,5 @@
1
1
  module Pb
2
2
  module Serializer
3
- VERSION = "0.5.2".freeze
3
+ VERSION = "0.6.0".freeze
4
4
  end
5
5
  end
data/lib/pb/serializer.rb CHANGED
@@ -22,11 +22,11 @@ module Pb
22
22
  # @return [Logger]
23
23
  attr_accessor :logger
24
24
  # @!attribute [r] missing_field_behavior
25
- # @return [:raise, :warn, :ignore] default: `:raise`
25
+ # @return [:raise, :warn, :ignore] default: `:ignore`
26
26
  attr_reader :missing_field_behavior
27
27
 
28
28
  def initialize
29
- self.missing_field_behavior = :raise
29
+ self.missing_field_behavior = :ignore
30
30
  self.logger = Logger.new(STDOUT)
31
31
  end
32
32
 
@@ -70,7 +70,7 @@ module Pb
70
70
  case fd.type
71
71
  when :message
72
72
  case fd.submsg_name
73
- when "google.protobuf.Timestamp",
73
+ when "google.protobuf.Timestamp",
74
74
  "google.protobuf.StringValue",
75
75
  "google.protobuf.Int32Value" ,
76
76
  "google.protobuf.Int64Value" ,
@@ -38,6 +38,7 @@ Gem::Specification.new do |spec|
38
38
  spec.add_development_dependency "rspec", "~> 3.0"
39
39
  spec.add_development_dependency "rubocop", "0.67.2" # for onkcop
40
40
  spec.add_development_dependency "sqlite3", "~> 1.4"
41
- spec.add_development_dependency "simplecov", "~> 0.18.5"
42
- spec.add_development_dependency "simplecov-cobertura", "~> 1.3"
41
+ spec.add_development_dependency "simplecov", "~> 0.19"
42
+ spec.add_development_dependency "simplecov-cobertura", "~> 3.1"
43
+ spec.add_development_dependency "concurrent-ruby", "1.3.4"
43
44
  end
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.5.2
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - izumin5210
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-25 00:00:00.000000000 Z
11
+ date: 2025-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-protobuf
@@ -162,28 +162,42 @@ dependencies:
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: 0.18.5
165
+ version: '0.19'
166
166
  type: :development
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: 0.18.5
172
+ version: '0.19'
173
173
  - !ruby/object:Gem::Dependency
174
174
  name: simplecov-cobertura
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '1.3'
179
+ version: '3.1'
180
180
  type: :development
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '1.3'
186
+ version: '3.1'
187
+ - !ruby/object:Gem::Dependency
188
+ name: concurrent-ruby
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - '='
192
+ - !ruby/object:Gem::Version
193
+ version: 1.3.4
194
+ type: :development
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - '='
199
+ - !ruby/object:Gem::Version
200
+ version: 1.3.4
187
201
  description: Serialize objects into Protocol Buffers messages
188
202
  email:
189
203
  - m@izum.in
@@ -240,7 +254,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
254
  - !ruby/object:Gem::Version
241
255
  version: '0'
242
256
  requirements: []
243
- rubygems_version: 3.2.33
257
+ rubygems_version: 3.5.9
244
258
  signing_key:
245
259
  specification_version: 4
246
260
  summary: Serialize objects into Protocol Buffers messages