protip 0.36 → 0.37
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/protip/client.rb +1 -0
- data/lib/protip/decorator.rb +5 -5
- data/lib/protip/extensions_pb.rb +4 -0
- data/lib/protip/messages/active_support/time_with_zone_pb.rb +6 -4
- data/lib/protip/messages/array_pb.rb +5 -3
- data/lib/protip/messages/big_decimal_value_pb.rb +7 -5
- data/lib/protip/messages/currency_pb.rb +181 -179
- data/lib/protip/messages/errors_pb.rb +11 -9
- data/lib/protip/messages/money_pb.rb +7 -4
- data/lib/protip/messages/range_pb.rb +6 -4
- data/lib/protip/messages/repeated_wrappers_pb.rb +42 -39
- data/lib/protip/messages/test_pb.rb +12 -9
- data/lib/protip/messages/types_pb.rb +7 -5
- data/lib/protip/messages/wrappers_pb.rb +6 -3
- data/lib/protip/messages_pb.rb +3 -0
- data/lib/protip/tasks/compile.rake +5 -2
- data/lib/protip/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b91d785c337df88feedaf062679787c1745e8e7ee420535549ccbd6e5f61fab1
|
4
|
+
data.tar.gz: e897d6cda03fe31835f9a8e2243be0cb7f0875adbf590a05154d169e6252924b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 84d548ff44b595968e6c05e7a794e2aca2bb9e51f4f3068615034de13bb2f2a02a0d94f3cfa1490c99b1856c5fc5c2c66661793b989c9f3430a891a445ad3a24
|
7
|
+
data.tar.gz: d5e34084b562c4a3b424a94d1fe2a46926fd14a3c0e3da6b9f5bc0d335af24d824a0cbc0be3c30b8eedbcaba316b374d6372bd1caeb83a94290c540cc5f5b200
|
data/lib/protip/client.rb
CHANGED
data/lib/protip/decorator.rb
CHANGED
@@ -226,11 +226,11 @@ module Protip
|
|
226
226
|
end
|
227
227
|
|
228
228
|
def set(field, value)
|
229
|
-
if field.label == :
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
229
|
+
return if field.label == :optional && value.nil? && get(field).nil?
|
230
|
+
|
231
|
+
return message[field.name].replace value.map{|v| to_protobuf_value field, v} if field.label == :repeated
|
232
|
+
|
233
|
+
message[field.name] = to_protobuf_value(field, value)
|
234
234
|
end
|
235
235
|
|
236
236
|
# Helper for setting values - converts the value for the given
|
data/lib/protip/extensions_pb.rb
CHANGED
@@ -4,16 +4,18 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
add_file("protip/messages/active_support/time_with_zone.proto", :syntax => :proto3) do
|
8
|
+
add_message "protip.messages.ActiveSupport.TimeWithZone" do
|
9
|
+
optional :utc_timestamp, :int64, 1
|
10
|
+
optional :time_zone_name, :string, 2
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
13
15
|
module Protip
|
14
16
|
module Messages
|
15
17
|
module ActiveSupport
|
16
|
-
TimeWithZone = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.ActiveSupport.TimeWithZone").msgclass
|
18
|
+
TimeWithZone = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.ActiveSupport.TimeWithZone").msgclass
|
17
19
|
end
|
18
20
|
end
|
19
21
|
end
|
@@ -4,13 +4,15 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
7
|
+
add_file("protip/messages/array.proto", :syntax => :proto3) do
|
8
|
+
add_message "protip.messages.Array" do
|
9
|
+
repeated :messages, :bytes, 1
|
10
|
+
end
|
9
11
|
end
|
10
12
|
end
|
11
13
|
|
12
14
|
module Protip
|
13
15
|
module Messages
|
14
|
-
Array = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Array").msgclass
|
16
|
+
Array = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Array").msgclass
|
15
17
|
end
|
16
18
|
end
|
@@ -4,15 +4,17 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
add_file("protip/messages/big_decimal_value.proto", :syntax => :proto3) do
|
8
|
+
add_message "protip.messages.BigDecimalValue" do
|
9
|
+
optional :numerator, :int64, 1
|
10
|
+
optional :denominator, :uint64, 2
|
11
|
+
optional :precision, :uint32, 3
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
|
14
16
|
module Protip
|
15
17
|
module Messages
|
16
|
-
BigDecimalValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.BigDecimalValue").msgclass
|
18
|
+
BigDecimalValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.BigDecimalValue").msgclass
|
17
19
|
end
|
18
20
|
end
|
@@ -4,189 +4,191 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
7
|
+
add_file("protip/messages/currency.proto", :syntax => :proto3) do
|
8
|
+
add_message "protip.messages.Currency" do
|
9
|
+
optional :currency_code, :enum, 1, "protip.messages.Currency.CurrencyCode"
|
10
|
+
end
|
11
|
+
add_enum "protip.messages.Currency.CurrencyCode" do
|
12
|
+
value :AED, 0
|
13
|
+
value :AFN, 1
|
14
|
+
value :ALL, 2
|
15
|
+
value :AMD, 3
|
16
|
+
value :ANG, 4
|
17
|
+
value :AOA, 5
|
18
|
+
value :ARS, 6
|
19
|
+
value :AUD, 7
|
20
|
+
value :AWG, 8
|
21
|
+
value :AZN, 9
|
22
|
+
value :BAM, 10
|
23
|
+
value :BBD, 11
|
24
|
+
value :BDT, 12
|
25
|
+
value :BGN, 13
|
26
|
+
value :BHD, 14
|
27
|
+
value :BIF, 15
|
28
|
+
value :BMD, 16
|
29
|
+
value :BND, 17
|
30
|
+
value :BOB, 18
|
31
|
+
value :BRL, 19
|
32
|
+
value :BSD, 20
|
33
|
+
value :BTN, 21
|
34
|
+
value :BWP, 22
|
35
|
+
value :BYR, 23
|
36
|
+
value :BZD, 24
|
37
|
+
value :CAD, 25
|
38
|
+
value :CDF, 26
|
39
|
+
value :CHF, 27
|
40
|
+
value :CLF, 28
|
41
|
+
value :CLP, 29
|
42
|
+
value :CNY, 30
|
43
|
+
value :COP, 31
|
44
|
+
value :CRC, 32
|
45
|
+
value :CUC, 33
|
46
|
+
value :CUP, 34
|
47
|
+
value :CVE, 35
|
48
|
+
value :CZK, 36
|
49
|
+
value :DJF, 37
|
50
|
+
value :DKK, 38
|
51
|
+
value :DOP, 39
|
52
|
+
value :DZD, 40
|
53
|
+
value :EGP, 41
|
54
|
+
value :ERN, 42
|
55
|
+
value :ETB, 43
|
56
|
+
value :EUR, 44
|
57
|
+
value :FJD, 45
|
58
|
+
value :FKP, 46
|
59
|
+
value :GBP, 47
|
60
|
+
value :GEL, 48
|
61
|
+
value :GHS, 49
|
62
|
+
value :GIP, 50
|
63
|
+
value :GMD, 51
|
64
|
+
value :GNF, 52
|
65
|
+
value :GTQ, 53
|
66
|
+
value :GYD, 54
|
67
|
+
value :HKD, 55
|
68
|
+
value :HNL, 56
|
69
|
+
value :HRK, 57
|
70
|
+
value :HTG, 58
|
71
|
+
value :HUF, 59
|
72
|
+
value :IDR, 60
|
73
|
+
value :ILS, 61
|
74
|
+
value :INR, 62
|
75
|
+
value :IQD, 63
|
76
|
+
value :IRR, 64
|
77
|
+
value :ISK, 65
|
78
|
+
value :JMD, 66
|
79
|
+
value :JOD, 67
|
80
|
+
value :JPY, 68
|
81
|
+
value :KES, 69
|
82
|
+
value :KGS, 70
|
83
|
+
value :KHR, 71
|
84
|
+
value :KMF, 72
|
85
|
+
value :KPW, 73
|
86
|
+
value :KRW, 74
|
87
|
+
value :KWD, 75
|
88
|
+
value :KYD, 76
|
89
|
+
value :KZT, 77
|
90
|
+
value :LAK, 78
|
91
|
+
value :LBP, 79
|
92
|
+
value :LKR, 80
|
93
|
+
value :LRD, 81
|
94
|
+
value :LSL, 82
|
95
|
+
value :LTL, 83
|
96
|
+
value :LVL, 84
|
97
|
+
value :LYD, 85
|
98
|
+
value :MAD, 86
|
99
|
+
value :MDL, 87
|
100
|
+
value :MGA, 88
|
101
|
+
value :MKD, 89
|
102
|
+
value :MMK, 90
|
103
|
+
value :MNT, 91
|
104
|
+
value :MOP, 92
|
105
|
+
value :MRO, 93
|
106
|
+
value :MUR, 94
|
107
|
+
value :MVR, 95
|
108
|
+
value :MWK, 96
|
109
|
+
value :MXN, 97
|
110
|
+
value :MYR, 98
|
111
|
+
value :MZN, 99
|
112
|
+
value :NAD, 100
|
113
|
+
value :NGN, 101
|
114
|
+
value :NIO, 102
|
115
|
+
value :NOK, 103
|
116
|
+
value :NPR, 104
|
117
|
+
value :NZD, 105
|
118
|
+
value :OMR, 106
|
119
|
+
value :PAB, 107
|
120
|
+
value :PEN, 108
|
121
|
+
value :PGK, 109
|
122
|
+
value :PHP, 110
|
123
|
+
value :PKR, 111
|
124
|
+
value :PLN, 112
|
125
|
+
value :PYG, 113
|
126
|
+
value :QAR, 114
|
127
|
+
value :RON, 115
|
128
|
+
value :RSD, 116
|
129
|
+
value :RUB, 117
|
130
|
+
value :RWF, 118
|
131
|
+
value :SAR, 119
|
132
|
+
value :SBD, 120
|
133
|
+
value :SCR, 121
|
134
|
+
value :SDG, 122
|
135
|
+
value :SEK, 123
|
136
|
+
value :SGD, 124
|
137
|
+
value :SHP, 125
|
138
|
+
value :SKK, 126
|
139
|
+
value :SLL, 127
|
140
|
+
value :SOS, 128
|
141
|
+
value :SRD, 129
|
142
|
+
value :SSP, 130
|
143
|
+
value :STD, 131
|
144
|
+
value :SVC, 132
|
145
|
+
value :SYP, 133
|
146
|
+
value :SZL, 134
|
147
|
+
value :THB, 135
|
148
|
+
value :TJS, 136
|
149
|
+
value :TMT, 137
|
150
|
+
value :TND, 138
|
151
|
+
value :TOP, 139
|
152
|
+
value :TRY, 140
|
153
|
+
value :TTD, 141
|
154
|
+
value :TWD, 142
|
155
|
+
value :TZS, 143
|
156
|
+
value :UAH, 144
|
157
|
+
value :UGX, 145
|
158
|
+
value :USD, 146
|
159
|
+
value :UYU, 147
|
160
|
+
value :UZS, 148
|
161
|
+
value :VEF, 149
|
162
|
+
value :VND, 150
|
163
|
+
value :VUV, 151
|
164
|
+
value :WST, 152
|
165
|
+
value :XAF, 153
|
166
|
+
value :XAG, 154
|
167
|
+
value :XAU, 155
|
168
|
+
value :XCD, 156
|
169
|
+
value :XDR, 157
|
170
|
+
value :XOF, 158
|
171
|
+
value :XPF, 159
|
172
|
+
value :YER, 160
|
173
|
+
value :ZAR, 161
|
174
|
+
value :ZMK, 162
|
175
|
+
value :ZMW, 163
|
176
|
+
value :BTC, 164
|
177
|
+
value :JEP, 165
|
178
|
+
value :EEK, 166
|
179
|
+
value :MTL, 167
|
180
|
+
value :TMM, 168
|
181
|
+
value :ZWD, 169
|
182
|
+
value :ZWL, 170
|
183
|
+
value :ZWN, 171
|
184
|
+
value :ZWR, 172
|
185
|
+
end
|
184
186
|
end
|
185
187
|
end
|
186
188
|
|
187
189
|
module Protip
|
188
190
|
module Messages
|
189
|
-
Currency = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Currency").msgclass
|
190
|
-
Currency::CurrencyCode = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Currency.CurrencyCode").enummodule
|
191
|
+
Currency = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Currency").msgclass
|
192
|
+
Currency::CurrencyCode = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Currency.CurrencyCode").enummodule
|
191
193
|
end
|
192
194
|
end
|
@@ -4,19 +4,21 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
7
|
+
add_file("protip/messages/errors.proto", :syntax => :proto3) do
|
8
|
+
add_message "protip.messages.Errors" do
|
9
|
+
repeated :messages, :string, 1
|
10
|
+
repeated :field_errors, :message, 2, "protip.messages.FieldError"
|
11
|
+
end
|
12
|
+
add_message "protip.messages.FieldError" do
|
13
|
+
optional :field, :string, 1
|
14
|
+
optional :message, :string, 2
|
15
|
+
end
|
14
16
|
end
|
15
17
|
end
|
16
18
|
|
17
19
|
module Protip
|
18
20
|
module Messages
|
19
|
-
Errors = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Errors").msgclass
|
20
|
-
FieldError = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.FieldError").msgclass
|
21
|
+
Errors = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Errors").msgclass
|
22
|
+
FieldError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.FieldError").msgclass
|
21
23
|
end
|
22
24
|
end
|
@@ -4,15 +4,18 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'protip/messages/currency_pb'
|
7
|
+
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
-
|
9
|
-
|
10
|
-
|
9
|
+
add_file("protip/messages/money.proto", :syntax => :proto3) do
|
10
|
+
add_message "protip.messages.Money" do
|
11
|
+
optional :amount_cents, :int64, 1
|
12
|
+
optional :currency, :message, 2, "protip.messages.Currency"
|
13
|
+
end
|
11
14
|
end
|
12
15
|
end
|
13
16
|
|
14
17
|
module Protip
|
15
18
|
module Messages
|
16
|
-
Money = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Money").msgclass
|
19
|
+
Money = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Money").msgclass
|
17
20
|
end
|
18
21
|
end
|
@@ -4,14 +4,16 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
add_file("protip/messages/range.proto", :syntax => :proto3) do
|
8
|
+
add_message "protip.messages.Range" do
|
9
|
+
optional :begin, :int64, 1
|
10
|
+
optional :end, :int64, 2
|
11
|
+
end
|
10
12
|
end
|
11
13
|
end
|
12
14
|
|
13
15
|
module Protip
|
14
16
|
module Messages
|
15
|
-
Range = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Range").msgclass
|
17
|
+
Range = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Range").msgclass
|
16
18
|
end
|
17
19
|
end
|
@@ -4,50 +4,53 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'protip/extensions_pb'
|
7
|
+
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
9
|
+
add_file("protip/messages/repeated_wrappers.proto", :syntax => :proto3) do
|
10
|
+
add_message "protip.messages.RepeatedDouble" do
|
11
|
+
repeated :values, :double, 1
|
12
|
+
end
|
13
|
+
add_message "protip.messages.RepeatedFloat" do
|
14
|
+
repeated :values, :float, 1
|
15
|
+
end
|
16
|
+
add_message "protip.messages.RepeatedInt64" do
|
17
|
+
repeated :values, :int64, 1
|
18
|
+
end
|
19
|
+
add_message "protip.messages.RepeatedUInt64" do
|
20
|
+
repeated :values, :uint64, 1
|
21
|
+
end
|
22
|
+
add_message "protip.messages.RepeatedInt32" do
|
23
|
+
repeated :values, :int32, 1
|
24
|
+
end
|
25
|
+
add_message "protip.messages.RepeatedUInt32" do
|
26
|
+
repeated :values, :uint32, 1
|
27
|
+
end
|
28
|
+
add_message "protip.messages.RepeatedBool" do
|
29
|
+
repeated :values, :bool, 1
|
30
|
+
end
|
31
|
+
add_message "protip.messages.RepeatedString" do
|
32
|
+
repeated :values, :string, 1
|
33
|
+
end
|
34
|
+
add_message "protip.messages.RepeatedBytes" do
|
35
|
+
repeated :values, :bytes, 1
|
36
|
+
end
|
37
|
+
add_message "protip.messages.RepeatedEnum" do
|
38
|
+
repeated :values, :int32, 1
|
39
|
+
end
|
37
40
|
end
|
38
41
|
end
|
39
42
|
|
40
43
|
module Protip
|
41
44
|
module Messages
|
42
|
-
RepeatedDouble = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedDouble").msgclass
|
43
|
-
RepeatedFloat = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedFloat").msgclass
|
44
|
-
RepeatedInt64 = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedInt64").msgclass
|
45
|
-
RepeatedUInt64 = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedUInt64").msgclass
|
46
|
-
RepeatedInt32 = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedInt32").msgclass
|
47
|
-
RepeatedUInt32 = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedUInt32").msgclass
|
48
|
-
RepeatedBool = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedBool").msgclass
|
49
|
-
RepeatedString = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedString").msgclass
|
50
|
-
RepeatedBytes = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedBytes").msgclass
|
51
|
-
RepeatedEnum = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedEnum").msgclass
|
45
|
+
RepeatedDouble = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedDouble").msgclass
|
46
|
+
RepeatedFloat = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedFloat").msgclass
|
47
|
+
RepeatedInt64 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedInt64").msgclass
|
48
|
+
RepeatedUInt64 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedUInt64").msgclass
|
49
|
+
RepeatedInt32 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedInt32").msgclass
|
50
|
+
RepeatedUInt32 = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedUInt32").msgclass
|
51
|
+
RepeatedBool = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedBool").msgclass
|
52
|
+
RepeatedString = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedString").msgclass
|
53
|
+
RepeatedBytes = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedBytes").msgclass
|
54
|
+
RepeatedEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.RepeatedEnum").msgclass
|
52
55
|
end
|
53
56
|
end
|
@@ -5,21 +5,24 @@ require 'google/protobuf'
|
|
5
5
|
|
6
6
|
require 'protip/messages/repeated_wrappers_pb'
|
7
7
|
require 'protip/messages/wrappers_pb'
|
8
|
+
|
8
9
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
10
|
+
add_file("protip/messages/test.proto", :syntax => :proto3) do
|
11
|
+
add_message "protip.messages.EnumTest" do
|
12
|
+
optional :enum, :message, 1, "protip.messages.EnumValue"
|
13
|
+
optional :repeated_enums, :message, 2, "protip.messages.RepeatedEnum"
|
14
|
+
end
|
15
|
+
add_enum "protip.messages.EnumTest.Enum" do
|
16
|
+
value :ZERO, 0
|
17
|
+
value :ONE, 1
|
18
|
+
end
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
19
22
|
module Protip
|
20
23
|
module Messages
|
21
|
-
EnumTest = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumTest").msgclass
|
22
|
-
EnumTest::Enum = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumTest.Enum").enummodule
|
24
|
+
EnumTest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumTest").msgclass
|
25
|
+
EnumTest::Enum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumTest.Enum").enummodule
|
23
26
|
end
|
24
27
|
end
|
25
28
|
|
@@ -4,15 +4,17 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
add_file("protip/messages/types.proto", :syntax => :proto3) do
|
8
|
+
add_message "protip.messages.Date" do
|
9
|
+
optional :year, :int64, 1
|
10
|
+
optional :month, :uint32, 2
|
11
|
+
optional :day, :uint32, 3
|
12
|
+
end
|
11
13
|
end
|
12
14
|
end
|
13
15
|
|
14
16
|
module Protip
|
15
17
|
module Messages
|
16
|
-
Date = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Date").msgclass
|
18
|
+
Date = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.Date").msgclass
|
17
19
|
end
|
18
20
|
end
|
@@ -4,14 +4,17 @@
|
|
4
4
|
require 'google/protobuf'
|
5
5
|
|
6
6
|
require 'protip/extensions_pb'
|
7
|
+
|
7
8
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
8
|
-
|
9
|
-
|
9
|
+
add_file("protip/messages/wrappers.proto", :syntax => :proto3) do
|
10
|
+
add_message "protip.messages.EnumValue" do
|
11
|
+
optional :value, :int32, 1
|
12
|
+
end
|
10
13
|
end
|
11
14
|
end
|
12
15
|
|
13
16
|
module Protip
|
14
17
|
module Messages
|
15
|
-
EnumValue = Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumValue").msgclass
|
18
|
+
EnumValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("protip.messages.EnumValue").msgclass
|
16
19
|
end
|
17
20
|
end
|
data/lib/protip/messages_pb.rb
CHANGED
@@ -13,6 +13,9 @@ require 'protip/messages/repeated_wrappers_pb'
|
|
13
13
|
require 'protip/messages/types_pb'
|
14
14
|
require 'protip/messages/wrappers_pb'
|
15
15
|
require 'protip/messages/active_support/time_with_zone_pb'
|
16
|
+
|
16
17
|
Google::Protobuf::DescriptorPool.generated_pool.build do
|
18
|
+
add_file("protip/messages.proto", :syntax => :proto3) do
|
19
|
+
end
|
17
20
|
end
|
18
21
|
|
@@ -3,7 +3,7 @@ require 'bundler/setup'
|
|
3
3
|
|
4
4
|
namespace :protip do
|
5
5
|
desc 'compile a single .proto file to Ruby'
|
6
|
-
task :compile, [:filename, :proto_path, :ruby_path] do |t, args|
|
6
|
+
task :compile, [:filename, :proto_path, :ruby_path, :rbi_path, :protoc_gen_rbi_path] do |t, args|
|
7
7
|
proto_path = [args[:proto_path] || 'definitions'].flatten.compact.reject{|path| path == ''}
|
8
8
|
proto_path << File.join(Gem.loaded_specs['protip'].full_gem_path, 'definitions')
|
9
9
|
|
@@ -11,7 +11,10 @@ namespace :protip do
|
|
11
11
|
|
12
12
|
filename = args[:filename] || raise(ArgumentError.new 'filename argument is required')
|
13
13
|
|
14
|
-
command = "bundle exec grpc_tools_ruby_protoc #{proto_path.map{|p| "--proto_path=#{Shellwords.escape p}"}.join ' '} --ruby_out=#{Shellwords.escape ruby_path}
|
14
|
+
command = "bundle exec grpc_tools_ruby_protoc #{proto_path.map{|p| "--proto_path=#{Shellwords.escape p}"}.join ' '} --ruby_out=#{Shellwords.escape ruby_path}"
|
15
|
+
command << " --plugin=protoc-gen-rbi=#{args[:protoc_gen_rbi_path]}" if args[:protoc_gen_rbi_path]
|
16
|
+
command << " --rbi_out=#{args[:rbi_path]}" if args[:rbi_path]
|
17
|
+
command << " #{Shellwords.escape filename}"
|
15
18
|
puts command
|
16
19
|
system command
|
17
20
|
|
data/lib/protip/version.rb
CHANGED
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.
|
4
|
+
version: '0.37'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- AngelList
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activemodel
|
@@ -19,7 +19,7 @@ dependencies:
|
|
19
19
|
version: 4.2.10
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version: '
|
22
|
+
version: '8.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,7 +29,7 @@ dependencies:
|
|
29
29
|
version: 4.2.10
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '
|
32
|
+
version: '8.0'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: activesupport
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
version: 4.2.10
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '8.0'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -49,7 +49,7 @@ dependencies:
|
|
49
49
|
version: 4.2.10
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '8.0'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: money
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
@@ -90,14 +90,14 @@ dependencies:
|
|
90
90
|
requirements:
|
91
91
|
- - '='
|
92
92
|
- !ruby/object:Gem::Version
|
93
|
-
version: 1.
|
93
|
+
version: 1.48.0
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
98
|
- - '='
|
99
99
|
- !ruby/object:Gem::Version
|
100
|
-
version: 1.
|
100
|
+
version: 1.48.0
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: minitest
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,7 +196,7 @@ dependencies:
|
|
196
196
|
- - "~>"
|
197
197
|
- !ruby/object:Gem::Version
|
198
198
|
version: '3'
|
199
|
-
description:
|
199
|
+
description:
|
200
200
|
email:
|
201
201
|
- team@angel.co
|
202
202
|
executables: []
|
@@ -277,7 +277,7 @@ homepage: https://github.com/AngelList/protip
|
|
277
277
|
licenses:
|
278
278
|
- MIT
|
279
279
|
metadata: {}
|
280
|
-
post_install_message:
|
280
|
+
post_install_message:
|
281
281
|
rdoc_options: []
|
282
282
|
require_paths:
|
283
283
|
- lib
|
@@ -292,8 +292,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
292
292
|
- !ruby/object:Gem::Version
|
293
293
|
version: '0'
|
294
294
|
requirements: []
|
295
|
-
rubygems_version: 3.1.
|
296
|
-
signing_key:
|
295
|
+
rubygems_version: 3.1.6
|
296
|
+
signing_key:
|
297
297
|
specification_version: 4
|
298
298
|
summary: Resources backed by protobuf messages
|
299
299
|
test_files: []
|