ton_sdk_client 1.21.5 → 1.26.0

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
  SHA256:
3
- metadata.gz: 68951575793a97c1bd43193216359e97cff46220c011f849d08ce2b8b8adc269
4
- data.tar.gz: 22be1357cf2604bfaa02fa09818c173f8766383b0cc76086c815946a0cf5deb9
3
+ metadata.gz: 6089c778489c542c5be6b2f08aaa25b658b0de1bc82cea166a36fe6005e6430e
4
+ data.tar.gz: 05511b5132c85588c2f2d9c9c26fc1681fa08ebecbf4445f7d4171ae997e9fc7
5
5
  SHA512:
6
- metadata.gz: 3cb0f85cd65c4baee5cd8949cc915393c561b1a2054d2f3b059c77d25ccb501c87283038deaa949b7a07fdad50c99ebe57c897e09fcd144061b613d14459c833
7
- data.tar.gz: edbd614c0895b29e1acd55d6d53e303958cb86528d80bcfc420b7b99fe2892241cc5263191912d4a68822b26bae92c913404e6d829c85819e87198016b1c956f
6
+ metadata.gz: a5287864732773d988a8a668e6a19a99d8c199bfbf59ddd913924c334771bcaf43b64ed1ed423ceb67270c5dfe1ad2a534cfb5251d2562981b2ff15351e9cc92
7
+ data.tar.gz: d058acfb7188d6e5c96a2b01294d90494138254ebfbf991f9ba97990c1b191cb10a0746a9247302bb610a6b42ce050af5b8e48cc12992c374c9ee30ab1d8b79d
data/CHANGELOG.md CHANGED
@@ -2,6 +2,19 @@
2
2
 
3
3
  all the changes are always according to the ones of the main TON SDK library; and on top on that, there may be additional ones
4
4
 
5
+ 1.26.0
6
+ -----
7
+ * Changes `1.26.0` https://github.com/tonlabs/TON-SDK/blob/master/CHANGELOG.md#1260--2021-11-25
8
+
9
+ 1.25.0
10
+ -----
11
+ * Changes `1.25.0` https://github.com/tonlabs/TON-SDK/blob/master/CHANGELOG.md#1250--2021-11-08
12
+
13
+ 1.24.0
14
+ -----
15
+ * Changes `1.24.0` https://github.com/tonlabs/TON-SDK/blob/master/CHANGELOG.md#1240--2021-10-18
16
+ * **BREAKING CHANGE** All Params now require keyword arguments
17
+
5
18
  1.20.x
6
19
  -----
7
20
  * NetworkConfig and AbiContract have been changed (not mentioned explicitly in Changelog of TON SDK )
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # TON SDK client in Ruby and for Ruby
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/ton_sdk_client.png)](https://badge.fury.io/rb/ton_sdk_client)
4
- [![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.21.5-green)](https://github.com/tonlabs/TON-SDK/tree/1.21.5)
3
+ [![Gem Version](https://badge.fury.io/rb/ton_sdk_client.svg)](https://rubygems.org/gems/ton_sdk_client)
4
+ [![TON SDK version](https://img.shields.io/badge/TON%20SDK%20version-1.26.0-green)](https://github.com/tonlabs/TON-SDK/tree/1.26.0)
5
5
 
6
6
  Ruby gem-client bindings for [TON SDK](https://github.com/tonlabs/TON-SDK) which allows one to communicate with [FreeTON](https://freeton.org) blockchain in Ruby.
7
7
 
@@ -39,15 +39,23 @@ module TonSdk
39
39
  end
40
40
  end
41
41
 
42
- FunctionHeader = Struct.new(:expire, :time, :pubkey, keyword_init: true)
42
+ FunctionHeader = KwStruct.new(:expire, :time, :pubkey)
43
43
 
44
- CallSet = Struct.new(:function_name, :header, :input, keyword_init: true) do
44
+ CallSet = KwStruct.new(:function_name, :header, :input) do
45
45
  def initialize(function_name:, header: nil, input: nil)
46
46
  super
47
47
  end
48
+
49
+ def to_h
50
+ {
51
+ function_name: function_name,
52
+ header: header.to_h,
53
+ input: input
54
+ }
55
+ end
48
56
  end
49
57
 
50
- DeploySet = Struct.new(:tvc, :workchain_id, :initial_data, :initial_pubkey, keyword_init: true) do
58
+ DeploySet = KwStruct.new(:tvc, :workchain_id, :initial_data, :initial_pubkey) do
51
59
  def initialize(tvc:, workchain_id: nil, initial_data: nil, initial_pubkey: nil)
52
60
  super
53
61
  end
@@ -95,19 +103,19 @@ module TonSdk
95
103
  end
96
104
 
97
105
  STATIC_INIT_SOURCE_TYPES = [:message, :state_init, :tvc]
98
- StateInitSource = Struct.new(
99
- :type_,
106
+ # TODO: Refactor with subclasses?
107
+ StateInitSource = KwStruct.new(
108
+ :type,
100
109
  :source,
101
110
  :code,
102
111
  :data,
103
112
  :library,
104
113
  :tvc,
105
114
  :public_key,
106
- :init_params,
107
- keyword_init: true
115
+ :init_params
108
116
  ) do
109
117
  def initialize(
110
- type_:,
118
+ type:,
111
119
  source: nil,
112
120
  code: nil,
113
121
  data: nil,
@@ -116,42 +124,42 @@ module TonSdk
116
124
  public_key: nil,
117
125
  init_params: nil
118
126
  )
119
- unless STATIC_INIT_SOURCE_TYPES.include?(type_)
120
- raise ArgumentError.new("unknown type: #{type_}; known types: #{STATIC_INIT_SOURCE_TYPES}")
127
+ unless STATIC_INIT_SOURCE_TYPES.include?(type)
128
+ raise ArgumentError.new("unknown type: #{type}; known types: #{STATIC_INIT_SOURCE_TYPES}")
121
129
  end
122
130
  super
123
131
  end
124
132
 
125
133
  def to_h
126
134
  h1 = {
127
- type: Helper.sym_to_capitalized_case_str(@type_)
135
+ type: Helper.sym_to_capitalized_case_str(type)
128
136
  }
129
137
 
130
- h2 = case @type_
138
+ h2 = case type
131
139
  when :message
132
140
  {
133
- source: @source.to_h
141
+ source: source.to_h
134
142
  }
135
143
  when :state_init
136
144
  {
137
- code: @code,
138
- data: @data,
139
- library: @library
145
+ code: code,
146
+ data: data,
147
+ library: library
140
148
  }
141
149
  when :tvc
142
150
  {
143
- public_key: @public_key,
144
- init_params: @init_params.to_h
151
+ public_key: public_key,
152
+ init_params: init_params.to_h
145
153
  }
146
154
  else
147
- raise ArgumentError.new("unknown type: #{@type_}; known types: #{STATIC_INIT_SOURCE_TYPES}")
155
+ raise ArgumentError.new("unknown type: #{type}; known types: #{STATIC_INIT_SOURCE_TYPES}")
148
156
  end
149
157
 
150
158
  h1.merge(h2)
151
159
  end
152
160
  end
153
161
 
154
- StateInitParams = Struct.new(:abi, :value, keyword_init: true) do
162
+ StateInitParams = KwStruct.new(:abi, :value) do
155
163
  def initialize(abi:, value:)
156
164
  super
157
165
  end
@@ -159,19 +167,18 @@ module TonSdk
159
167
 
160
168
 
161
169
  MESSAGE_SOURCE_TYPES = [:encoded, :encoding_params]
162
- MessageSource = Struct.new(
163
- :type_,
170
+ MessageSource = KwStruct.new(
171
+ :type,
164
172
  :message,
165
173
  :abi,
166
174
  :address,
167
175
  :deploy_set,
168
176
  :call_set,
169
177
  :signer,
170
- :processing_try_index,
171
- keyword_init: true
178
+ :processing_try_index
172
179
  ) do
173
180
  def initialize(
174
- type_:,
181
+ type:,
175
182
  message: nil,
176
183
  abi: nil,
177
184
  address: nil,
@@ -180,8 +187,8 @@ module TonSdk
180
187
  signer: nil,
181
188
  processing_try_index: 0
182
189
  )
183
- unless MESSAGE_SOURCE_TYPES.include?(type_)
184
- raise ArgumentError.new("unknown type: #{type_}; known types: #{MESSAGE_SOURCE_TYPES}")
190
+ unless MESSAGE_SOURCE_TYPES.include?(type)
191
+ raise ArgumentError.new("unknown type: #{type}; known types: #{MESSAGE_SOURCE_TYPES}")
185
192
  end
186
193
 
187
194
  super
@@ -189,23 +196,23 @@ module TonSdk
189
196
 
190
197
  def to_h
191
198
  h1 = {
192
- type: Helper.sym_to_capitalized_case_str(@type_)
199
+ type: Helper.sym_to_capitalized_case_str(type)
193
200
  }
194
201
 
195
- h2 = case @type_
202
+ h2 = case type
196
203
  when :encoded
197
204
  {
198
- message: @message,
199
- abi: @abi.nil? ? nil : @abi.to_h
205
+ message: message,
206
+ abi: abi&.to_h
200
207
  }
201
208
  when :encoding_params
202
209
  {
203
- abi: @abi.to_h,
204
- address: @address,
205
- deploy_set: @deploy_set.nil? ? nil : @deploy_set.to_h,
206
- call_set: @call_set.nil? ? nil : @call_set.to_h,
207
- signer: @signer.to_h,
208
- processing_try_index: @processing_try_index
210
+ abi: abi.to_h,
211
+ address: address,
212
+ deploy_set: deploy_set&.to_h,
213
+ call_set: call_set&.to_h,
214
+ signer: signer&.to_h,
215
+ processing_try_index: processing_try_index
209
216
  }
210
217
  end
211
218
 
@@ -213,34 +220,50 @@ module TonSdk
213
220
  end
214
221
  end
215
222
 
216
- ParamsOfEncodeMessageBody = Struct.new(:abi, :call_set, :is_internal, :signer, :processing_try_index, keyword_init: true) do
217
- def initialize(abi:, call_set:, is_internal:, signer:, processing_try_index: 0)
218
- super
223
+ ParamsOfEncodeMessageBody = KwStruct.new(
224
+ :abi,
225
+ :call_set,
226
+ :is_internal,
227
+ :signer,
228
+ :processing_try_index
229
+ ) do
230
+ def to_h
231
+ {
232
+ abi: abi.to_h,
233
+ call_set: call_set.to_h,
234
+ is_internal: is_internal,
235
+ signer: signer.to_h,
236
+ processing_try_index: processing_try_index
237
+ }
219
238
  end
220
239
  end
221
240
 
222
- ResultOfEncodeMessageBody = Struct.new(:body, :data_to_sign, keyword_init: true) do
241
+ ResultOfEncodeMessageBody = KwStruct.new(:body, :data_to_sign) do
223
242
  def initialize(body:, data_to_sign: nil)
224
243
  super
225
244
  end
226
245
  end
227
246
 
228
- ParamsOfAttachSignatureToMessageBody = Struct.new(:abi, :public_key, :message, :signature, keyword_init: true) do
229
- def initialize(abi:, public_key:, message:, signature:)
230
- super
247
+ ParamsOfAttachSignatureToMessageBody = KwStruct.new(:abi, :public_key, :message, :signature) do
248
+ def to_h
249
+ {
250
+ abi: abi.to_h,
251
+ public_key: public_key,
252
+ message: message,
253
+ signature: signature
254
+ }
231
255
  end
232
256
  end
233
257
 
234
- ResultOfAttachSignatureToMessageBody = Struct.new(:body)
258
+ ResultOfAttachSignatureToMessageBody = KwStruct.new(:body)
235
259
 
236
- ParamsOfEncodeMessage = Struct.new(
260
+ ParamsOfEncodeMessage = KwStruct.new(
237
261
  :abi,
238
262
  :address,
239
263
  :deploy_set,
240
264
  :call_set,
241
265
  :signer,
242
- :processing_try_index,
243
- keyword_init: true
266
+ :processing_try_index
244
267
  ) do
245
268
  def initialize(
246
269
  abi:,
@@ -252,30 +275,57 @@ module TonSdk
252
275
  )
253
276
  super
254
277
  end
278
+
279
+ def to_h
280
+ {
281
+ abi: abi.to_h,
282
+ address: address,
283
+ deploy_set: deploy_set&.to_h,
284
+ call_set: call_set&.to_h,
285
+ signer: signer.to_h,
286
+ processing_try_index: processing_try_index
287
+ }
288
+ end
255
289
  end
256
290
 
257
- ResultOfEncodeMessage = Struct.new(:message, :data_to_sign, :address, :message_id, keyword_init: true) do
291
+ ResultOfEncodeMessage = KwStruct.new(:message, :data_to_sign, :address, :message_id) do
258
292
  def initialize(message:, data_to_sign: nil, address:, message_id:)
259
293
  super
260
294
  end
261
295
  end
262
296
 
263
- ParamsOfAttachSignature = Struct.new(:abi, :public_key, :message, :signature, keyword_init: true) do
297
+ ParamsOfAttachSignature = KwStruct.new(:abi, :public_key, :message, :signature) do
264
298
  def initialize(abi:, public_key:, message:, signature:)
265
299
  super
266
300
  end
301
+
302
+ def to_h
303
+ {
304
+ abi: abi&.to_h,
305
+ public_key: public_key,
306
+ message: message,
307
+ signature: signature
308
+ }
309
+ end
267
310
  end
268
311
 
269
- ResultOfAttachSignature = Struct.new(:message, :message_id, keyword_init: true) do
312
+ ResultOfAttachSignature = KwStruct.new(:message, :message_id) do
270
313
  def initialize(message:, message_id:)
271
314
  super
272
315
  end
273
316
  end
274
317
 
275
- ParamsOfDecodeMessage = Struct.new(:abi, :message, keyword_init: true) do
318
+ ParamsOfDecodeMessage = KwStruct.new(:abi, :message) do
276
319
  def initialize(abi:, message:)
277
320
  super
278
321
  end
322
+
323
+ def to_h
324
+ {
325
+ abi: abi&.to_h,
326
+ message: message
327
+ }
328
+ end
279
329
  end
280
330
 
281
331
  class DecodedMessageBody
@@ -341,19 +391,39 @@ module TonSdk
341
391
  end
342
392
  end
343
393
 
344
- ParamsOfDecodeMessageBody = Struct.new(:abi, :body, :is_internal, keyword_init: true) do
394
+ ParamsOfDecodeMessageBody = KwStruct.new(:abi, :body, :is_internal) do
345
395
  def initialize(abi:, body:, is_internal:)
346
396
  super
347
397
  end
398
+
399
+ def to_h
400
+ {
401
+ abi: abi&.to_h,
402
+ body: body,
403
+ is_internal: is_internal
404
+ }
405
+ end
348
406
  end
349
407
 
350
- ParamsOfEncodeAccount = Struct.new(:state_init, :balance, :last_trans_lt, :last_paid, keyword_init: true) do
351
- def initialize(state_init:, balance: nil, last_trans_lt: nil, last_paid: nil)
352
- super
408
+ ParamsOfEncodeAccount = KwStruct.new(
409
+ :state_init,
410
+ :balance,
411
+ :last_trans_lt,
412
+ :last_paid,
413
+ :boc_cache
414
+ ) do
415
+ def to_h
416
+ {
417
+ state_init: state_init.to_h,
418
+ balance: balance,
419
+ last_trans_lt: last_trans_lt,
420
+ last_paid: last_paid,
421
+ boc_cache: boc_cache&.to_h
422
+ }
353
423
  end
354
424
  end
355
425
 
356
- ResultOfEncodeAccount = Struct.new(:account, :id_, keyword_init: true) do
426
+ ResultOfEncodeAccount = KwStruct.new(:account, :id_) do
357
427
  def initialize(account:, id_:)
358
428
  super
359
429
  end
@@ -621,7 +691,7 @@ module TonSdk
621
691
  end
622
692
  end
623
693
 
624
- ParamsOfEncodeInternalMessage = Struct.new(
694
+ ParamsOfEncodeInternalMessage = KwStruct.new(
625
695
  :abi,
626
696
  :address,
627
697
  :src_address,
@@ -629,8 +699,7 @@ module TonSdk
629
699
  :call_set,
630
700
  :value,
631
701
  :bounce,
632
- :enable_ihr,
633
- keyword_init: true
702
+ :enable_ihr
634
703
  ) do
635
704
  def initialize(
636
705
  abi: nil,
@@ -646,20 +715,69 @@ module TonSdk
646
715
  end
647
716
  end
648
717
 
649
- ResultOfEncodeInternalMessage = Struct.new(
718
+ ResultOfEncodeInternalMessage = KwStruct.new(
650
719
  :message,
651
720
  :address,
652
- :message_id,
653
- keyword_init: true
721
+ :message_id
654
722
  ) do
655
723
  def initialize(message:, address:, message_id:)
656
724
  super
657
725
  end
658
726
  end
659
727
 
660
- ParamsOfDecodeAccountData = Struct.new(:abi, :data, keyword_init: true)
661
- ResultOfDecodeData = Struct.new(:data)
728
+ ParamsOfDecodeAccountData = KwStruct.new(:abi, :data) do
729
+ def to_h
730
+ {
731
+ abi: abi&.to_h,
732
+ data: data
733
+ }
734
+ end
735
+ end
736
+
737
+ ResultOfDecodeAccountData = KwStruct.new(:data)
738
+
739
+ ParamsOfUpdateInitialData = KwStruct.new(
740
+ :data,
741
+ :abi,
742
+ :initial_data,
743
+ :initial_pubkey,
744
+ :boc_cache
745
+ ) do
746
+ def to_h
747
+ {
748
+ data: data,
749
+ abi: abi&.to_h,
750
+ initial_data: initial_data,
751
+ initial_pubkey: initial_pubkey,
752
+ boc_cache: boc_cache&.to_h
753
+ }
754
+ end
755
+ end
756
+
757
+ ResultOfUpdateInitialData = KwStruct.new(:data)
758
+
759
+ ParamsOfDecodeInitialData = KwStruct.new(:data, :abi) do
760
+ def to_h
761
+ {
762
+ data: data,
763
+ abi: abi&.to_h
764
+ }
765
+ end
766
+ end
767
+
768
+ ResultOfDecodeInitialData = KwStruct.new(:initial_pubkey, :initial_data)
769
+
770
+ ParamsOfDecodeBoc = KwStruct.new(:params, :boc, :allow_partial) do
771
+ def to_h
772
+ {
773
+ params: params&.map(&:to_h),
774
+ boc: boc,
775
+ allow_partial: allow_partial
776
+ }
777
+ end
778
+ end
662
779
 
780
+ ResultOfDecodeBoc = KwStruct.new(:data)
663
781
 
664
782
  #
665
783
  # functions
@@ -668,7 +786,7 @@ module TonSdk
668
786
  def self.encode_message_body(ctx, params)
669
787
  Interop::request_to_native_lib(ctx, "abi.encode_message_body", params) do |resp|
670
788
  if resp.success?
671
- yield NativeLibResponsetResult.new(
789
+ yield NativeLibResponseResult.new(
672
790
  result: ResultOfEncodeMessageBody.new(
673
791
  body: resp.result["body"],
674
792
  data_to_sign: resp.result["data_to_sign"])
@@ -682,8 +800,8 @@ module TonSdk
682
800
  def self.attach_signature_to_message_body(ctx, params)
683
801
  Interop::request_to_native_lib(ctx, "abi.attach_signature_to_message_body", params) do |resp|
684
802
  if resp.success?
685
- yield NativeLibResponsetResult.new(
686
- result: ResultOfAttachSignatureToMessageBody.new(resp.result["body"])
803
+ yield NativeLibResponseResult.new(
804
+ result: ResultOfAttachSignatureToMessageBody.new(body: resp.result["body"])
687
805
  )
688
806
  else
689
807
  yield resp
@@ -694,7 +812,7 @@ module TonSdk
694
812
  def self.encode_message(ctx, params)
695
813
  Interop::request_to_native_lib(ctx, "abi.encode_message", params) do |resp|
696
814
  if resp.success?
697
- yield NativeLibResponsetResult.new(
815
+ yield NativeLibResponseResult.new(
698
816
  result: ResultOfEncodeMessage.new(
699
817
  message: resp.result["message"],
700
818
  data_to_sign: resp.result["data_to_sign"],
@@ -711,7 +829,7 @@ module TonSdk
711
829
  def self.attach_signature(ctx, params)
712
830
  Interop::request_to_native_lib(ctx, "abi.attach_signature", params) do |resp|
713
831
  if resp.success?
714
- yield NativeLibResponsetResult.new(
832
+ yield NativeLibResponseResult.new(
715
833
  result: ResultOfAttachSignature.new(
716
834
  message: resp.result["message"],
717
835
  message_id: resp.result["message_id"])
@@ -725,7 +843,7 @@ module TonSdk
725
843
  def self.decode_message(ctx, params)
726
844
  Interop::request_to_native_lib(ctx, "abi.decode_message", params) do |resp|
727
845
  if resp.success?
728
- yield NativeLibResponsetResult.new(
846
+ yield NativeLibResponseResult.new(
729
847
  result: DecodedMessageBody.from_json(resp.result)
730
848
  )
731
849
  else
@@ -737,7 +855,7 @@ module TonSdk
737
855
  def self.decode_message_body(ctx, params)
738
856
  Interop::request_to_native_lib(ctx, "abi.decode_message_body", params) do |resp|
739
857
  if resp.success?
740
- yield NativeLibResponsetResult.new(
858
+ yield NativeLibResponseResult.new(
741
859
  result: DecodedMessageBody.from_json(resp.result)
742
860
  )
743
861
  else
@@ -749,7 +867,7 @@ module TonSdk
749
867
  def self.encode_account(ctx, params)
750
868
  Interop::request_to_native_lib(ctx, "abi.encode_account", params) do |resp|
751
869
  if resp.success?
752
- yield NativeLibResponsetResult.new(
870
+ yield NativeLibResponseResult.new(
753
871
  result: ResultOfEncodeAccount.new(
754
872
  account: resp.result["account"],
755
873
  id_: resp.result["id"]
@@ -764,7 +882,7 @@ module TonSdk
764
882
  def self.encode_internal_message(ctx, params)
765
883
  Interop::request_to_native_lib(ctx, "abi.encode_internal_message", params) do |resp|
766
884
  if resp.success?
767
- yield NativeLibResponsetResult.new(
885
+ yield NativeLibResponseResult.new(
768
886
  result: ResultOfEncodeInternalMessage.new(
769
887
  message: resp.result["message"],
770
888
  address: resp.result["address"],
@@ -780,9 +898,9 @@ module TonSdk
780
898
  def self.decode_account_data(ctx, params)
781
899
  Interop::request_to_native_lib(ctx, "abi.decode_account_data", params) do |resp|
782
900
  if resp.success?
783
- yield NativeLibResponsetResult.new(
784
- result: ResultOfDecodeData.new(
785
- resp.result["data"]
901
+ yield NativeLibResponseResult.new(
902
+ result: ResultOfDecodeAccountData.new(
903
+ data: resp.result["data"]
786
904
  )
787
905
  )
788
906
  else
@@ -791,7 +909,47 @@ module TonSdk
791
909
  end
792
910
  end
793
911
 
912
+ def self.update_initial_data(ctx, params)
913
+ Interop::request_to_native_lib(ctx, "abi.update_initial_data", params) do |resp|
914
+ if resp.success?
915
+ yield NativeLibResponseResult.new(
916
+ result: ResultOfUpdateInitialData.new(
917
+ data: resp.result["data"]
918
+ )
919
+ )
920
+ else
921
+ yield resp
922
+ end
923
+ end
924
+ end
794
925
 
926
+ def self.decode_initial_data(ctx, params)
927
+ Interop::request_to_native_lib(ctx, "abi.decode_initial_data", params) do |resp|
928
+ if resp.success?
929
+ yield NativeLibResponseResult.new(
930
+ result: ResultOfDecodeInitialData.new(
931
+ initial_pubkey: resp.result["initial_pubkey"],
932
+ initial_data: resp.result["initial_data"]
933
+ )
934
+ )
935
+ else
936
+ yield resp
937
+ end
938
+ end
939
+ end
795
940
 
941
+ def self.decode_boc(ctx, params)
942
+ Interop::request_to_native_lib(ctx, "abi.decode_boc", params) do |resp|
943
+ if resp.success?
944
+ yield NativeLibResponseResult.new(
945
+ result: ResultOfDecodeBoc.new(
946
+ data: resp.result["data"]
947
+ )
948
+ )
949
+ else
950
+ yield resp
951
+ end
952
+ end
953
+ end
796
954
  end
797
- end
955
+ end