google-protobuf 3.21.0.rc.2-x64-mingw-ucrt
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.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/ext/google/protobuf_c/convert.c +361 -0
- data/ext/google/protobuf_c/convert.h +75 -0
- data/ext/google/protobuf_c/defs.c +1280 -0
- data/ext/google/protobuf_c/defs.h +107 -0
- data/ext/google/protobuf_c/extconf.rb +28 -0
- data/ext/google/protobuf_c/map.c +702 -0
- data/ext/google/protobuf_c/map.h +66 -0
- data/ext/google/protobuf_c/message.c +1402 -0
- data/ext/google/protobuf_c/message.h +104 -0
- data/ext/google/protobuf_c/protobuf.c +480 -0
- data/ext/google/protobuf_c/protobuf.h +120 -0
- data/ext/google/protobuf_c/repeated_field.c +657 -0
- data/ext/google/protobuf_c/repeated_field.h +63 -0
- data/ext/google/protobuf_c/ruby-upb.c +11115 -0
- data/ext/google/protobuf_c/ruby-upb.h +5612 -0
- data/ext/google/protobuf_c/third_party/utf8_range/LICENSE +21 -0
- data/ext/google/protobuf_c/third_party/utf8_range/naive.c +92 -0
- data/ext/google/protobuf_c/third_party/utf8_range/range2-neon.c +157 -0
- data/ext/google/protobuf_c/third_party/utf8_range/range2-sse.c +170 -0
- data/ext/google/protobuf_c/third_party/utf8_range/utf8_range.h +9 -0
- data/ext/google/protobuf_c/wrap_memcpy.c +52 -0
- data/lib/google/3.1/protobuf_c.so +0 -0
- data/lib/google/protobuf/any_pb.rb +19 -0
- data/lib/google/protobuf/api_pb.rb +42 -0
- data/lib/google/protobuf/descriptor_dsl.rb +465 -0
- data/lib/google/protobuf/descriptor_pb.rb +269 -0
- data/lib/google/protobuf/duration_pb.rb +19 -0
- data/lib/google/protobuf/empty_pb.rb +17 -0
- data/lib/google/protobuf/field_mask_pb.rb +18 -0
- data/lib/google/protobuf/message_exts.rb +53 -0
- data/lib/google/protobuf/repeated_field.rb +201 -0
- data/lib/google/protobuf/source_context_pb.rb +18 -0
- data/lib/google/protobuf/struct_pb.rb +37 -0
- data/lib/google/protobuf/timestamp_pb.rb +19 -0
- data/lib/google/protobuf/type_pb.rb +92 -0
- data/lib/google/protobuf/well_known_types.rb +240 -0
- data/lib/google/protobuf/wrappers_pb.rb +50 -0
- data/lib/google/protobuf.rb +79 -0
- data/tests/basic.rb +739 -0
- data/tests/generated_code_test.rb +23 -0
- data/tests/stress.rb +38 -0
- metadata +138 -0
| @@ -0,0 +1,23 @@ | |
| 1 | 
            +
            #!/usr/bin/ruby
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            # generated_code.rb is in the same directory as this test.
         | 
| 4 | 
            +
            $LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            require 'generated_code_pb'
         | 
| 7 | 
            +
            require 'test_import_pb'
         | 
| 8 | 
            +
            require 'test_ruby_package_pb'
         | 
| 9 | 
            +
            require 'test/unit'
         | 
| 10 | 
            +
             | 
| 11 | 
            +
            class GeneratedCodeTest < Test::Unit::TestCase
         | 
| 12 | 
            +
              def test_generated_msg
         | 
| 13 | 
            +
                # just test that we can instantiate the message. The purpose of this test
         | 
| 14 | 
            +
                # is to ensure that the output of the code generator is valid Ruby and
         | 
| 15 | 
            +
                # successfully creates message definitions and classes, not to test every
         | 
| 16 | 
            +
                # aspect of the extension (basic.rb is for that).
         | 
| 17 | 
            +
                A::B::C::TestMessage.new
         | 
| 18 | 
            +
                A::B::C::TestMessage::NestedMessage.new
         | 
| 19 | 
            +
                A::B::C::TestLowercaseNested::Lowercase.new
         | 
| 20 | 
            +
                FooBar::TestImportedMessage.new
         | 
| 21 | 
            +
                A::B::TestRubyPackageMessage.new
         | 
| 22 | 
            +
              end
         | 
| 23 | 
            +
            end
         | 
    
        data/tests/stress.rb
    ADDED
    
    | @@ -0,0 +1,38 @@ | |
| 1 | 
            +
            #!/usr/bin/ruby
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            require 'google/protobuf'
         | 
| 4 | 
            +
            require 'test/unit'
         | 
| 5 | 
            +
             | 
| 6 | 
            +
            module StressTest
         | 
| 7 | 
            +
              pool = Google::Protobuf::DescriptorPool.new
         | 
| 8 | 
            +
              pool.build do
         | 
| 9 | 
            +
                add_message "TestMessage" do
         | 
| 10 | 
            +
                  optional :a,  :int32,        1
         | 
| 11 | 
            +
                  repeated :b,  :message,      2, "M"
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
                add_message "M" do
         | 
| 14 | 
            +
                  optional :foo, :string, 1
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
              end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
              TestMessage = pool.lookup("TestMessage").msgclass
         | 
| 19 | 
            +
              M = pool.lookup("M").msgclass
         | 
| 20 | 
            +
             | 
| 21 | 
            +
              class StressTest < Test::Unit::TestCase
         | 
| 22 | 
            +
                def get_msg
         | 
| 23 | 
            +
                  TestMessage.new(:a => 1000,
         | 
| 24 | 
            +
                                  :b => [M.new(:foo => "hello"),
         | 
| 25 | 
            +
                                         M.new(:foo => "world")])
         | 
| 26 | 
            +
                end
         | 
| 27 | 
            +
                def test_stress
         | 
| 28 | 
            +
                  m = get_msg
         | 
| 29 | 
            +
                  data = TestMessage.encode(m)
         | 
| 30 | 
            +
                  100_000.times do
         | 
| 31 | 
            +
                    mnew = TestMessage.decode(data)
         | 
| 32 | 
            +
                    mnew = mnew.dup
         | 
| 33 | 
            +
                    assert_equal m.inspect, mnew.inspect
         | 
| 34 | 
            +
                    assert TestMessage.encode(mnew) == data
         | 
| 35 | 
            +
                  end
         | 
| 36 | 
            +
                end
         | 
| 37 | 
            +
              end
         | 
| 38 | 
            +
            end
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,138 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: google-protobuf
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 3.21.0.rc.2
         | 
| 5 | 
            +
            platform: x64-mingw-ucrt
         | 
| 6 | 
            +
            authors:
         | 
| 7 | 
            +
            - Protobuf Authors
         | 
| 8 | 
            +
            autorequire:
         | 
| 9 | 
            +
            bindir: bin
         | 
| 10 | 
            +
            cert_chain: []
         | 
| 11 | 
            +
            date: 2022-05-19 00:00:00.000000000 Z
         | 
| 12 | 
            +
            dependencies:
         | 
| 13 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            +
              name: rake-compiler-dock
         | 
| 15 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            +
                requirements:
         | 
| 17 | 
            +
                - - '='
         | 
| 18 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            +
                    version: 1.2.1
         | 
| 20 | 
            +
              type: :development
         | 
| 21 | 
            +
              prerelease: false
         | 
| 22 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            +
                requirements:
         | 
| 24 | 
            +
                - - '='
         | 
| 25 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            +
                    version: 1.2.1
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: rake-compiler
         | 
| 29 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 | 
            +
                requirements:
         | 
| 31 | 
            +
                - - "~>"
         | 
| 32 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            +
                    version: 1.1.0
         | 
| 34 | 
            +
              type: :development
         | 
| 35 | 
            +
              prerelease: false
         | 
| 36 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            +
                requirements:
         | 
| 38 | 
            +
                - - "~>"
         | 
| 39 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            +
                    version: 1.1.0
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: test-unit
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - "~>"
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '3.0'
         | 
| 48 | 
            +
                - - ">="
         | 
| 49 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 50 | 
            +
                    version: 3.0.9
         | 
| 51 | 
            +
              type: :development
         | 
| 52 | 
            +
              prerelease: false
         | 
| 53 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 54 | 
            +
                requirements:
         | 
| 55 | 
            +
                - - "~>"
         | 
| 56 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 57 | 
            +
                    version: '3.0'
         | 
| 58 | 
            +
                - - ">="
         | 
| 59 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 60 | 
            +
                    version: 3.0.9
         | 
| 61 | 
            +
            description: Protocol Buffers are Google's data interchange format.
         | 
| 62 | 
            +
            email: protobuf@googlegroups.com
         | 
| 63 | 
            +
            executables: []
         | 
| 64 | 
            +
            extensions: []
         | 
| 65 | 
            +
            extra_rdoc_files: []
         | 
| 66 | 
            +
            files:
         | 
| 67 | 
            +
            - ext/google/protobuf_c/convert.c
         | 
| 68 | 
            +
            - ext/google/protobuf_c/convert.h
         | 
| 69 | 
            +
            - ext/google/protobuf_c/defs.c
         | 
| 70 | 
            +
            - ext/google/protobuf_c/defs.h
         | 
| 71 | 
            +
            - ext/google/protobuf_c/extconf.rb
         | 
| 72 | 
            +
            - ext/google/protobuf_c/map.c
         | 
| 73 | 
            +
            - ext/google/protobuf_c/map.h
         | 
| 74 | 
            +
            - ext/google/protobuf_c/message.c
         | 
| 75 | 
            +
            - ext/google/protobuf_c/message.h
         | 
| 76 | 
            +
            - ext/google/protobuf_c/protobuf.c
         | 
| 77 | 
            +
            - ext/google/protobuf_c/protobuf.h
         | 
| 78 | 
            +
            - ext/google/protobuf_c/repeated_field.c
         | 
| 79 | 
            +
            - ext/google/protobuf_c/repeated_field.h
         | 
| 80 | 
            +
            - ext/google/protobuf_c/ruby-upb.c
         | 
| 81 | 
            +
            - ext/google/protobuf_c/ruby-upb.h
         | 
| 82 | 
            +
            - ext/google/protobuf_c/third_party/utf8_range/LICENSE
         | 
| 83 | 
            +
            - ext/google/protobuf_c/third_party/utf8_range/naive.c
         | 
| 84 | 
            +
            - ext/google/protobuf_c/third_party/utf8_range/range2-neon.c
         | 
| 85 | 
            +
            - ext/google/protobuf_c/third_party/utf8_range/range2-sse.c
         | 
| 86 | 
            +
            - ext/google/protobuf_c/third_party/utf8_range/utf8_range.h
         | 
| 87 | 
            +
            - ext/google/protobuf_c/wrap_memcpy.c
         | 
| 88 | 
            +
            - lib/google/3.1/protobuf_c.so
         | 
| 89 | 
            +
            - lib/google/protobuf.rb
         | 
| 90 | 
            +
            - lib/google/protobuf/any_pb.rb
         | 
| 91 | 
            +
            - lib/google/protobuf/api_pb.rb
         | 
| 92 | 
            +
            - lib/google/protobuf/descriptor_dsl.rb
         | 
| 93 | 
            +
            - lib/google/protobuf/descriptor_pb.rb
         | 
| 94 | 
            +
            - lib/google/protobuf/duration_pb.rb
         | 
| 95 | 
            +
            - lib/google/protobuf/empty_pb.rb
         | 
| 96 | 
            +
            - lib/google/protobuf/field_mask_pb.rb
         | 
| 97 | 
            +
            - lib/google/protobuf/message_exts.rb
         | 
| 98 | 
            +
            - lib/google/protobuf/repeated_field.rb
         | 
| 99 | 
            +
            - lib/google/protobuf/source_context_pb.rb
         | 
| 100 | 
            +
            - lib/google/protobuf/struct_pb.rb
         | 
| 101 | 
            +
            - lib/google/protobuf/timestamp_pb.rb
         | 
| 102 | 
            +
            - lib/google/protobuf/type_pb.rb
         | 
| 103 | 
            +
            - lib/google/protobuf/well_known_types.rb
         | 
| 104 | 
            +
            - lib/google/protobuf/wrappers_pb.rb
         | 
| 105 | 
            +
            - tests/basic.rb
         | 
| 106 | 
            +
            - tests/generated_code_test.rb
         | 
| 107 | 
            +
            - tests/stress.rb
         | 
| 108 | 
            +
            homepage: https://developers.google.com/protocol-buffers
         | 
| 109 | 
            +
            licenses:
         | 
| 110 | 
            +
            - BSD-3-Clause
         | 
| 111 | 
            +
            metadata:
         | 
| 112 | 
            +
              source_code_uri: https://github.com/protocolbuffers/protobuf/tree/v3.21.0-rc2/ruby
         | 
| 113 | 
            +
            post_install_message:
         | 
| 114 | 
            +
            rdoc_options: []
         | 
| 115 | 
            +
            require_paths:
         | 
| 116 | 
            +
            - lib
         | 
| 117 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 118 | 
            +
              requirements:
         | 
| 119 | 
            +
              - - ">="
         | 
| 120 | 
            +
                - !ruby/object:Gem::Version
         | 
| 121 | 
            +
                  version: '3.1'
         | 
| 122 | 
            +
              - - "<"
         | 
| 123 | 
            +
                - !ruby/object:Gem::Version
         | 
| 124 | 
            +
                  version: 3.2.dev
         | 
| 125 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 126 | 
            +
              requirements:
         | 
| 127 | 
            +
              - - ">"
         | 
| 128 | 
            +
                - !ruby/object:Gem::Version
         | 
| 129 | 
            +
                  version: 1.3.1
         | 
| 130 | 
            +
            requirements: []
         | 
| 131 | 
            +
            rubygems_version: 3.3.4
         | 
| 132 | 
            +
            signing_key:
         | 
| 133 | 
            +
            specification_version: 4
         | 
| 134 | 
            +
            summary: Protocol Buffers
         | 
| 135 | 
            +
            test_files:
         | 
| 136 | 
            +
            - tests/basic.rb
         | 
| 137 | 
            +
            - tests/stress.rb
         | 
| 138 | 
            +
            - tests/generated_code_test.rb
         |