protip 0.20.2 → 0.20.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2250fc4ff6bdcd6d69c30c369da5a6934d8458b9
4
- data.tar.gz: 96844a4c73302bcebbea6c429d4cdab57f855a70
3
+ metadata.gz: 9e6ad392a69e26b1ea54bb38810e681ddc18d90b
4
+ data.tar.gz: 5ce3ef3d23b68795bf8d25fb951bc67c8a974c19
5
5
  SHA512:
6
- metadata.gz: aa3294f1b6d92f0aa0fccb7fc238f5e07ec63edbf5e4aa4c3fbab2dc318867bc39bdd863c21e598959bbdecce3e8822c703f829e676bdff6ad8d5c5810c47f59
7
- data.tar.gz: 8f81ffd115d480d25e831e8b982ca4097a9f44f0273934bcabee3b60fc829e2394ee60eb8d075c5cbe98a390bd58239ae60c45503e119b67ade0ce81e47f3710
6
+ metadata.gz: 2323e59b4e659b8c61d86b8a782e1e116fead8051e3cb30b75ac57669561a845fa5c63837b04e01bb80f33252471be472a7e1a124b531c397a897bdb32deba4a
7
+ data.tar.gz: 243e701afabec75aa012a3d8186e84dc36adaf36de24d960902460564c142d73734b424357e926ffc855875a415343059ec5d7c2d4a8b5d2ec374c11a949709e
@@ -14,5 +14,5 @@ message EnumTest {
14
14
  ONE = 1;
15
15
  }
16
16
  protip.messages.EnumValue enum = 1 [(protip_enum) = "protip.messages.EnumTest.Enum"];
17
- protip.messages.RepeatedEnum enums = 2 [(protip_enum) = "protip.messages.EnumTest.Enum"];
17
+ protip.messages.RepeatedEnum repeated_enums = 2 [(protip_enum) = "protip.messages.EnumTest.Enum"];
18
18
  }
@@ -8,7 +8,7 @@ require 'protip/messages/wrappers'
8
8
  Google::Protobuf::DescriptorPool.generated_pool.build do
9
9
  add_message "protip.messages.EnumTest" do
10
10
  optional :enum, :message, 1, "protip.messages.EnumValue"
11
- optional :enums, :message, 2, "protip.messages.RepeatedEnum"
11
+ optional :repeated_enums, :message, 2, "protip.messages.RepeatedEnum"
12
12
  end
13
13
  add_enum "protip.messages.EnumTest.Enum" do
14
14
  value :ZERO, 0
@@ -25,4 +25,4 @@ end
25
25
 
26
26
  # -- Protip hack until https://github.com/google/protobuf/issues/1198 is resolved
27
27
  Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumTest").lookup("enum").instance_variable_set(:"@_protip_enum_value", "protip.messages.EnumTest.Enum")
28
- Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumTest").lookup("enums").instance_variable_set(:"@_protip_enum_value", "protip.messages.EnumTest.Enum")
28
+ Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumTest").lookup("repeated_enums").instance_variable_set(:"@_protip_enum_value", "protip.messages.EnumTest.Enum")
@@ -31,7 +31,7 @@ namespace :protip do
31
31
 
32
32
  # figure out the field name and enum name if this line is like
33
33
  # +protip.messages.EnumValue value = 3 [(protip_enum) = "Foo"]+
34
- match = line.match /\s*[a-zA-Z0-9\.]+\s+([a-zA-Z0-9]+).+\[\s*\(\s*protip_enum\s*\)\s*=\s*"([a-zA-Z0-9\.]+)"\s*\]/
34
+ match = line.match /\s*[a-zA-Z0-9\.]+\s+([a-zA-Z0-9_]+).+\[\s*\(\s*protip_enum\s*\)\s*=\s*"([a-zA-Z0-9\.]+)"\s*\]/
35
35
  if match
36
36
  message_name = "#{package ? "#{package}." : ''}#{message_name_stack.compact.join('.')}"
37
37
  field_name = match[1]
@@ -412,16 +412,16 @@ describe Protip::StandardConverter do
412
412
 
413
413
  it 'allows setting and getting a repeated field by Ruby value' do
414
414
  value_map.each do |value, expected|
415
- wrapper.enums = [value]
416
- assert_equal [expected], wrapper.enums
415
+ wrapper.repeated_enums = [value]
416
+ assert_equal [expected], wrapper.repeated_enums
417
417
  end
418
418
  assert_raises RangeError do
419
- wrapper.enums = [:TWO]
419
+ wrapper.repeated_enums = [:TWO]
420
420
  end
421
421
  end
422
422
  it 'allows setting and geting a repeated field by message' do
423
- wrapper.enums = ::Protip::Messages::RepeatedEnum.new(values: [2])
424
- assert_equal [2], wrapper.enums
423
+ wrapper.repeated_enums = ::Protip::Messages::RepeatedEnum.new(values: [2])
424
+ assert_equal [2], wrapper.repeated_enums
425
425
  end
426
426
 
427
427
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.2
4
+ version: 0.20.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - AngelList