protobuf_nested_struct 1.2.1 → 2.0.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: 178c58047bb3a2e5c1b46661b09439eb1fc6e0a0fadd8095c5e48f91c5a38b28
4
- data.tar.gz: 7fb9d605719e46471450e47518d160194eb14e5d12ddd6eff537620fadc66f72
3
+ metadata.gz: 0d23f6164a3c210d07a7356122e45903e7c8b2899289d1e74058e33f2636d55f
4
+ data.tar.gz: 3ef33d0885a5eafacc08bd166998851a1a415570e9914873e498d63a2d2d0b88
5
5
  SHA512:
6
- metadata.gz: c6dc1dfc25a3eab94791d92e4a3cbb61b92ff156da1b0206a3f826fa59ec8ba7b0c150e2e8613f309d8f0bb660cd0745b5bdbf4a90e9d11590c59233c4fb280a
7
- data.tar.gz: 0c5319b251e045257f226a2615065105cc0ad4361be8ae49ac06e8c04615e84bce924f78579699163b0b5b6824dee49b122199d5fc394283b22a2cf8ade6a986
6
+ metadata.gz: a40e483aca2131845ad89ad4af33c1fbea1d97f2bcab4c3f144d102412c92363adf0e2ae69aef1e9949ce81667c1793c084605cfa42f805d47e136ba6ffa50c6
7
+ data.tar.gz: 165815d6491238876b11e8de84c3049f8298137275dc87adcc87b317385582e8f202aca94e4f01c6e182b7a149ea5ecea15648bddc5b6d15393e0b80707396ba
@@ -8,28 +8,7 @@ require 'google/protobuf'
8
8
  descriptor_data = "\n\x16google/type/date.proto\x12\x0bgoogle.type\"0\n\x04\x44\x61te\x12\x0c\n\x04year\x18\x01 \x01(\x05\x12\r\n\x05month\x18\x02 \x01(\x05\x12\x0b\n\x03\x64\x61y\x18\x03 \x01(\x05\x42]\n\x0f\x63om.google.typeB\tDateProtoP\x01Z4google.golang.org/genproto/googleapis/type/date;date\xf8\x01\x01\xa2\x02\x03GTPb\x06proto3"
9
9
 
10
10
  pool = Google::Protobuf::DescriptorPool.generated_pool
11
-
12
- begin
13
- pool.add_serialized_file(descriptor_data)
14
- rescue TypeError
15
- # Compatibility code: will be removed in the next major version.
16
- require 'google/protobuf/descriptor_pb'
17
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
18
- parsed.clear_dependency
19
- serialized = parsed.class.encode(parsed)
20
- file = pool.add_serialized_file(serialized)
21
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
22
- imports = [
23
- ]
24
- imports.each do |type_name, expected_filename|
25
- import_file = pool.lookup(type_name).file_descriptor
26
- if import_file.name != expected_filename
27
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
28
- end
29
- end
30
- warn "Each proto file must use a consistent fully-qualified name."
31
- warn "This will become an error in the next major version."
32
- end
11
+ pool.add_serialized_file(descriptor_data)
33
12
 
34
13
  module Google
35
14
  module Type
@@ -11,30 +11,7 @@ require 'google/type/date_pb'
11
11
  descriptor_data = "\n#protobuf_nested_struct/struct.proto\x12\x16protobuf_nested_struct\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x16google/type/date.proto\"\xaa\x01\n\x12HashMapStringValue\x12\x46\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x36.protobuf_nested_struct.HashMapStringValue.FieldsEntry\x1aL\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.protobuf_nested_struct.Value:\x02\x38\x01\"\x84\x03\n\x05Value\x12\x37\n\nnull_value\x18\x01 \x01(\x0e\x32!.protobuf_nested_struct.NullValueH\x00\x12\x16\n\x0c\x64ouble_value\x18\x02 \x01(\x01H\x00\x12\x13\n\tint_value\x18\x03 \x01(\x03H\x00\x12\x16\n\x0cstring_value\x18\x04 \x01(\tH\x00\x12\x14\n\nbool_value\x18\x05 \x01(\x08H\x00\x12\'\n\ndate_value\x18\x06 \x01(\x0b\x32\x11.google.type.DateH\x00\x12\x35\n\x0ftimestamp_value\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x46\n\x10string_map_value\x18\x14 \x01(\x0b\x32*.protobuf_nested_struct.HashMapStringValueH\x00\x12\x37\n\nlist_value\x18\x15 \x01(\x0b\x32!.protobuf_nested_struct.ListValueH\x00\x42\x06\n\x04kind\":\n\tListValue\x12-\n\x06values\x18\x01 \x03(\x0b\x32\x1d.protobuf_nested_struct.Value*\x1b\n\tNullValue\x12\x0e\n\nNULL_VALUE\x10\x00\x62\x06proto3"
12
12
 
13
13
  pool = Google::Protobuf::DescriptorPool.generated_pool
14
-
15
- begin
16
- pool.add_serialized_file(descriptor_data)
17
- rescue TypeError
18
- # Compatibility code: will be removed in the next major version.
19
- require 'google/protobuf/descriptor_pb'
20
- parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
21
- parsed.clear_dependency
22
- serialized = parsed.class.encode(parsed)
23
- file = pool.add_serialized_file(serialized)
24
- warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
25
- imports = [
26
- ["google.type.Date", "google/type/date.proto"],
27
- ["google.protobuf.Timestamp", "google/protobuf/timestamp.proto"],
28
- ]
29
- imports.each do |type_name, expected_filename|
30
- import_file = pool.lookup(type_name).file_descriptor
31
- if import_file.name != expected_filename
32
- warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
33
- end
34
- end
35
- warn "Each proto file must use a consistent fully-qualified name."
36
- warn "This will become an error in the next major version."
37
- end
14
+ pool.add_serialized_file(descriptor_data)
38
15
 
39
16
  module ProtobufNestedStruct
40
17
  HashMapStringValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protobuf_nested_struct.HashMapStringValue").msgclass
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ProtobufNestedStruct
4
- VERSION = "1.2.1"
4
+ VERSION = "2.0.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protobuf_nested_struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Pankowecki
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 3.25.7
19
+ version: 4.26.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 3.25.7
26
+ version: 4.26.0
27
27
  description: 'Serialize primitives and deep structures (array, hash) to protobuf
28
28
 
29
29
  '