google-protobuf 3.1.0-java

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.

@@ -0,0 +1,19 @@
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/unit'
9
+
10
+ class GeneratedCodeTest < Test::Unit::TestCase
11
+ def test_generated_msg
12
+ # just test that we can instantiate the message. The purpose of this test
13
+ # is to ensure that the output of the code generator is valid Ruby and
14
+ # successfully creates message definitions and classes, not to test every
15
+ # aspect of the extension (basic.rb is for that).
16
+ m = A::B::C::TestMessage.new()
17
+ m2 = FooBar::TestImportedMessage.new()
18
+ end
19
+ end
@@ -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 mnew.inspect, m.inspect
34
+ assert TestMessage.encode(mnew) == data
35
+ end
36
+ end
37
+ end
38
+ end
metadata ADDED
@@ -0,0 +1,106 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: google-protobuf
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.1.0
5
+ platform: java
6
+ authors:
7
+ - Protobuf Authors
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-02-13 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ requirement: !ruby/object:Gem::Requirement
15
+ requirements:
16
+ - - "~>"
17
+ - !ruby/object:Gem::Version
18
+ version: 0.9.5
19
+ name: rake-compiler
20
+ prerelease: false
21
+ type: :development
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.9.5
27
+ - !ruby/object:Gem::Dependency
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - "~>"
31
+ - !ruby/object:Gem::Version
32
+ version: 3.0.9
33
+ name: test-unit
34
+ prerelease: false
35
+ type: :development
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.9
41
+ - !ruby/object:Gem::Dependency
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: 0.2.4
47
+ name: rubygems-tasks
48
+ prerelease: false
49
+ type: :development
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.2.4
55
+ description: Protocol Buffers are Google's data interchange format.
56
+ email: protobuf@googlegroups.com
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/google/protobuf.rb
62
+ - lib/google/protobuf/any_pb.rb
63
+ - lib/google/protobuf/api_pb.rb
64
+ - lib/google/protobuf/duration_pb.rb
65
+ - lib/google/protobuf/empty_pb.rb
66
+ - lib/google/protobuf/field_mask_pb.rb
67
+ - lib/google/protobuf/message_exts.rb
68
+ - lib/google/protobuf/repeated_field.rb
69
+ - lib/google/protobuf/source_context_pb.rb
70
+ - lib/google/protobuf/struct_pb.rb
71
+ - lib/google/protobuf/timestamp_pb.rb
72
+ - lib/google/protobuf/type_pb.rb
73
+ - lib/google/protobuf/well_known_types.rb
74
+ - lib/google/protobuf/wrappers_pb.rb
75
+ - lib/google/protobuf_java.jar
76
+ - tests/basic.rb
77
+ - tests/generated_code_test.rb
78
+ - tests/stress.rb
79
+ homepage: https://developers.google.com/protocol-buffers
80
+ licenses:
81
+ - BSD
82
+ metadata: {}
83
+ post_install_message:
84
+ rdoc_options: []
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: '0'
92
+ required_rubygems_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ requirements: []
98
+ rubyforge_project:
99
+ rubygems_version: 2.4.8
100
+ signing_key:
101
+ specification_version: 4
102
+ summary: Protocol Buffers
103
+ test_files:
104
+ - tests/basic.rb
105
+ - tests/stress.rb
106
+ - tests/generated_code_test.rb