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 +4 -4
- data/lib/google/protobuf/wrappers.rb +1 -1
- data/test/unit/protip/standard_converter_test.rb +15 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6d7da3d8c0fd8c530ed6d85bdf6639cef1592db
|
4
|
+
data.tar.gz: 48e47ffce50e963933c0a77b0af7c75ddf510b2b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf99d77f89dcb13056b8b0a2a844cbe360abdc060b4ece1d5e6207664f6fa3927b24f0c4e863a8f5be6db746201545e33b12cce08abcda240c2627ec76040b50
|
7
|
+
data.tar.gz: f2330e50eb7a124fd3e122816391c47c558a944e8ffba1609693b086d8afbb6cc7c80b41574cdd1c19d7428a0efff7a8b2b622dd08bae5fa65f822518a8d10f5
|
@@ -19,7 +19,11 @@ describe Protip::StandardConverter do
|
|
19
19
|
end
|
20
20
|
|
21
21
|
let(:string_types) do
|
22
|
-
[Google::Protobuf::StringValue
|
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
|
44
|
-
5.5
|
45
|
-
false
|
46
|
-
'asdf'
|
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
|
65
|
-
5.5
|
66
|
-
false
|
67
|
-
'asdf'
|
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.
|
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-
|
11
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|