Skip to content

Commit

Permalink
Merge pull request #122 from Shopify/bump-protobuf-4
Browse files Browse the repository at this point in the history
Bump `google-protobuf` to v4.27
  • Loading branch information
arthurnn authored Aug 26, 2024
2 parents a61951f + b1a0871 commit 2e0bb9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
21 changes: 5 additions & 16 deletions test/fake_services.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,8 @@

# Protobuf messages.
# An example of the result of the protoc ruby code generator.
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "example.Size" do
optional :inches, :int32, 1
end
add_message "example.Hat" do
optional :inches, :int32, 1
optional :color, :string, 2
end
add_message "example.Empty" do
end
end
descriptor_data = "\n\ntest.proto\x12\x07\x65xample\"\x16\n\x04Size\x12\x0e\n\x06inches\x18\x01 \x01(\x05\"$\n\x03Hat\x12\x0e\n\x06inches\x18\x01 \x01(\x05\x12\r\n\x05\x63olor\x18\x02 \x01(\t\"\x07\n\x05\x45mptyb\x06proto3"
Google::Protobuf::DescriptorPool.generated_pool.add_serialized_file(descriptor_data)

module Example
Size = Google::Protobuf::DescriptorPool.generated_pool.lookup("example.Size").msgclass
Expand Down Expand Up @@ -56,11 +47,9 @@ class EmptyClient < Twirp::Client
end

# Foo message
Google::Protobuf::DescriptorPool.generated_pool.build do
add_message "Foo" do
optional :foo, :string, 1
end
end
descriptor_data = "\n\tfoo.proto\"\x12\n\x03\x46oo\x12\x0b\n\x03\x66oo\x18\x01 \x01(\tb\x06proto3"
Google::Protobuf::DescriptorPool.generated_pool.add_serialized_file(descriptor_data)

Foo = Google::Protobuf::DescriptorPool.generated_pool.lookup("Foo").msgclass

# Foo Client
Expand Down
2 changes: 1 addition & 1 deletion twirp.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.required_ruby_version = '>= 1.9'
spec.add_runtime_dependency 'google-protobuf', '~> 3.0', '>= 3.7.0'
spec.add_runtime_dependency 'google-protobuf', '>= 3.25', '< 5.a'
spec.add_runtime_dependency 'faraday', '< 3' # for clients
spec.add_dependency 'rack', '>= 2.2.3' # for service server handling

Expand Down

0 comments on commit 2e0bb9a

Please sign in to comment.