google-geo-type 0.1.0 → 0.1.1

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: 202360a48a68f8c4a48de4009dc5d6b5e74238835f8b3db6cd11ea1802f801a1
4
- data.tar.gz: 2c1538efe25a7bc9694a4d1bd1d2cdb34125fd250c5c9c8714a2d801a1dd93d8
3
+ metadata.gz: 7faf2f732b8c4e33845eb194c1a3a141f8f80dfe03ca12897f3cb8afb3c4e4ac
4
+ data.tar.gz: 8c6e03ea20f710a32e1f9c97ca712157c032e94440e7dcbb03c7f10a043ab43a
5
5
  SHA512:
6
- metadata.gz: cbb51b0a7a89a3f7b8dfb772c60a432444ad093dcf010e4dcc48eeb22830079f50e276e6a3a9d21b47692d739878f39446380ec17ceaf30c7024dd983a93a3f1
7
- data.tar.gz: cf3fd19a758ae359968b6b1746aa60f6405b3dc760b0ffdfbeb7cba3c1ee17bda2a954426637b5a1f79efb49eb0f26cfe9e101a0d3d904df6ffa9f92a87db36a
6
+ metadata.gz: 0bdca326a1bacf499ab69fd9c6472a06feef8ae1209efac4c5880cda8f1308a52f8e6771dc950eb8c1279e647814a1422cd420965c166139c8cccc3bdeef6772
7
+ data.tar.gz: 270a6d8740c8cbb79742d5828e50b1dbe3885785b9b4da45079bfd20d40b5b44d8094b8f8183511c4d91662aa5a41af9ab9f4d5a402a6a272826d086e1467587
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ### 0.1.1 (2024-05-20)
4
+
5
+ #### Bug Fixes
6
+
7
+ * Restored compatibility code
8
+
3
9
  ### 0.1.0 (2024-05-01)
4
10
 
5
11
  #### Features
@@ -17,7 +17,7 @@
17
17
  module Google
18
18
  module Geo
19
19
  module Type
20
- VERSION = "0.1.0".freeze
20
+ VERSION = "0.1.1".freeze
21
21
  end
22
22
  end
23
23
  end
@@ -10,7 +10,29 @@ require 'google/type/latlng_pb'
10
10
  descriptor_data = "\n\x1egoogle/geo/type/viewport.proto\x12\x0fgoogle.geo.type\x1a\x18google/type/latlng.proto\"O\n\x08Viewport\x12 \n\x03low\x18\x01 \x01(\x0b\x32\x13.google.type.LatLng\x12!\n\x04high\x18\x02 \x01(\x0b\x32\x13.google.type.LatLngBo\n\x13\x63om.google.geo.typeB\rViewportProtoP\x01Z@google.golang.org/genproto/googleapis/geo/type/viewport;viewport\xa2\x02\x04GGTPb\x06proto3"
11
11
 
12
12
  pool = Google::Protobuf::DescriptorPool.generated_pool
13
- pool.add_serialized_file(descriptor_data)
13
+
14
+ begin
15
+ pool.add_serialized_file(descriptor_data)
16
+ rescue TypeError
17
+ # Compatibility code: will be removed in the next major version.
18
+ require 'google/protobuf/descriptor_pb'
19
+ parsed = Google::Protobuf::FileDescriptorProto.decode(descriptor_data)
20
+ parsed.clear_dependency
21
+ serialized = parsed.class.encode(parsed)
22
+ file = pool.add_serialized_file(serialized)
23
+ warn "Warning: Protobuf detected an import path issue while loading generated file #{__FILE__}"
24
+ imports = [
25
+ ["google.type.LatLng", "google/type/latlng.proto"],
26
+ ]
27
+ imports.each do |type_name, expected_filename|
28
+ import_file = pool.lookup(type_name).file_descriptor
29
+ if import_file.name != expected_filename
30
+ warn "- #{file.name} imports #{expected_filename}, but that import was loaded as #{import_file.name}"
31
+ end
32
+ end
33
+ warn "Each proto file must use a consistent fully-qualified name."
34
+ warn "This will become an error in the next major version."
35
+ end
14
36
 
15
37
  module Google
16
38
  module Geo
@@ -22,7 +44,7 @@ end
22
44
 
23
45
  #### Source proto file: google/geo/type/viewport.proto ####
24
46
  #
25
- # // Copyright 2019 Google LLC.
47
+ # // Copyright 2024 Google LLC
26
48
  # //
27
49
  # // Licensed under the Apache License, Version 2.0 (the "License");
28
50
  # // you may not use this file except in compliance with the License.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-geo-type
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Google LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-05-01 00:00:00.000000000 Z
11
+ date: 2024-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: googleapis-common-protos-types