google-protobuf 3.0.0.alpha.5.0.3-x86-mingw32 → 3.0.0.alpha.5.0.4-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of google-protobuf might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 441a1e0094d1fa5e6ede3a8b2ada8cccfa6ca871
4
- data.tar.gz: 2cddadbc16b01e385f6615caf6afd3b1df149dc3
3
+ metadata.gz: c061c75dd5fbac9a581076de334b84deaa7d06ca
4
+ data.tar.gz: 770950e293eec1d9b7784d599e5194a2f4c4c607
5
5
  SHA512:
6
- metadata.gz: 2ad1588d8b826c192ef4211a43e353b93f5d61e95158ff811c623ebf75eb783d3d9c49530a49942393b84ac316186c244bd265864c6b8df69c0c8f9434f7324a
7
- data.tar.gz: 31cae3dbc8a0a5b3dd3ae54a1506b11275164e5c776ee229275ffb871572a395c21249a1363498235752952de8ea46e6cf84bc7fd1d993a6b52ab7cd925e622f
6
+ metadata.gz: bec27704d6fc2c6931713a1f7a20bbbaa9dfb7aab0e5e61d0a8cce5c609f6f4e8ac8c9f0a3556f3f764b2f5a8ea950a91cde8d30aa4b662a3ea9627f84d5fa41
7
+ data.tar.gz: fcaf7f0de07599b0a1def2874c5447350bd557587d652b476e0bb6e3a373f49063407078665c7616ae2bfb59d049a070ff2888bffdf035cdfe91b1d92f6aaad2
@@ -166,7 +166,7 @@ VALUE Message_method_missing(int argc, VALUE* argv, VALUE _self) {
166
166
  name, name_len);
167
167
 
168
168
  if (f == NULL) {
169
- rb_raise(rb_eArgError, "Unknown field");
169
+ return rb_call_super(argc, argv);
170
170
  }
171
171
 
172
172
  if (setter) {
@@ -197,7 +197,7 @@ int Message_initialize_kwarg(VALUE key, VALUE val, VALUE _self) {
197
197
  f = upb_msgdef_ntofz(self->descriptor->msgdef, name);
198
198
  if (f == NULL) {
199
199
  rb_raise(rb_eArgError,
200
- "Unknown field name in initialization map entry.");
200
+ "Unknown field name '%s' in initialization map entry.", name);
201
201
  }
202
202
 
203
203
  if (is_map_field(f)) {
@@ -205,7 +205,7 @@ int Message_initialize_kwarg(VALUE key, VALUE val, VALUE _self) {
205
205
 
206
206
  if (TYPE(val) != T_HASH) {
207
207
  rb_raise(rb_eArgError,
208
- "Expected Hash object as initializer value for map field.");
208
+ "Expected Hash object as initializer value for map field '%s'.", name);
209
209
  }
210
210
  map = layout_get(self->descriptor->layout, Message_data(self), f);
211
211
  Map_merge_into_self(map, val);
@@ -214,7 +214,7 @@ int Message_initialize_kwarg(VALUE key, VALUE val, VALUE _self) {
214
214
 
215
215
  if (TYPE(val) != T_ARRAY) {
216
216
  rb_raise(rb_eArgError,
217
- "Expected array as initializer value for repeated field.");
217
+ "Expected array as initializer value for repeated field '%s'.", name);
218
218
  }
219
219
  ary = layout_get(self->descriptor->layout, Message_data(self), f);
220
220
  for (int i = 0; i < RARRAY_LEN(val); i++) {
@@ -8537,7 +8537,7 @@ bool upb_pbdecoder_setmaxnesting(upb_pbdecoder *d, size_t max) {
8537
8537
  ** to perfectly match the output of reference encoders that always use the
8538
8538
  ** optimal amount of space for each length.
8539
8539
  **
8540
- ** (2) requires guessing the the size upfront, and if multiple lengths are
8540
+ ** (2) requires guessing the size upfront, and if multiple lengths are
8541
8541
  ** guessed wrong the minimum required number of memmove() operations may
8542
8542
  ** be complicated to compute correctly. Implemented properly, it may have
8543
8543
  ** a useful amortized or average cost, but more investigation is required
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/any.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.Any" do
8
+ optional :type_url, :string, 1
9
+ optional :value, :bytes, 2
10
+ end
11
+ end
12
+
13
+ module Google
14
+ module Protobuf
15
+ Any = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Any").msgclass
16
+ end
17
+ end
@@ -0,0 +1,39 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/api.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/source_context'
7
+ require 'google/protobuf/type'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "google.protobuf.Api" do
10
+ optional :name, :string, 1
11
+ repeated :methods, :message, 2, "google.protobuf.Method"
12
+ repeated :options, :message, 3, "google.protobuf.Option"
13
+ optional :version, :string, 4
14
+ optional :source_context, :message, 5, "google.protobuf.SourceContext"
15
+ repeated :mixins, :message, 6, "google.protobuf.Mixin"
16
+ optional :syntax, :enum, 7, "google.protobuf.Syntax"
17
+ end
18
+ add_message "google.protobuf.Method" do
19
+ optional :name, :string, 1
20
+ optional :request_type_url, :string, 2
21
+ optional :request_streaming, :bool, 3
22
+ optional :response_type_url, :string, 4
23
+ optional :response_streaming, :bool, 5
24
+ repeated :options, :message, 6, "google.protobuf.Option"
25
+ optional :syntax, :enum, 7, "google.protobuf.Syntax"
26
+ end
27
+ add_message "google.protobuf.Mixin" do
28
+ optional :name, :string, 1
29
+ optional :root, :string, 2
30
+ end
31
+ end
32
+
33
+ module Google
34
+ module Protobuf
35
+ Api = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Api").msgclass
36
+ Method = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Method").msgclass
37
+ Mixin = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Mixin").msgclass
38
+ end
39
+ end
@@ -0,0 +1,17 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/duration.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.Duration" do
8
+ optional :seconds, :int64, 1
9
+ optional :nanos, :int32, 2
10
+ end
11
+ end
12
+
13
+ module Google
14
+ module Protobuf
15
+ Duration = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Duration").msgclass
16
+ end
17
+ end
@@ -0,0 +1,15 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/empty.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.Empty" do
8
+ end
9
+ end
10
+
11
+ module Google
12
+ module Protobuf
13
+ Empty = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Empty").msgclass
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/field_mask.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.FieldMask" do
8
+ repeated :paths, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Protobuf
14
+ FieldMask = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FieldMask").msgclass
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/source_context.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.SourceContext" do
8
+ optional :file_name, :string, 1
9
+ end
10
+ end
11
+
12
+ module Google
13
+ module Protobuf
14
+ SourceContext = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.SourceContext").msgclass
15
+ end
16
+ end
@@ -0,0 +1,35 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/struct.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.Struct" do
8
+ map :fields, :string, :message, 1, "google.protobuf.Value"
9
+ end
10
+ add_message "google.protobuf.Value" do
11
+ oneof :kind do
12
+ optional :null_value, :enum, 1, "google.protobuf.NullValue"
13
+ optional :number_value, :double, 2
14
+ optional :string_value, :string, 3
15
+ optional :bool_value, :bool, 4
16
+ optional :struct_value, :message, 5, "google.protobuf.Struct"
17
+ optional :list_value, :message, 6, "google.protobuf.ListValue"
18
+ end
19
+ end
20
+ add_message "google.protobuf.ListValue" do
21
+ repeated :values, :message, 1, "google.protobuf.Value"
22
+ end
23
+ add_enum "google.protobuf.NullValue" do
24
+ value :NULL_VALUE, 0
25
+ end
26
+ end
27
+
28
+ module Google
29
+ module Protobuf
30
+ Struct = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Struct").msgclass
31
+ Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Value").msgclass
32
+ ListValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.ListValue").msgclass
33
+ NullValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.NullValue").enummodule
34
+ end
35
+ end
@@ -0,0 +1,17 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/timestamp.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.Timestamp" do
8
+ optional :seconds, :int64, 1
9
+ optional :nanos, :int32, 2
10
+ end
11
+ end
12
+
13
+ module Google
14
+ module Protobuf
15
+ Timestamp = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Timestamp").msgclass
16
+ end
17
+ end
@@ -0,0 +1,89 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/type.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ require 'google/protobuf/any'
7
+ require 'google/protobuf/source_context'
8
+ Google::Protobuf::DescriptorPool.generated_pool.build do
9
+ add_message "google.protobuf.Type" do
10
+ optional :name, :string, 1
11
+ repeated :fields, :message, 2, "google.protobuf.Field"
12
+ repeated :oneofs, :string, 3
13
+ repeated :options, :message, 4, "google.protobuf.Option"
14
+ optional :source_context, :message, 5, "google.protobuf.SourceContext"
15
+ optional :syntax, :enum, 6, "google.protobuf.Syntax"
16
+ end
17
+ add_message "google.protobuf.Field" do
18
+ optional :kind, :enum, 1, "google.protobuf.Field.Kind"
19
+ optional :cardinality, :enum, 2, "google.protobuf.Field.Cardinality"
20
+ optional :number, :int32, 3
21
+ optional :name, :string, 4
22
+ optional :type_url, :string, 6
23
+ optional :oneof_index, :int32, 7
24
+ optional :packed, :bool, 8
25
+ repeated :options, :message, 9, "google.protobuf.Option"
26
+ optional :json_name, :string, 10
27
+ optional :default_value, :string, 11
28
+ end
29
+ add_enum "google.protobuf.Field.Kind" do
30
+ value :TYPE_UNKNOWN, 0
31
+ value :TYPE_DOUBLE, 1
32
+ value :TYPE_FLOAT, 2
33
+ value :TYPE_INT64, 3
34
+ value :TYPE_UINT64, 4
35
+ value :TYPE_INT32, 5
36
+ value :TYPE_FIXED64, 6
37
+ value :TYPE_FIXED32, 7
38
+ value :TYPE_BOOL, 8
39
+ value :TYPE_STRING, 9
40
+ value :TYPE_GROUP, 10
41
+ value :TYPE_MESSAGE, 11
42
+ value :TYPE_BYTES, 12
43
+ value :TYPE_UINT32, 13
44
+ value :TYPE_ENUM, 14
45
+ value :TYPE_SFIXED32, 15
46
+ value :TYPE_SFIXED64, 16
47
+ value :TYPE_SINT32, 17
48
+ value :TYPE_SINT64, 18
49
+ end
50
+ add_enum "google.protobuf.Field.Cardinality" do
51
+ value :CARDINALITY_UNKNOWN, 0
52
+ value :CARDINALITY_OPTIONAL, 1
53
+ value :CARDINALITY_REQUIRED, 2
54
+ value :CARDINALITY_REPEATED, 3
55
+ end
56
+ add_message "google.protobuf.Enum" do
57
+ optional :name, :string, 1
58
+ repeated :enumvalue, :message, 2, "google.protobuf.EnumValue"
59
+ repeated :options, :message, 3, "google.protobuf.Option"
60
+ optional :source_context, :message, 4, "google.protobuf.SourceContext"
61
+ optional :syntax, :enum, 5, "google.protobuf.Syntax"
62
+ end
63
+ add_message "google.protobuf.EnumValue" do
64
+ optional :name, :string, 1
65
+ optional :number, :int32, 2
66
+ repeated :options, :message, 3, "google.protobuf.Option"
67
+ end
68
+ add_message "google.protobuf.Option" do
69
+ optional :name, :string, 1
70
+ optional :value, :message, 2, "google.protobuf.Any"
71
+ end
72
+ add_enum "google.protobuf.Syntax" do
73
+ value :SYNTAX_PROTO2, 0
74
+ value :SYNTAX_PROTO3, 1
75
+ end
76
+ end
77
+
78
+ module Google
79
+ module Protobuf
80
+ Type = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Type").msgclass
81
+ Field = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field").msgclass
82
+ Field::Kind = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Kind").enummodule
83
+ Field::Cardinality = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Field.Cardinality").enummodule
84
+ Enum = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Enum").msgclass
85
+ EnumValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.EnumValue").msgclass
86
+ Option = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Option").msgclass
87
+ Syntax = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Syntax").enummodule
88
+ end
89
+ end
@@ -0,0 +1,48 @@
1
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
2
+ # source: google/protobuf/wrappers.proto
3
+
4
+ require 'google/protobuf'
5
+
6
+ Google::Protobuf::DescriptorPool.generated_pool.build do
7
+ add_message "google.protobuf.DoubleValue" do
8
+ optional :value, :double, 1
9
+ end
10
+ add_message "google.protobuf.FloatValue" do
11
+ optional :value, :float, 1
12
+ end
13
+ add_message "google.protobuf.Int64Value" do
14
+ optional :value, :int64, 1
15
+ end
16
+ add_message "google.protobuf.UInt64Value" do
17
+ optional :value, :uint64, 1
18
+ end
19
+ add_message "google.protobuf.Int32Value" do
20
+ optional :value, :int32, 1
21
+ end
22
+ add_message "google.protobuf.UInt32Value" do
23
+ optional :value, :uint32, 1
24
+ end
25
+ add_message "google.protobuf.BoolValue" do
26
+ optional :value, :bool, 1
27
+ end
28
+ add_message "google.protobuf.StringValue" do
29
+ optional :value, :string, 1
30
+ end
31
+ add_message "google.protobuf.BytesValue" do
32
+ optional :value, :bytes, 1
33
+ end
34
+ end
35
+
36
+ module Google
37
+ module Protobuf
38
+ DoubleValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.DoubleValue").msgclass
39
+ FloatValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.FloatValue").msgclass
40
+ Int64Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int64Value").msgclass
41
+ UInt64Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt64Value").msgclass
42
+ Int32Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.Int32Value").msgclass
43
+ UInt32Value = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.UInt32Value").msgclass
44
+ BoolValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BoolValue").msgclass
45
+ StringValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.StringValue").msgclass
46
+ BytesValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("google.protobuf.BytesValue").msgclass
47
+ end
48
+ end
data/tests/basic.rb CHANGED
@@ -191,6 +191,35 @@ module BasicTest
191
191
  assert m1.hash != m2.hash
192
192
  end
193
193
 
194
+ def test_unknown_field_errors
195
+ e = assert_raise NoMethodError do
196
+ TestMessage.new.hello
197
+ end
198
+ assert_match(/hello/, e.message)
199
+
200
+ e = assert_raise NoMethodError do
201
+ TestMessage.new.hello = "world"
202
+ end
203
+ assert_match(/hello/, e.message)
204
+ end
205
+
206
+ def test_initialization_map_errors
207
+ e = assert_raise ArgumentError do
208
+ TestMessage.new(:hello => "world")
209
+ end
210
+ assert_match(/hello/, e.message)
211
+
212
+ e = assert_raise ArgumentError do
213
+ MapMessage.new(:map_string_int32 => "hello")
214
+ end
215
+ assert_equal e.message, "Expected Hash object as initializer value for map field 'map_string_int32'."
216
+
217
+ e = assert_raise ArgumentError do
218
+ TestMessage.new(:repeated_uint32 => "hello")
219
+ end
220
+ assert_equal e.message, "Expected array as initializer value for repeated field 'repeated_uint32'."
221
+ end
222
+
194
223
  def test_type_errors
195
224
  m = TestMessage.new
196
225
  assert_raise TypeError do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-protobuf
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.alpha.5.0.3
4
+ version: 3.0.0.alpha.5.0.4
5
5
  platform: x86-mingw32
6
6
  authors:
7
7
  - Protobuf Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-11 00:00:00.000000000 Z
11
+ date: 2016-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler-dock
@@ -88,8 +88,18 @@ files:
88
88
  - lib/google/2.2/protobuf_c.so
89
89
  - lib/google/2.3/protobuf_c.so
90
90
  - lib/google/protobuf.rb
91
+ - lib/google/protobuf/any.rb
92
+ - lib/google/protobuf/api.rb
93
+ - lib/google/protobuf/duration.rb
94
+ - lib/google/protobuf/empty.rb
95
+ - lib/google/protobuf/field_mask.rb
91
96
  - lib/google/protobuf/message_exts.rb
92
97
  - lib/google/protobuf/repeated_field.rb
98
+ - lib/google/protobuf/source_context.rb
99
+ - lib/google/protobuf/struct.rb
100
+ - lib/google/protobuf/timestamp.rb
101
+ - lib/google/protobuf/type.rb
102
+ - lib/google/protobuf/wrappers.rb
93
103
  - tests/basic.rb
94
104
  - tests/generated_code_test.rb
95
105
  - tests/stress.rb