protip 0.12.2 → 0.12.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: bf7fd51c4148d4f6a5bf4eea255b56b5f77aeb7d
4
- data.tar.gz: 1a46874b9ad497258d92ddb68446bc36586f6b8c
3
+ metadata.gz: f6d7da3d8c0fd8c530ed6d85bdf6639cef1592db
4
+ data.tar.gz: 48e47ffce50e963933c0a77b0af7c75ddf510b2b
5
5
  SHA512:
6
- metadata.gz: 1ded578e1288b063e668e1a96d455ac0888e19954858ca71dd930bd371c0bea5ad31e7c8c68a6db85b5a7f3ac2e762fe2cc10f03788f958d0b0b8f3d40806cff
7
- data.tar.gz: 62a8a068ca0cf2db613b5c933d51926972818b9951dc9012ea4cae056a797810c54a3eb2fcae89534215a7829d61b211394dae2764533a0d0b0744dacdada24d
6
+ metadata.gz: bf99d77f89dcb13056b8b0a2a844cbe360abdc060b4ece1d5e6207664f6fa3927b24f0c4e863a8f5be6db746201545e33b12cce08abcda240c2627ec76040b50
7
+ data.tar.gz: f2330e50eb7a124fd3e122816391c47c558a944e8ffba1609693b086d8afbb6cc7c80b41574cdd1c19d7428a0efff7a8b2b622dd08bae5fa65f822518a8d10f5
@@ -29,7 +29,7 @@ Google::Protobuf::DescriptorPool.generated_pool.build do
29
29
  optional :value, :string, 1
30
30
  end
31
31
  add_message "google.protobuf.BytesValue" do
32
- optional :value, :string, 1
32
+ optional :value, :bytes, 1
33
33
  end
34
34
  end
35
35
 
@@ -19,7 +19,11 @@ describe Protip::StandardConverter do
19
19
  end
20
20
 
21
21
  let(:string_types) do
22
- [Google::Protobuf::StringValue, Google::Protobuf::BytesValue]
22
+ [Google::Protobuf::StringValue]
23
+ end
24
+
25
+ let(:bytes_types) do
26
+ [Google::Protobuf::BytesValue]
23
27
  end
24
28
 
25
29
 
@@ -40,10 +44,11 @@ describe Protip::StandardConverter do
40
44
  describe '#to_object' do
41
45
  it 'converts wrapper types' do
42
46
  {
43
- 6 => integer_types,
44
- 5.5 => float_types,
45
- false => bool_types,
46
- 'asdf' => string_types,
47
+ 6 => integer_types,
48
+ 5.5 => float_types,
49
+ false => bool_types,
50
+ 'asdf' => string_types,
51
+ Base64.decode64("U2VuZCByZWluZm9yY2VtZW50cw==\n") => bytes_types,
47
52
  }.each do |value, message_types|
48
53
  message_types.each do |message_class|
49
54
  assert_equal value, converter.to_object(message_class.new value: value)
@@ -61,10 +66,11 @@ describe Protip::StandardConverter do
61
66
  describe '#to_message' do
62
67
  it 'converts wrapper types' do
63
68
  {
64
- 6 => integer_types,
65
- 5.5 => float_types,
66
- false => bool_types,
67
- 'asdf' => string_types,
69
+ 6 => integer_types,
70
+ 5.5 => float_types,
71
+ false => bool_types,
72
+ 'asdf' => string_types,
73
+ Base64.decode64("U2VuZCByZWluZm9yY2VtZW50cw==\n") => bytes_types,
68
74
  }.each do |value, message_types|
69
75
  message_types.each do |message_class|
70
76
  assert_equal message_class.new(value: value), converter.to_message(value, message_class)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.2
4
+ version: 0.12.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - AngelList
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-10 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel