venice 0.4.1 → 0.4.2

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: d6d310e673f3323b48b9f7e0e3ed3e2f06d612f7
4
- data.tar.gz: c59a22230d0d7608c20397f32ec3c48de3490f76
3
+ metadata.gz: 42ba6b3e3d9dd51125339038c3b8890719e5f030
4
+ data.tar.gz: 759e8373824b9cf4fde27520e64dd718c551dc75
5
5
  SHA512:
6
- metadata.gz: e34fb948c42df497b17d2dd37bd0be3f252643075f1c62fa11f52ef07d66c33e3c1a142be224b492366d4e5ac70d195a93206c6be5cca5adada54a81d439575e
7
- data.tar.gz: 5d4e4898dca5eb9b40eb7c58fce72e6ec140f24efa3e2e94f93559f954a3345df406392edd7e5fd69ded8249f46e69fc609eeab0da9f9e7cbcf64780788f2fb3
6
+ metadata.gz: e7b77d7cfa4941303172da4585b3209c8aa187f30e1d8f13c3615ddd13e1a9a5ff8506b88de6705f476da6935023a56bc982e084394da24e984326c5b777c03c
7
+ data.tar.gz: 6bffddf73fa4b43388e25f4b85f0f6fefa88b4486780a997895efff6745b0817e4b5e6325abc13a044869cf65d56785fbe6c258f775203cecc3e5710c3c3e570
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  ![Venice](https://raw.github.com/nomad/nomad.github.io/assets/venice-banner.png)
2
2
 
3
+ [![Travis](https://img.shields.io/travis/nomad/venice.svg)](https://travis-ci.org/nomad/venice)
4
+
3
5
  Venice is a simple gem for verifying Apple In-App Purchase receipts, and retrieving the information associated with receipt data.
4
6
 
5
7
  There are two reasons why you should verify in-app purchase receipts on the server: First, it allows you to keep your own records of past purchases, which is useful for up-to-the-minute metrics and historical analysis. Second, server-side verification over SSL is the most reliable way to determine the authenticity of purchasing records.
@@ -14,14 +14,14 @@
14
14
  <img src="./assets/0.10.2/loading.gif" alt="loading"/>
15
15
  </div>
16
16
  <div id="wrapper" style="display:none;">
17
- <div class="timestamp">Generated <abbr class="timeago" title="2017-11-17T22:34:12+01:00">2017-11-17T22:34:12+01:00</abbr></div>
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2017-12-21T16:29:38+01:00">2017-12-21T16:29:38+01:00</abbr></div>
18
18
  <ul class="group_tabs"></ul>
19
19
 
20
20
  <div id="content">
21
21
  <div class="file_list_container" id="AllFiles">
22
22
  <h2>
23
23
  <span class="group_name">All Files</span>
24
- (<span class="covered_percent"><span class="yellow">85.49%</span></span>
24
+ (<span class="covered_percent"><span class="yellow">86.34%</span></span>
25
25
  covered at
26
26
  <span class="covered_strength">
27
27
  <span class="green">
@@ -32,8 +32,8 @@
32
32
  <a name="AllFiles"></a>
33
33
  <div>
34
34
  <b>6</b> files in total.
35
- <b>193</b> relevant lines.
36
- <span class="green"><b>165</b> lines covered</span> and
35
+ <b>205</b> relevant lines.
36
+ <span class="green"><b>177</b> lines covered</span> and
37
37
  <span class="red"><b>28</b> lines missed </span>
38
38
  </div>
39
39
  <table class="file_list">
@@ -62,12 +62,12 @@
62
62
 
63
63
  <tr>
64
64
  <td class="strong"><a href="#d79fadfe1306623a10822709e775b8c021f4fc4e" class="src_link" title="lib/venice/client.rb">lib/venice/client.rb</a></td>
65
- <td class="green strong">91.84 %</td>
66
- <td>86</td>
67
- <td>49</td>
68
- <td>45</td>
69
- <td>4</td>
70
- <td>2.5</td>
65
+ <td class="green strong">91.38 %</td>
66
+ <td>101</td>
67
+ <td>58</td>
68
+ <td>53</td>
69
+ <td>5</td>
70
+ <td>2.7</td>
71
71
  </tr>
72
72
 
73
73
  <tr>
@@ -92,11 +92,11 @@
92
92
 
93
93
  <tr>
94
94
  <td class="strong"><a href="#10dfdb14e321a7bb364075307e5a80a2a62317af" class="src_link" title="lib/venice/receipt.rb">lib/venice/receipt.rb</a></td>
95
- <td class="red strong">72.5 %</td>
96
- <td>160</td>
97
- <td>80</td>
98
- <td>58</td>
99
- <td>22</td>
95
+ <td class="red strong">74.7 %</td>
96
+ <td>168</td>
97
+ <td>83</td>
98
+ <td>62</td>
99
+ <td>21</td>
100
100
  <td>2.3</td>
101
101
  </tr>
102
102
 
@@ -178,11 +178,11 @@
178
178
  <div class="source_table" id="d79fadfe1306623a10822709e775b8c021f4fc4e">
179
179
  <div class="header">
180
180
  <h3>lib/venice/client.rb</h3>
181
- <h4><span class="green">91.84 %</span> covered</h4>
181
+ <h4><span class="green">91.38 %</span> covered</h4>
182
182
  <div>
183
- <b>49</b> relevant lines.
184
- <span class="green"><b>45</b> lines covered</span> and
185
- <span class="red"><b>4</b> lines missed.</span>
183
+ <b>58</b> relevant lines.
184
+ <span class="green"><b>53</b> lines covered</span> and
185
+ <span class="red"><b>5</b> lines missed.</span>
186
186
  </div>
187
187
  </div>
188
188
 
@@ -255,451 +255,541 @@
255
255
  <code class="ruby"> attr_writer :shared_secret</code>
256
256
  </li>
257
257
 
258
- <li class="never" data-hits="" data-linenumber="12">
258
+ <li class="covered" data-hits="1" data-linenumber="12">
259
+ <span class="hits">1</span>
260
+
261
+ <code class="ruby"> attr_writer :exclude_old_transactions</code>
262
+ </li>
263
+
264
+ <li class="never" data-hits="" data-linenumber="13">
259
265
 
260
266
 
261
267
  <code class="ruby"></code>
262
268
  </li>
263
269
 
264
- <li class="covered" data-hits="1" data-linenumber="13">
270
+ <li class="covered" data-hits="1" data-linenumber="14">
265
271
  <span class="hits">1</span>
266
272
 
267
273
  <code class="ruby"> class &lt;&lt; self</code>
268
274
  </li>
269
275
 
270
- <li class="covered" data-hits="1" data-linenumber="14">
276
+ <li class="covered" data-hits="1" data-linenumber="15">
271
277
  <span class="hits">1</span>
272
278
 
273
279
  <code class="ruby"> def development</code>
274
280
  </li>
275
281
 
276
- <li class="missed" data-hits="0" data-linenumber="15">
282
+ <li class="missed" data-hits="0" data-linenumber="16">
277
283
 
278
284
 
279
285
  <code class="ruby"> client = new</code>
280
286
  </li>
281
287
 
282
- <li class="missed" data-hits="0" data-linenumber="16">
288
+ <li class="missed" data-hits="0" data-linenumber="17">
283
289
 
284
290
 
285
291
  <code class="ruby"> client.verification_url = ITUNES_DEVELOPMENT_RECEIPT_VERIFICATION_ENDPOINT</code>
286
292
  </li>
287
293
 
288
- <li class="missed" data-hits="0" data-linenumber="17">
294
+ <li class="missed" data-hits="0" data-linenumber="18">
289
295
 
290
296
 
291
297
  <code class="ruby"> client</code>
292
298
  </li>
293
299
 
294
- <li class="never" data-hits="" data-linenumber="18">
300
+ <li class="never" data-hits="" data-linenumber="19">
295
301
 
296
302
 
297
303
  <code class="ruby"> end</code>
298
304
  </li>
299
305
 
300
- <li class="never" data-hits="" data-linenumber="19">
306
+ <li class="never" data-hits="" data-linenumber="20">
301
307
 
302
308
 
303
309
  <code class="ruby"></code>
304
310
  </li>
305
311
 
306
- <li class="covered" data-hits="1" data-linenumber="20">
312
+ <li class="covered" data-hits="1" data-linenumber="21">
307
313
  <span class="hits">1</span>
308
314
 
309
315
  <code class="ruby"> def production</code>
310
316
  </li>
311
317
 
312
- <li class="covered" data-hits="1" data-linenumber="21">
318
+ <li class="covered" data-hits="1" data-linenumber="22">
313
319
  <span class="hits">1</span>
314
320
 
315
321
  <code class="ruby"> client = new</code>
316
322
  </li>
317
323
 
318
- <li class="covered" data-hits="1" data-linenumber="22">
324
+ <li class="covered" data-hits="1" data-linenumber="23">
319
325
  <span class="hits">1</span>
320
326
 
321
327
  <code class="ruby"> client.verification_url = ITUNES_PRODUCTION_RECEIPT_VERIFICATION_ENDPOINT</code>
322
328
  </li>
323
329
 
324
- <li class="covered" data-hits="1" data-linenumber="23">
330
+ <li class="covered" data-hits="1" data-linenumber="24">
325
331
  <span class="hits">1</span>
326
332
 
327
333
  <code class="ruby"> client</code>
328
334
  </li>
329
335
 
330
- <li class="never" data-hits="" data-linenumber="24">
336
+ <li class="never" data-hits="" data-linenumber="25">
331
337
 
332
338
 
333
339
  <code class="ruby"> end</code>
334
340
  </li>
335
341
 
336
- <li class="never" data-hits="" data-linenumber="25">
342
+ <li class="never" data-hits="" data-linenumber="26">
337
343
 
338
344
 
339
345
  <code class="ruby"> end</code>
340
346
  </li>
341
347
 
342
- <li class="never" data-hits="" data-linenumber="26">
348
+ <li class="never" data-hits="" data-linenumber="27">
343
349
 
344
350
 
345
351
  <code class="ruby"></code>
346
352
  </li>
347
353
 
348
- <li class="covered" data-hits="1" data-linenumber="27">
354
+ <li class="covered" data-hits="1" data-linenumber="28">
349
355
  <span class="hits">1</span>
350
356
 
351
357
  <code class="ruby"> def initialize</code>
352
358
  </li>
353
359
 
354
- <li class="covered" data-hits="6" data-linenumber="28">
355
- <span class="hits">6</span>
360
+ <li class="covered" data-hits="8" data-linenumber="29">
361
+ <span class="hits">8</span>
356
362
 
357
363
  <code class="ruby"> @verification_url = ENV[&#39;IAP_VERIFICATION_ENDPOINT&#39;]</code>
358
364
  </li>
359
365
 
360
- <li class="never" data-hits="" data-linenumber="29">
366
+ <li class="never" data-hits="" data-linenumber="30">
361
367
 
362
368
 
363
369
  <code class="ruby"> end</code>
364
370
  </li>
365
371
 
366
- <li class="never" data-hits="" data-linenumber="30">
372
+ <li class="never" data-hits="" data-linenumber="31">
367
373
 
368
374
 
369
375
  <code class="ruby"></code>
370
376
  </li>
371
377
 
372
- <li class="covered" data-hits="1" data-linenumber="31">
378
+ <li class="covered" data-hits="1" data-linenumber="32">
373
379
  <span class="hits">1</span>
374
380
 
375
381
  <code class="ruby"> def verify!(data, options = {})</code>
376
382
  </li>
377
383
 
378
- <li class="covered" data-hits="6" data-linenumber="32">
379
- <span class="hits">6</span>
384
+ <li class="covered" data-hits="8" data-linenumber="33">
385
+ <span class="hits">8</span>
380
386
 
381
387
  <code class="ruby"> @verification_url ||= ITUNES_DEVELOPMENT_RECEIPT_VERIFICATION_ENDPOINT</code>
382
388
  </li>
383
389
 
384
- <li class="covered" data-hits="6" data-linenumber="33">
385
- <span class="hits">6</span>
390
+ <li class="covered" data-hits="8" data-linenumber="34">
391
+ <span class="hits">8</span>
386
392
 
387
393
  <code class="ruby"> @shared_secret = options[:shared_secret] if options[:shared_secret]</code>
388
394
  </li>
389
395
 
390
- <li class="never" data-hits="" data-linenumber="34">
391
-
396
+ <li class="covered" data-hits="8" data-linenumber="35">
397
+ <span class="hits">8</span>
392
398
 
393
- <code class="ruby"></code>
399
+ <code class="ruby"> @exclude_old_transactions = options[:exclude_old_transactions] if options[:exclude_old_transactions]</code>
394
400
  </li>
395
401
 
396
- <li class="covered" data-hits="6" data-linenumber="35">
397
- <span class="hits">6</span>
402
+ <li class="never" data-hits="" data-linenumber="36">
398
403
 
399
- <code class="ruby"> json = json_response_from_verifying_data(data)</code>
404
+
405
+ <code class="ruby"></code>
400
406
  </li>
401
407
 
402
- <li class="covered" data-hits="6" data-linenumber="36">
403
- <span class="hits">6</span>
408
+ <li class="covered" data-hits="8" data-linenumber="37">
409
+ <span class="hits">8</span>
404
410
 
405
- <code class="ruby"> status = json[&#39;status&#39;].to_i</code>
411
+ <code class="ruby"> json = json_response_from_verifying_data(data, options)</code>
406
412
  </li>
407
413
 
408
- <li class="covered" data-hits="6" data-linenumber="37">
409
- <span class="hits">6</span>
414
+ <li class="covered" data-hits="8" data-linenumber="38">
415
+ <span class="hits">8</span>
410
416
 
411
- <code class="ruby"> receipt_attributes = json[&#39;receipt&#39;].dup</code>
417
+ <code class="ruby"> receipt_attributes = json[&#39;receipt&#39;].dup if json[&#39;receipt&#39;]</code>
412
418
  </li>
413
419
 
414
- <li class="covered" data-hits="6" data-linenumber="38">
415
- <span class="hits">6</span>
420
+ <li class="covered" data-hits="8" data-linenumber="39">
421
+ <span class="hits">8</span>
416
422
 
417
423
  <code class="ruby"> receipt_attributes[&#39;original_json_response&#39;] = json if receipt_attributes</code>
418
424
  </li>
419
425
 
420
- <li class="never" data-hits="" data-linenumber="39">
426
+ <li class="never" data-hits="" data-linenumber="40">
421
427
 
422
428
 
423
429
  <code class="ruby"></code>
424
430
  </li>
425
431
 
426
- <li class="covered" data-hits="6" data-linenumber="40">
427
- <span class="hits">6</span>
432
+ <li class="covered" data-hits="8" data-linenumber="41">
433
+ <span class="hits">8</span>
428
434
 
429
- <code class="ruby"> case status</code>
435
+ <code class="ruby"> case json[&#39;status&#39;].to_i</code>
430
436
  </li>
431
437
 
432
- <li class="never" data-hits="" data-linenumber="41">
438
+ <li class="never" data-hits="" data-linenumber="42">
433
439
 
434
440
 
435
441
  <code class="ruby"> when 0, 21006</code>
436
442
  </li>
437
443
 
438
- <li class="covered" data-hits="6" data-linenumber="42">
444
+ <li class="covered" data-hits="6" data-linenumber="43">
439
445
  <span class="hits">6</span>
440
446
 
441
447
  <code class="ruby"> receipt = Receipt.new(receipt_attributes)</code>
442
448
  </li>
443
449
 
444
- <li class="never" data-hits="" data-linenumber="43">
450
+ <li class="never" data-hits="" data-linenumber="44">
445
451
 
446
452
 
447
453
  <code class="ruby"></code>
448
454
  </li>
449
455
 
450
- <li class="never" data-hits="" data-linenumber="44">
456
+ <li class="never" data-hits="" data-linenumber="45">
451
457
 
452
458
 
453
459
  <code class="ruby"> # From Apple docs:</code>
454
460
  </li>
455
461
 
456
- <li class="never" data-hits="" data-linenumber="45">
462
+ <li class="never" data-hits="" data-linenumber="46">
457
463
 
458
464
 
459
465
  <code class="ruby"> # &gt; Only returned for iOS 6 style transaction receipts for auto-renewable subscriptions.</code>
460
466
  </li>
461
467
 
462
- <li class="never" data-hits="" data-linenumber="46">
468
+ <li class="never" data-hits="" data-linenumber="47">
463
469
 
464
470
 
465
471
  <code class="ruby"> # &gt; The JSON representation of the receipt for the most recent renewal</code>
466
472
  </li>
467
473
 
468
- <li class="covered" data-hits="6" data-linenumber="47">
474
+ <li class="covered" data-hits="6" data-linenumber="48">
469
475
  <span class="hits">6</span>
470
476
 
471
477
  <code class="ruby"> if latest_receipt_info_attributes = json[&#39;latest_receipt_info&#39;]</code>
472
478
  </li>
473
479
 
474
- <li class="never" data-hits="" data-linenumber="48">
480
+ <li class="never" data-hits="" data-linenumber="49">
475
481
 
476
482
 
477
483
  <code class="ruby"> # AppStore returns &#39;latest_receipt_info&#39; even if we use over iOS 6. Besides, its format is an Array.</code>
478
484
  </li>
479
485
 
480
- <li class="covered" data-hits="1" data-linenumber="49">
486
+ <li class="covered" data-hits="1" data-linenumber="50">
481
487
  <span class="hits">1</span>
482
488
 
483
489
  <code class="ruby"> receipt.latest_receipt_info = []</code>
484
490
  </li>
485
491
 
486
- <li class="covered" data-hits="1" data-linenumber="50">
492
+ <li class="covered" data-hits="1" data-linenumber="51">
487
493
  <span class="hits">1</span>
488
494
 
489
495
  <code class="ruby"> latest_receipt_info_attributes.each do |latest_receipt_info_attribute|</code>
490
496
  </li>
491
497
 
492
- <li class="never" data-hits="" data-linenumber="51">
498
+ <li class="never" data-hits="" data-linenumber="52">
493
499
 
494
500
 
495
501
  <code class="ruby"> # latest_receipt_info format is identical with in_app</code>
496
502
  </li>
497
503
 
498
- <li class="covered" data-hits="1" data-linenumber="52">
504
+ <li class="covered" data-hits="1" data-linenumber="53">
499
505
  <span class="hits">1</span>
500
506
 
501
507
  <code class="ruby"> receipt.latest_receipt_info &lt;&lt; InAppReceipt.new(latest_receipt_info_attribute)</code>
502
508
  </li>
503
509
 
504
- <li class="never" data-hits="" data-linenumber="53">
510
+ <li class="never" data-hits="" data-linenumber="54">
505
511
 
506
512
 
507
513
  <code class="ruby"> end</code>
508
514
  </li>
509
515
 
510
- <li class="never" data-hits="" data-linenumber="54">
516
+ <li class="never" data-hits="" data-linenumber="55">
511
517
 
512
518
 
513
519
  <code class="ruby"> end</code>
514
520
  </li>
515
521
 
516
- <li class="never" data-hits="" data-linenumber="55">
522
+ <li class="never" data-hits="" data-linenumber="56">
517
523
 
518
524
 
519
525
  <code class="ruby"></code>
520
526
  </li>
521
527
 
522
- <li class="covered" data-hits="6" data-linenumber="56">
528
+ <li class="covered" data-hits="6" data-linenumber="57">
523
529
  <span class="hits">6</span>
524
530
 
525
531
  <code class="ruby"> return receipt</code>
526
532
  </li>
527
533
 
528
- <li class="never" data-hits="" data-linenumber="57">
534
+ <li class="never" data-hits="" data-linenumber="58">
529
535
 
530
536
 
531
537
  <code class="ruby"> else</code>
532
538
  </li>
533
539
 
534
- <li class="missed" data-hits="0" data-linenumber="58">
535
-
540
+ <li class="covered" data-hits="2" data-linenumber="59">
541
+ <span class="hits">2</span>
536
542
 
537
- <code class="ruby"> raise Receipt::VerificationError.new(status, receipt)</code>
543
+ <code class="ruby"> raise Receipt::VerificationError, json</code>
538
544
  </li>
539
545
 
540
- <li class="never" data-hits="" data-linenumber="59">
546
+ <li class="never" data-hits="" data-linenumber="60">
541
547
 
542
548
 
543
549
  <code class="ruby"> end</code>
544
550
  </li>
545
551
 
546
- <li class="never" data-hits="" data-linenumber="60">
552
+ <li class="never" data-hits="" data-linenumber="61">
547
553
 
548
554
 
549
555
  <code class="ruby"> end</code>
550
556
  </li>
551
557
 
552
- <li class="never" data-hits="" data-linenumber="61">
558
+ <li class="never" data-hits="" data-linenumber="62">
553
559
 
554
560
 
555
561
  <code class="ruby"></code>
556
562
  </li>
557
563
 
558
- <li class="covered" data-hits="1" data-linenumber="62">
564
+ <li class="covered" data-hits="1" data-linenumber="63">
559
565
  <span class="hits">1</span>
560
566
 
561
567
  <code class="ruby"> private</code>
562
568
  </li>
563
569
 
564
- <li class="never" data-hits="" data-linenumber="63">
570
+ <li class="never" data-hits="" data-linenumber="64">
565
571
 
566
572
 
567
573
  <code class="ruby"></code>
568
574
  </li>
569
575
 
570
- <li class="covered" data-hits="1" data-linenumber="64">
576
+ <li class="covered" data-hits="1" data-linenumber="65">
571
577
  <span class="hits">1</span>
572
578
 
573
- <code class="ruby"> def json_response_from_verifying_data(data)</code>
579
+ <code class="ruby"> def json_response_from_verifying_data(data, options = {})</code>
574
580
  </li>
575
581
 
576
- <li class="covered" data-hits="3" data-linenumber="65">
582
+ <li class="covered" data-hits="3" data-linenumber="66">
577
583
  <span class="hits">3</span>
578
584
 
579
585
  <code class="ruby"> parameters = {</code>
580
586
  </li>
581
587
 
582
- <li class="never" data-hits="" data-linenumber="66">
588
+ <li class="never" data-hits="" data-linenumber="67">
583
589
 
584
590
 
585
591
  <code class="ruby"> &#39;receipt-data&#39; =&gt; data</code>
586
592
  </li>
587
593
 
588
- <li class="never" data-hits="" data-linenumber="67">
594
+ <li class="never" data-hits="" data-linenumber="68">
589
595
 
590
596
 
591
597
  <code class="ruby"> }</code>
592
598
  </li>
593
599
 
594
- <li class="never" data-hits="" data-linenumber="68">
600
+ <li class="never" data-hits="" data-linenumber="69">
595
601
 
596
602
 
597
603
  <code class="ruby"></code>
598
604
  </li>
599
605
 
600
- <li class="covered" data-hits="3" data-linenumber="69">
606
+ <li class="covered" data-hits="3" data-linenumber="70">
601
607
  <span class="hits">3</span>
602
608
 
603
609
  <code class="ruby"> parameters[&#39;password&#39;] = @shared_secret if @shared_secret</code>
604
610
  </li>
605
611
 
606
- <li class="never" data-hits="" data-linenumber="70">
612
+ <li class="covered" data-hits="3" data-linenumber="71">
613
+ <span class="hits">3</span>
614
+
615
+ <code class="ruby"> parameters[&#39;exclude-old-transactions&#39;] = @exclude_old_transactions if @exclude_old_transactions</code>
616
+ </li>
617
+
618
+ <li class="never" data-hits="" data-linenumber="72">
607
619
 
608
620
 
609
621
  <code class="ruby"></code>
610
622
  </li>
611
623
 
612
- <li class="covered" data-hits="3" data-linenumber="71">
624
+ <li class="covered" data-hits="3" data-linenumber="73">
613
625
  <span class="hits">3</span>
614
626
 
615
627
  <code class="ruby"> uri = URI(@verification_url)</code>
616
628
  </li>
617
629
 
618
- <li class="covered" data-hits="3" data-linenumber="72">
630
+ <li class="covered" data-hits="3" data-linenumber="74">
619
631
  <span class="hits">3</span>
620
632
 
621
633
  <code class="ruby"> http = Net::HTTP.new(uri.host, uri.port)</code>
622
634
  </li>
623
635
 
624
- <li class="covered" data-hits="3" data-linenumber="73">
636
+ <li class="covered" data-hits="3" data-linenumber="75">
625
637
  <span class="hits">3</span>
626
638
 
627
639
  <code class="ruby"> http.use_ssl = true</code>
628
640
  </li>
629
641
 
630
- <li class="covered" data-hits="3" data-linenumber="74">
642
+ <li class="covered" data-hits="3" data-linenumber="76">
631
643
  <span class="hits">3</span>
632
644
 
633
645
  <code class="ruby"> http.verify_mode = OpenSSL::SSL::VERIFY_PEER</code>
634
646
  </li>
635
647
 
636
- <li class="never" data-hits="" data-linenumber="75">
648
+ <li class="never" data-hits="" data-linenumber="77">
637
649
 
638
650
 
639
651
  <code class="ruby"></code>
640
652
  </li>
641
653
 
642
- <li class="covered" data-hits="3" data-linenumber="76">
654
+ <li class="covered" data-hits="3" data-linenumber="78">
655
+ <span class="hits">3</span>
656
+
657
+ <code class="ruby"> http.open_timeout = options[:open_timeout] if options[:open_timeout]</code>
658
+ </li>
659
+
660
+ <li class="covered" data-hits="3" data-linenumber="79">
661
+ <span class="hits">3</span>
662
+
663
+ <code class="ruby"> http.read_timeout = options[:read_timeout] if options[:read_timeout]</code>
664
+ </li>
665
+
666
+ <li class="never" data-hits="" data-linenumber="80">
667
+
668
+
669
+ <code class="ruby"></code>
670
+ </li>
671
+
672
+ <li class="covered" data-hits="3" data-linenumber="81">
643
673
  <span class="hits">3</span>
644
674
 
645
675
  <code class="ruby"> request = Net::HTTP::Post.new(uri.request_uri)</code>
646
676
  </li>
647
677
 
648
- <li class="covered" data-hits="3" data-linenumber="77">
678
+ <li class="covered" data-hits="3" data-linenumber="82">
649
679
  <span class="hits">3</span>
650
680
 
651
681
  <code class="ruby"> request[&#39;Accept&#39;] = &#39;application/json&#39;</code>
652
682
  </li>
653
683
 
654
- <li class="covered" data-hits="3" data-linenumber="78">
684
+ <li class="covered" data-hits="3" data-linenumber="83">
655
685
  <span class="hits">3</span>
656
686
 
657
687
  <code class="ruby"> request[&#39;Content-Type&#39;] = &#39;application/json&#39;</code>
658
688
  </li>
659
689
 
660
- <li class="covered" data-hits="3" data-linenumber="79">
690
+ <li class="covered" data-hits="3" data-linenumber="84">
661
691
  <span class="hits">3</span>
662
692
 
663
693
  <code class="ruby"> request.body = parameters.to_json</code>
664
694
  </li>
665
695
 
666
- <li class="never" data-hits="" data-linenumber="80">
696
+ <li class="never" data-hits="" data-linenumber="85">
667
697
 
668
698
 
669
699
  <code class="ruby"></code>
670
700
  </li>
671
701
 
672
- <li class="covered" data-hits="3" data-linenumber="81">
702
+ <li class="covered" data-hits="3" data-linenumber="86">
673
703
  <span class="hits">3</span>
674
704
 
675
- <code class="ruby"> response = http.request(request)</code>
705
+ <code class="ruby"> begin</code>
676
706
  </li>
677
707
 
678
- <li class="never" data-hits="" data-linenumber="82">
708
+ <li class="covered" data-hits="3" data-linenumber="87">
709
+ <span class="hits">3</span>
710
+
711
+ <code class="ruby"> response = http.request(request)</code>
712
+ </li>
713
+
714
+ <li class="never" data-hits="" data-linenumber="88">
715
+
716
+
717
+ <code class="ruby"> rescue Timeout::Error</code>
718
+ </li>
719
+
720
+ <li class="missed" data-hits="0" data-linenumber="89">
721
+
722
+
723
+ <code class="ruby"> raise TimeoutError</code>
724
+ </li>
725
+
726
+ <li class="never" data-hits="" data-linenumber="90">
727
+
728
+
729
+ <code class="ruby"> end</code>
730
+ </li>
731
+
732
+ <li class="never" data-hits="" data-linenumber="91">
679
733
 
680
734
 
681
735
  <code class="ruby"></code>
682
736
  </li>
683
737
 
684
- <li class="covered" data-hits="3" data-linenumber="83">
738
+ <li class="covered" data-hits="3" data-linenumber="92">
685
739
  <span class="hits">3</span>
686
740
 
687
741
  <code class="ruby"> JSON.parse(response.body)</code>
688
742
  </li>
689
743
 
690
- <li class="never" data-hits="" data-linenumber="84">
744
+ <li class="never" data-hits="" data-linenumber="93">
691
745
 
692
746
 
693
747
  <code class="ruby"> end</code>
694
748
  </li>
695
749
 
696
- <li class="never" data-hits="" data-linenumber="85">
750
+ <li class="never" data-hits="" data-linenumber="94">
697
751
 
698
752
 
699
753
  <code class="ruby"> end</code>
700
754
  </li>
701
755
 
702
- <li class="never" data-hits="" data-linenumber="86">
756
+ <li class="never" data-hits="" data-linenumber="95">
757
+
758
+
759
+ <code class="ruby"></code>
760
+ </li>
761
+
762
+ <li class="covered" data-hits="1" data-linenumber="96">
763
+ <span class="hits">1</span>
764
+
765
+ <code class="ruby"> class Client::TimeoutError &lt; Timeout::Error</code>
766
+ </li>
767
+
768
+ <li class="covered" data-hits="1" data-linenumber="97">
769
+ <span class="hits">1</span>
770
+
771
+ <code class="ruby"> def message</code>
772
+ </li>
773
+
774
+ <li class="missed" data-hits="0" data-linenumber="98">
775
+
776
+
777
+ <code class="ruby"> &#39;The App Store timed out.&#39;</code>
778
+ </li>
779
+
780
+ <li class="never" data-hits="" data-linenumber="99">
781
+
782
+
783
+ <code class="ruby"> end</code>
784
+ </li>
785
+
786
+ <li class="never" data-hits="" data-linenumber="100">
787
+
788
+
789
+ <code class="ruby"> end</code>
790
+ </li>
791
+
792
+ <li class="never" data-hits="" data-linenumber="101">
703
793
 
704
794
 
705
795
  <code class="ruby">end</code>
@@ -1669,11 +1759,11 @@
1669
1759
  <div class="source_table" id="10dfdb14e321a7bb364075307e5a80a2a62317af">
1670
1760
  <div class="header">
1671
1761
  <h3>lib/venice/receipt.rb</h3>
1672
- <h4><span class="red">72.5 %</span> covered</h4>
1762
+ <h4><span class="red">74.7 %</span> covered</h4>
1673
1763
  <div>
1674
- <b>80</b> relevant lines.
1675
- <span class="green"><b>58</b> lines covered</span> and
1676
- <span class="red"><b>22</b> lines missed.</span>
1764
+ <b>83</b> relevant lines.
1765
+ <span class="green"><b>62</b> lines covered</span> and
1766
+ <span class="red"><b>21</b> lines missed.</span>
1677
1767
  </div>
1678
1768
  </div>
1679
1769
 
@@ -2259,382 +2349,430 @@
2259
2349
  <li class="covered" data-hits="1" data-linenumber="97">
2260
2350
  <span class="hits">1</span>
2261
2351
 
2262
- <code class="ruby"> verify!(data, options) rescue false</code>
2352
+ <code class="ruby"> verify!(data, options)</code>
2263
2353
  </li>
2264
2354
 
2265
2355
  <li class="never" data-hits="" data-linenumber="98">
2266
2356
 
2267
2357
 
2358
+ <code class="ruby"> rescue VerificationError, Client::TimeoutError</code>
2359
+ </li>
2360
+
2361
+ <li class="missed" data-hits="0" data-linenumber="99">
2362
+
2363
+
2364
+ <code class="ruby"> false</code>
2365
+ </li>
2366
+
2367
+ <li class="never" data-hits="" data-linenumber="100">
2368
+
2369
+
2268
2370
  <code class="ruby"> end</code>
2269
2371
  </li>
2270
2372
 
2271
- <li class="never" data-hits="" data-linenumber="99">
2373
+ <li class="never" data-hits="" data-linenumber="101">
2272
2374
 
2273
2375
 
2274
2376
  <code class="ruby"></code>
2275
2377
  </li>
2276
2378
 
2277
- <li class="covered" data-hits="1" data-linenumber="100">
2379
+ <li class="covered" data-hits="1" data-linenumber="102">
2278
2380
  <span class="hits">1</span>
2279
2381
 
2280
2382
  <code class="ruby"> def verify!(data, options = {})</code>
2281
2383
  </li>
2282
2384
 
2283
- <li class="covered" data-hits="1" data-linenumber="101">
2385
+ <li class="covered" data-hits="1" data-linenumber="103">
2284
2386
  <span class="hits">1</span>
2285
2387
 
2286
2388
  <code class="ruby"> client = Client.production</code>
2287
2389
  </li>
2288
2390
 
2289
- <li class="never" data-hits="" data-linenumber="102">
2391
+ <li class="never" data-hits="" data-linenumber="104">
2290
2392
 
2291
2393
 
2292
2394
  <code class="ruby"></code>
2293
2395
  </li>
2294
2396
 
2295
- <li class="covered" data-hits="1" data-linenumber="103">
2397
+ <li class="covered" data-hits="1" data-linenumber="105">
2296
2398
  <span class="hits">1</span>
2297
2399
 
2298
2400
  <code class="ruby"> begin</code>
2299
2401
  </li>
2300
2402
 
2301
- <li class="covered" data-hits="1" data-linenumber="104">
2403
+ <li class="covered" data-hits="1" data-linenumber="106">
2302
2404
  <span class="hits">1</span>
2303
2405
 
2304
2406
  <code class="ruby"> client.verify!(data, options)</code>
2305
2407
  </li>
2306
2408
 
2307
- <li class="missed" data-hits="0" data-linenumber="105">
2409
+ <li class="missed" data-hits="0" data-linenumber="107">
2308
2410
 
2309
2411
 
2310
2412
  <code class="ruby"> rescue VerificationError =&gt; error</code>
2311
2413
  </li>
2312
2414
 
2313
- <li class="missed" data-hits="0" data-linenumber="106">
2415
+ <li class="missed" data-hits="0" data-linenumber="108">
2314
2416
 
2315
2417
 
2316
2418
  <code class="ruby"> case error.code</code>
2317
2419
  </li>
2318
2420
 
2319
- <li class="never" data-hits="" data-linenumber="107">
2421
+ <li class="never" data-hits="" data-linenumber="109">
2320
2422
 
2321
2423
 
2322
2424
  <code class="ruby"> when 21007</code>
2323
2425
  </li>
2324
2426
 
2325
- <li class="missed" data-hits="0" data-linenumber="108">
2427
+ <li class="missed" data-hits="0" data-linenumber="110">
2326
2428
 
2327
2429
 
2328
2430
  <code class="ruby"> client = Client.development</code>
2329
2431
  </li>
2330
2432
 
2331
- <li class="missed" data-hits="0" data-linenumber="109">
2433
+ <li class="missed" data-hits="0" data-linenumber="111">
2332
2434
 
2333
2435
 
2334
2436
  <code class="ruby"> retry</code>
2335
2437
  </li>
2336
2438
 
2337
- <li class="never" data-hits="" data-linenumber="110">
2439
+ <li class="never" data-hits="" data-linenumber="112">
2338
2440
 
2339
2441
 
2340
2442
  <code class="ruby"> when 21008</code>
2341
2443
  </li>
2342
2444
 
2343
- <li class="missed" data-hits="0" data-linenumber="111">
2445
+ <li class="missed" data-hits="0" data-linenumber="113">
2344
2446
 
2345
2447
 
2346
2448
  <code class="ruby"> client = Client.production</code>
2347
2449
  </li>
2348
2450
 
2349
- <li class="missed" data-hits="0" data-linenumber="112">
2451
+ <li class="missed" data-hits="0" data-linenumber="114">
2350
2452
 
2351
2453
 
2352
2454
  <code class="ruby"> retry</code>
2353
2455
  </li>
2354
2456
 
2355
- <li class="never" data-hits="" data-linenumber="113">
2457
+ <li class="never" data-hits="" data-linenumber="115">
2356
2458
 
2357
2459
 
2358
2460
  <code class="ruby"> else</code>
2359
2461
  </li>
2360
2462
 
2361
- <li class="missed" data-hits="0" data-linenumber="114">
2463
+ <li class="missed" data-hits="0" data-linenumber="116">
2362
2464
 
2363
2465
 
2364
2466
  <code class="ruby"> raise error</code>
2365
2467
  </li>
2366
2468
 
2367
- <li class="never" data-hits="" data-linenumber="115">
2469
+ <li class="never" data-hits="" data-linenumber="117">
2368
2470
 
2369
2471
 
2370
2472
  <code class="ruby"> end</code>
2371
2473
  </li>
2372
2474
 
2373
- <li class="never" data-hits="" data-linenumber="116">
2475
+ <li class="never" data-hits="" data-linenumber="118">
2374
2476
 
2375
2477
 
2376
2478
  <code class="ruby"> end</code>
2377
2479
  </li>
2378
2480
 
2379
- <li class="never" data-hits="" data-linenumber="117">
2481
+ <li class="never" data-hits="" data-linenumber="119">
2380
2482
 
2381
2483
 
2382
2484
  <code class="ruby"> end</code>
2383
2485
  </li>
2384
2486
 
2385
- <li class="never" data-hits="" data-linenumber="118">
2487
+ <li class="never" data-hits="" data-linenumber="120">
2386
2488
 
2387
2489
 
2388
2490
  <code class="ruby"></code>
2389
2491
  </li>
2390
2492
 
2391
- <li class="covered" data-hits="1" data-linenumber="119">
2493
+ <li class="covered" data-hits="1" data-linenumber="121">
2392
2494
  <span class="hits">1</span>
2393
2495
 
2394
2496
  <code class="ruby"> alias :validate :verify</code>
2395
2497
  </li>
2396
2498
 
2397
- <li class="covered" data-hits="1" data-linenumber="120">
2499
+ <li class="covered" data-hits="1" data-linenumber="122">
2398
2500
  <span class="hits">1</span>
2399
2501
 
2400
2502
  <code class="ruby"> alias :validate! :verify!</code>
2401
2503
  </li>
2402
2504
 
2403
- <li class="never" data-hits="" data-linenumber="121">
2505
+ <li class="never" data-hits="" data-linenumber="123">
2404
2506
 
2405
2507
 
2406
2508
  <code class="ruby"> end</code>
2407
2509
  </li>
2408
2510
 
2409
- <li class="never" data-hits="" data-linenumber="122">
2511
+ <li class="never" data-hits="" data-linenumber="124">
2410
2512
 
2411
2513
 
2412
2514
  <code class="ruby"></code>
2413
2515
  </li>
2414
2516
 
2415
- <li class="covered" data-hits="1" data-linenumber="123">
2517
+ <li class="covered" data-hits="1" data-linenumber="125">
2416
2518
  <span class="hits">1</span>
2417
2519
 
2418
2520
  <code class="ruby"> class VerificationError &lt; StandardError</code>
2419
2521
  </li>
2420
2522
 
2421
- <li class="covered" data-hits="1" data-linenumber="124">
2523
+ <li class="covered" data-hits="1" data-linenumber="126">
2422
2524
  <span class="hits">1</span>
2423
2525
 
2424
- <code class="ruby"> attr_accessor :code</code>
2526
+ <code class="ruby"> attr_accessor :json</code>
2425
2527
  </li>
2426
2528
 
2427
- <li class="covered" data-hits="1" data-linenumber="125">
2529
+ <li class="never" data-hits="" data-linenumber="127">
2530
+
2531
+
2532
+ <code class="ruby"></code>
2533
+ </li>
2534
+
2535
+ <li class="covered" data-hits="1" data-linenumber="128">
2428
2536
  <span class="hits">1</span>
2429
2537
 
2430
- <code class="ruby"> attr_accessor :receipt</code>
2538
+ <code class="ruby"> def initialize(json)</code>
2431
2539
  </li>
2432
2540
 
2433
- <li class="never" data-hits="" data-linenumber="126">
2541
+ <li class="covered" data-hits="2" data-linenumber="129">
2542
+ <span class="hits">2</span>
2543
+
2544
+ <code class="ruby"> @json = json</code>
2545
+ </li>
2546
+
2547
+ <li class="never" data-hits="" data-linenumber="130">
2548
+
2549
+
2550
+ <code class="ruby"> end</code>
2551
+ </li>
2552
+
2553
+ <li class="never" data-hits="" data-linenumber="131">
2434
2554
 
2435
2555
 
2436
2556
  <code class="ruby"></code>
2437
2557
  </li>
2438
2558
 
2439
- <li class="covered" data-hits="1" data-linenumber="127">
2559
+ <li class="covered" data-hits="1" data-linenumber="132">
2560
+ <span class="hits">1</span>
2561
+
2562
+ <code class="ruby"> def code</code>
2563
+ </li>
2564
+
2565
+ <li class="covered" data-hits="1" data-linenumber="133">
2440
2566
  <span class="hits">1</span>
2441
2567
 
2442
- <code class="ruby"> def initialize(code, receipt)</code>
2568
+ <code class="ruby"> Integer(json[&#39;status&#39;])</code>
2443
2569
  </li>
2444
2570
 
2445
- <li class="missed" data-hits="0" data-linenumber="128">
2571
+ <li class="never" data-hits="" data-linenumber="134">
2446
2572
 
2447
2573
 
2448
- <code class="ruby"> @code = Integer(code)</code>
2574
+ <code class="ruby"> end</code>
2449
2575
  </li>
2450
2576
 
2451
- <li class="missed" data-hits="0" data-linenumber="129">
2577
+ <li class="never" data-hits="" data-linenumber="135">
2452
2578
 
2453
2579
 
2454
- <code class="ruby"> @receipt = receipt</code>
2580
+ <code class="ruby"></code>
2455
2581
  </li>
2456
2582
 
2457
- <li class="never" data-hits="" data-linenumber="130">
2583
+ <li class="covered" data-hits="1" data-linenumber="136">
2584
+ <span class="hits">1</span>
2585
+
2586
+ <code class="ruby"> def retryable?</code>
2587
+ </li>
2588
+
2589
+ <li class="covered" data-hits="2" data-linenumber="137">
2590
+ <span class="hits">2</span>
2591
+
2592
+ <code class="ruby"> json[&#39;is-retryable&#39;]</code>
2593
+ </li>
2594
+
2595
+ <li class="never" data-hits="" data-linenumber="138">
2458
2596
 
2459
2597
 
2460
2598
  <code class="ruby"> end</code>
2461
2599
  </li>
2462
2600
 
2463
- <li class="never" data-hits="" data-linenumber="131">
2601
+ <li class="never" data-hits="" data-linenumber="139">
2464
2602
 
2465
2603
 
2466
2604
  <code class="ruby"></code>
2467
2605
  </li>
2468
2606
 
2469
- <li class="covered" data-hits="1" data-linenumber="132">
2607
+ <li class="covered" data-hits="1" data-linenumber="140">
2470
2608
  <span class="hits">1</span>
2471
2609
 
2472
2610
  <code class="ruby"> def message</code>
2473
2611
  </li>
2474
2612
 
2475
- <li class="missed" data-hits="0" data-linenumber="133">
2613
+ <li class="missed" data-hits="0" data-linenumber="141">
2476
2614
 
2477
2615
 
2478
- <code class="ruby"> case @code</code>
2616
+ <code class="ruby"> case code</code>
2479
2617
  </li>
2480
2618
 
2481
- <li class="never" data-hits="" data-linenumber="134">
2619
+ <li class="never" data-hits="" data-linenumber="142">
2482
2620
 
2483
2621
 
2484
2622
  <code class="ruby"> when 21000</code>
2485
2623
  </li>
2486
2624
 
2487
- <li class="missed" data-hits="0" data-linenumber="135">
2625
+ <li class="missed" data-hits="0" data-linenumber="143">
2488
2626
 
2489
2627
 
2490
2628
  <code class="ruby"> &#39;The App Store could not read the JSON object you provided.&#39;</code>
2491
2629
  </li>
2492
2630
 
2493
- <li class="never" data-hits="" data-linenumber="136">
2631
+ <li class="never" data-hits="" data-linenumber="144">
2494
2632
 
2495
2633
 
2496
2634
  <code class="ruby"> when 21002</code>
2497
2635
  </li>
2498
2636
 
2499
- <li class="missed" data-hits="0" data-linenumber="137">
2637
+ <li class="missed" data-hits="0" data-linenumber="145">
2500
2638
 
2501
2639
 
2502
2640
  <code class="ruby"> &#39;The data in the receipt-data property was malformed.&#39;</code>
2503
2641
  </li>
2504
2642
 
2505
- <li class="never" data-hits="" data-linenumber="138">
2643
+ <li class="never" data-hits="" data-linenumber="146">
2506
2644
 
2507
2645
 
2508
2646
  <code class="ruby"> when 21003</code>
2509
2647
  </li>
2510
2648
 
2511
- <li class="missed" data-hits="0" data-linenumber="139">
2649
+ <li class="missed" data-hits="0" data-linenumber="147">
2512
2650
 
2513
2651
 
2514
2652
  <code class="ruby"> &#39;The receipt could not be authenticated.&#39;</code>
2515
2653
  </li>
2516
2654
 
2517
- <li class="never" data-hits="" data-linenumber="140">
2655
+ <li class="never" data-hits="" data-linenumber="148">
2518
2656
 
2519
2657
 
2520
2658
  <code class="ruby"> when 21004</code>
2521
2659
  </li>
2522
2660
 
2523
- <li class="missed" data-hits="0" data-linenumber="141">
2661
+ <li class="missed" data-hits="0" data-linenumber="149">
2524
2662
 
2525
2663
 
2526
2664
  <code class="ruby"> &#39;The shared secret you provided does not match the shared secret on file for your account.&#39;</code>
2527
2665
  </li>
2528
2666
 
2529
- <li class="never" data-hits="" data-linenumber="142">
2667
+ <li class="never" data-hits="" data-linenumber="150">
2530
2668
 
2531
2669
 
2532
2670
  <code class="ruby"> when 21005</code>
2533
2671
  </li>
2534
2672
 
2535
- <li class="missed" data-hits="0" data-linenumber="143">
2673
+ <li class="missed" data-hits="0" data-linenumber="151">
2536
2674
 
2537
2675
 
2538
2676
  <code class="ruby"> &#39;The receipt server is not currently available.&#39;</code>
2539
2677
  </li>
2540
2678
 
2541
- <li class="never" data-hits="" data-linenumber="144">
2679
+ <li class="never" data-hits="" data-linenumber="152">
2542
2680
 
2543
2681
 
2544
2682
  <code class="ruby"> when 21006</code>
2545
2683
  </li>
2546
2684
 
2547
- <li class="missed" data-hits="0" data-linenumber="145">
2685
+ <li class="missed" data-hits="0" data-linenumber="153">
2548
2686
 
2549
2687
 
2550
2688
  <code class="ruby"> &#39;This receipt is valid but the subscription has expired. When this status code is returned to your server, the receipt data is also decoded and returned as part of the response.&#39;</code>
2551
2689
  </li>
2552
2690
 
2553
- <li class="never" data-hits="" data-linenumber="146">
2691
+ <li class="never" data-hits="" data-linenumber="154">
2554
2692
 
2555
2693
 
2556
2694
  <code class="ruby"> when 21007</code>
2557
2695
  </li>
2558
2696
 
2559
- <li class="missed" data-hits="0" data-linenumber="147">
2697
+ <li class="missed" data-hits="0" data-linenumber="155">
2560
2698
 
2561
2699
 
2562
2700
  <code class="ruby"> &#39;This receipt is a sandbox receipt, but it was sent to the production service for verification.&#39;</code>
2563
2701
  </li>
2564
2702
 
2565
- <li class="never" data-hits="" data-linenumber="148">
2703
+ <li class="never" data-hits="" data-linenumber="156">
2566
2704
 
2567
2705
 
2568
2706
  <code class="ruby"> when 21008</code>
2569
2707
  </li>
2570
2708
 
2571
- <li class="missed" data-hits="0" data-linenumber="149">
2709
+ <li class="missed" data-hits="0" data-linenumber="157">
2572
2710
 
2573
2711
 
2574
2712
  <code class="ruby"> &#39;This receipt is a production receipt, but it was sent to the sandbox service for verification.&#39;</code>
2575
2713
  </li>
2576
2714
 
2577
- <li class="never" data-hits="" data-linenumber="150">
2715
+ <li class="never" data-hits="" data-linenumber="158">
2578
2716
 
2579
2717
 
2580
2718
  <code class="ruby"> when 21010</code>
2581
2719
  </li>
2582
2720
 
2583
- <li class="missed" data-hits="0" data-linenumber="151">
2721
+ <li class="missed" data-hits="0" data-linenumber="159">
2584
2722
 
2585
2723
 
2586
2724
  <code class="ruby"> &#39;This receipt could not be authorized. Treat this the same as if a purchase was never made.&#39;</code>
2587
2725
  </li>
2588
2726
 
2589
- <li class="never" data-hits="" data-linenumber="152">
2727
+ <li class="never" data-hits="" data-linenumber="160">
2590
2728
 
2591
2729
 
2592
2730
  <code class="ruby"> when 21100..21199</code>
2593
2731
  </li>
2594
2732
 
2595
- <li class="missed" data-hits="0" data-linenumber="153">
2733
+ <li class="missed" data-hits="0" data-linenumber="161">
2596
2734
 
2597
2735
 
2598
2736
  <code class="ruby"> &#39;Internal data access error.&#39;</code>
2599
2737
  </li>
2600
2738
 
2601
- <li class="never" data-hits="" data-linenumber="154">
2739
+ <li class="never" data-hits="" data-linenumber="162">
2602
2740
 
2603
2741
 
2604
2742
  <code class="ruby"> else</code>
2605
2743
  </li>
2606
2744
 
2607
- <li class="missed" data-hits="0" data-linenumber="155">
2745
+ <li class="missed" data-hits="0" data-linenumber="163">
2608
2746
 
2609
2747
 
2610
- <code class="ruby"> &quot;Unknown Error: #{@code}&quot;</code>
2748
+ <code class="ruby"> &quot;Unknown Error: #{code}&quot;</code>
2611
2749
  </li>
2612
2750
 
2613
- <li class="never" data-hits="" data-linenumber="156">
2751
+ <li class="never" data-hits="" data-linenumber="164">
2614
2752
 
2615
2753
 
2616
2754
  <code class="ruby"> end</code>
2617
2755
  </li>
2618
2756
 
2619
- <li class="never" data-hits="" data-linenumber="157">
2757
+ <li class="never" data-hits="" data-linenumber="165">
2620
2758
 
2621
2759
 
2622
2760
  <code class="ruby"> end</code>
2623
2761
  </li>
2624
2762
 
2625
- <li class="never" data-hits="" data-linenumber="158">
2763
+ <li class="never" data-hits="" data-linenumber="166">
2626
2764
 
2627
2765
 
2628
2766
  <code class="ruby"> end</code>
2629
2767
  </li>
2630
2768
 
2631
- <li class="never" data-hits="" data-linenumber="159">
2769
+ <li class="never" data-hits="" data-linenumber="167">
2632
2770
 
2633
2771
 
2634
2772
  <code class="ruby"> end</code>
2635
2773
  </li>
2636
2774
 
2637
- <li class="never" data-hits="" data-linenumber="160">
2775
+ <li class="never" data-hits="" data-linenumber="168">
2638
2776
 
2639
2777
 
2640
2778
  <code class="ruby">end</code>