codin_rep 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/codin_rep/add_employee.rb +1 -1
- data/lib/codin_rep/del_employee.rb +1 -1
- data/lib/codin_rep/version.rb +1 -1
- data/test/coverage/index.html +69 -45
- data/test/coverage/rcov/index.html +5 -5
- data/test/coverage/rcov/lib-codin_rep-add_employee_rb.html +2 -2
- data/test/coverage/rcov/lib-codin_rep-command_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-communication_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-del_employee_rb.html +2 -2
- data/test/coverage/rcov/lib-codin_rep-employee_command_rb.html +45 -33
- data/test/coverage/rcov/lib-codin_rep-get_afd_header_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-get_records_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-get_time_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-mock_time_clock_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-set_time_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-time_util_rb.html +1 -1
- data/test/coverage/rcov/lib-codin_rep-version_rb.html +2 -2
- data/test/coverage/rcov/lib-codin_rep_rb.html +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c0cce479d68c01be7ce411879f178e83f3bbbea
|
4
|
+
data.tar.gz: 31bb9d203c4e563baf36a711cc097e244c05744a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89032ebcb0f7fb386b100fb5085bfd452bd8789f22a9bd8046c3dafdfd39a5b1a49063978d35e186d5f34c077a4e951441223b053aca10110e7b0445e11dc881
|
7
|
+
data.tar.gz: f686a13749a0ee52367d3a9126fc2a57af78652e8faf3c696fb1c5c34a6e4a307b6fa70c114a5e7e62f86c0dd3458504635cb24b014e02c7d6ac7596a002a3bf
|
@@ -24,7 +24,7 @@ module CodinRep
|
|
24
24
|
class AddEmployee < EmployeeCommand
|
25
25
|
NAME_MAX_SIZE = 53
|
26
26
|
COMMAND_CODE = "075h1".freeze
|
27
|
-
EXPECTED_HEADER = "REP003h1
|
27
|
+
EXPECTED_HEADER = "REP003h1".freeze
|
28
28
|
REGISTRATION_COMPLETED_HEADER = 'PGREP010h1'.freeze
|
29
29
|
|
30
30
|
def initialize(registration, pis_number, name, *args)
|
@@ -23,7 +23,7 @@ require "codin_rep/employee_command"
|
|
23
23
|
module CodinRep
|
24
24
|
class DelEmployee < EmployeeCommand
|
25
25
|
COMMAND_CODE = "016j1".freeze
|
26
|
-
EXPECTED_HEADER = "REP003j1
|
26
|
+
EXPECTED_HEADER = "REP003j1".freeze
|
27
27
|
REGISTRATION_COMPLETED_HEADER = 'PGREP010j1'.freeze
|
28
28
|
|
29
29
|
def initialize(registration, *args)
|
data/lib/codin_rep/version.rb
CHANGED
data/test/coverage/index.html
CHANGED
@@ -14,7 +14,7 @@
|
|
14
14
|
<img src="./assets/0.10.0/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-01-
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2017-01-31T15:21:16-02:00">2017-01-31T15:21:16-02:00</abbr></div>
|
18
18
|
<ul class="group_tabs"></ul>
|
19
19
|
|
20
20
|
<div id="content">
|
@@ -32,9 +32,9 @@
|
|
32
32
|
<a name="AllFiles"></a>
|
33
33
|
<div>
|
34
34
|
<b>13</b> files in total.
|
35
|
-
<b>
|
35
|
+
<b>1071</b> relevant lines.
|
36
36
|
<span class="green"><b>2</b> lines covered</span> and
|
37
|
-
<span class="red"><b>
|
37
|
+
<span class="red"><b>1069</b> lines missed </span>
|
38
38
|
</div>
|
39
39
|
<table class="file_list">
|
40
40
|
<thead>
|
@@ -103,10 +103,10 @@
|
|
103
103
|
<tr>
|
104
104
|
<td class="strong"><a href="#f880f4d63c0b18b9116e42e06a7ed42abcf60264" class="src_link" title="lib/codin_rep/employee_command.rb">lib/codin_rep/employee_command.rb</a></td>
|
105
105
|
<td class="red strong">0.0 %</td>
|
106
|
-
<td>
|
107
|
-
<td>
|
106
|
+
<td>97</td>
|
107
|
+
<td>97</td>
|
108
108
|
<td>0</td>
|
109
|
-
<td>
|
109
|
+
<td>97</td>
|
110
110
|
<td>0.0</td>
|
111
111
|
</tr>
|
112
112
|
|
@@ -385,9 +385,9 @@
|
|
385
385
|
<a name="Libraries"></a>
|
386
386
|
<div>
|
387
387
|
<b>13</b> files in total.
|
388
|
-
<b>
|
388
|
+
<b>1071</b> relevant lines.
|
389
389
|
<span class="green"><b>2</b> lines covered</span> and
|
390
|
-
<span class="red"><b>
|
390
|
+
<span class="red"><b>1069</b> lines missed </span>
|
391
391
|
</div>
|
392
392
|
<table class="file_list">
|
393
393
|
<thead>
|
@@ -456,10 +456,10 @@
|
|
456
456
|
<tr>
|
457
457
|
<td class="strong"><a href="#f880f4d63c0b18b9116e42e06a7ed42abcf60264" class="src_link" title="lib/codin_rep/employee_command.rb">lib/codin_rep/employee_command.rb</a></td>
|
458
458
|
<td class="red strong">0.0 %</td>
|
459
|
-
<td>
|
460
|
-
<td>
|
459
|
+
<td>97</td>
|
460
|
+
<td>97</td>
|
461
461
|
<td>0</td>
|
462
|
-
<td>
|
462
|
+
<td>97</td>
|
463
463
|
<td>0.0</td>
|
464
464
|
</tr>
|
465
465
|
|
@@ -1255,7 +1255,7 @@
|
|
1255
1255
|
<li class="missed" data-hits="0" data-linenumber="27">
|
1256
1256
|
|
1257
1257
|
|
1258
|
-
<code class="ruby"> EXPECTED_HEADER = "REP003h1
|
1258
|
+
<code class="ruby"> EXPECTED_HEADER = "REP003h1".freeze</code>
|
1259
1259
|
</li>
|
1260
1260
|
|
1261
1261
|
<li class="missed" data-hits="0" data-linenumber="28">
|
@@ -3007,7 +3007,7 @@
|
|
3007
3007
|
<li class="missed" data-hits="0" data-linenumber="26">
|
3008
3008
|
|
3009
3009
|
|
3010
|
-
<code class="ruby"> EXPECTED_HEADER = "REP003j1
|
3010
|
+
<code class="ruby"> EXPECTED_HEADER = "REP003j1".freeze</code>
|
3011
3011
|
</li>
|
3012
3012
|
|
3013
3013
|
<li class="missed" data-hits="0" data-linenumber="27">
|
@@ -3091,9 +3091,9 @@
|
|
3091
3091
|
<h3>lib/codin_rep/employee_command.rb</h3>
|
3092
3092
|
<h4><span class="red">0.0 %</span> covered</h4>
|
3093
3093
|
<div>
|
3094
|
-
<b>
|
3094
|
+
<b>97</b> relevant lines.
|
3095
3095
|
<span class="green"><b>0</b> lines covered</span> and
|
3096
|
-
<span class="red"><b>
|
3096
|
+
<span class="red"><b>97</b> lines missed.</span>
|
3097
3097
|
</div>
|
3098
3098
|
</div>
|
3099
3099
|
|
@@ -3457,121 +3457,121 @@
|
|
3457
3457
|
<li class="missed" data-hits="0" data-linenumber="60">
|
3458
3458
|
|
3459
3459
|
|
3460
|
-
<code class="ruby">
|
3460
|
+
<code class="ruby"> # The REP requires some time to process the employee commands, so there's</code>
|
3461
3461
|
</li>
|
3462
3462
|
|
3463
3463
|
<li class="missed" data-hits="0" data-linenumber="61">
|
3464
3464
|
|
3465
3465
|
|
3466
|
-
<code class="ruby">
|
3466
|
+
<code class="ruby"> # this artificial sleep here to do it.</code>
|
3467
3467
|
</li>
|
3468
3468
|
|
3469
3469
|
<li class="missed" data-hits="0" data-linenumber="62">
|
3470
3470
|
|
3471
3471
|
|
3472
|
-
<code class="ruby">
|
3472
|
+
<code class="ruby"> sleep 0.1</code>
|
3473
3473
|
</li>
|
3474
3474
|
|
3475
3475
|
<li class="missed" data-hits="0" data-linenumber="63">
|
3476
3476
|
|
3477
3477
|
|
3478
|
-
<code class="ruby">
|
3478
|
+
<code class="ruby"> return get_data_from_response_payload</code>
|
3479
3479
|
</li>
|
3480
3480
|
|
3481
3481
|
<li class="missed" data-hits="0" data-linenumber="64">
|
3482
3482
|
|
3483
3483
|
|
3484
|
-
<code class="ruby">
|
3484
|
+
<code class="ruby"> rescue</code>
|
3485
3485
|
</li>
|
3486
3486
|
|
3487
3487
|
<li class="missed" data-hits="0" data-linenumber="65">
|
3488
3488
|
|
3489
3489
|
|
3490
|
-
<code class="ruby"> @communication.close
|
3490
|
+
<code class="ruby"> @communication.close</code>
|
3491
3491
|
</li>
|
3492
3492
|
|
3493
3493
|
<li class="missed" data-hits="0" data-linenumber="66">
|
3494
3494
|
|
3495
3495
|
|
3496
|
-
<code class="ruby">
|
3496
|
+
<code class="ruby"> raise</code>
|
3497
3497
|
</li>
|
3498
3498
|
|
3499
3499
|
<li class="missed" data-hits="0" data-linenumber="67">
|
3500
3500
|
|
3501
3501
|
|
3502
|
-
<code class="ruby"
|
3502
|
+
<code class="ruby"> ensure</code>
|
3503
3503
|
</li>
|
3504
3504
|
|
3505
3505
|
<li class="missed" data-hits="0" data-linenumber="68">
|
3506
3506
|
|
3507
3507
|
|
3508
|
-
<code class="ruby">
|
3508
|
+
<code class="ruby"> @communication.close if should_close_connection?</code>
|
3509
3509
|
</li>
|
3510
3510
|
|
3511
3511
|
<li class="missed" data-hits="0" data-linenumber="69">
|
3512
3512
|
|
3513
3513
|
|
3514
|
-
<code class="ruby">
|
3514
|
+
<code class="ruby"> end</code>
|
3515
3515
|
</li>
|
3516
3516
|
|
3517
3517
|
<li class="missed" data-hits="0" data-linenumber="70">
|
3518
3518
|
|
3519
3519
|
|
3520
|
-
<code class="ruby"
|
3520
|
+
<code class="ruby"></code>
|
3521
3521
|
</li>
|
3522
3522
|
|
3523
3523
|
<li class="missed" data-hits="0" data-linenumber="71">
|
3524
3524
|
|
3525
3525
|
|
3526
|
-
<code class="ruby"
|
3526
|
+
<code class="ruby"> def get_expected_response_size</code>
|
3527
3527
|
</li>
|
3528
3528
|
|
3529
3529
|
<li class="missed" data-hits="0" data-linenumber="72">
|
3530
3530
|
|
3531
3531
|
|
3532
|
-
<code class="ruby">
|
3532
|
+
<code class="ruby"> @sent_registration ? 0 : self.class::EXPECTED_HEADER.size</code>
|
3533
3533
|
</li>
|
3534
3534
|
|
3535
3535
|
<li class="missed" data-hits="0" data-linenumber="73">
|
3536
3536
|
|
3537
3537
|
|
3538
|
-
<code class="ruby">
|
3538
|
+
<code class="ruby"> end</code>
|
3539
3539
|
</li>
|
3540
3540
|
|
3541
3541
|
<li class="missed" data-hits="0" data-linenumber="74">
|
3542
3542
|
|
3543
3543
|
|
3544
|
-
<code class="ruby"
|
3544
|
+
<code class="ruby"></code>
|
3545
3545
|
</li>
|
3546
3546
|
|
3547
3547
|
<li class="missed" data-hits="0" data-linenumber="75">
|
3548
3548
|
|
3549
3549
|
|
3550
|
-
<code class="ruby">
|
3550
|
+
<code class="ruby"> def check_response_header</code>
|
3551
3551
|
</li>
|
3552
3552
|
|
3553
3553
|
<li class="missed" data-hits="0" data-linenumber="76">
|
3554
3554
|
|
3555
3555
|
|
3556
|
-
<code class="ruby">
|
3556
|
+
<code class="ruby"> expected_header = self.class::EXPECTED_HEADER</code>
|
3557
3557
|
</li>
|
3558
3558
|
|
3559
3559
|
<li class="missed" data-hits="0" data-linenumber="77">
|
3560
3560
|
|
3561
3561
|
|
3562
|
-
<code class="ruby"
|
3562
|
+
<code class="ruby"> unless @response.match(/^#{expected_header}/)</code>
|
3563
3563
|
</li>
|
3564
3564
|
|
3565
3565
|
<li class="missed" data-hits="0" data-linenumber="78">
|
3566
3566
|
|
3567
3567
|
|
3568
|
-
<code class="ruby">
|
3568
|
+
<code class="ruby"> raise UnknownHeader.new @response[0..expected_header.size], 'set employee', expected_header</code>
|
3569
3569
|
</li>
|
3570
3570
|
|
3571
3571
|
<li class="missed" data-hits="0" data-linenumber="79">
|
3572
3572
|
|
3573
3573
|
|
3574
|
-
<code class="ruby">
|
3574
|
+
<code class="ruby"> end</code>
|
3575
3575
|
</li>
|
3576
3576
|
|
3577
3577
|
<li class="missed" data-hits="0" data-linenumber="80">
|
@@ -3589,13 +3589,13 @@
|
|
3589
3589
|
<li class="missed" data-hits="0" data-linenumber="82">
|
3590
3590
|
|
3591
3591
|
|
3592
|
-
<code class="ruby"> def
|
3592
|
+
<code class="ruby"> def get_response_payload</code>
|
3593
3593
|
</li>
|
3594
3594
|
|
3595
3595
|
<li class="missed" data-hits="0" data-linenumber="83">
|
3596
3596
|
|
3597
3597
|
|
3598
|
-
<code class="ruby"> true</code>
|
3598
|
+
<code class="ruby"> @sent_employee_data = true</code>
|
3599
3599
|
</li>
|
3600
3600
|
|
3601
3601
|
<li class="missed" data-hits="0" data-linenumber="84">
|
@@ -3613,48 +3613,72 @@
|
|
3613
3613
|
<li class="missed" data-hits="0" data-linenumber="86">
|
3614
3614
|
|
3615
3615
|
|
3616
|
-
<code class="ruby">
|
3616
|
+
<code class="ruby"> def get_data_from_response_payload</code>
|
3617
3617
|
</li>
|
3618
3618
|
|
3619
3619
|
<li class="missed" data-hits="0" data-linenumber="87">
|
3620
3620
|
|
3621
3621
|
|
3622
|
-
<code class="ruby">
|
3622
|
+
<code class="ruby"> true</code>
|
3623
3623
|
</li>
|
3624
3624
|
|
3625
3625
|
<li class="missed" data-hits="0" data-linenumber="88">
|
3626
3626
|
|
3627
3627
|
|
3628
|
-
<code class="ruby">
|
3628
|
+
<code class="ruby"> end</code>
|
3629
3629
|
</li>
|
3630
3630
|
|
3631
3631
|
<li class="missed" data-hits="0" data-linenumber="89">
|
3632
3632
|
|
3633
3633
|
|
3634
|
-
<code class="ruby"
|
3634
|
+
<code class="ruby"></code>
|
3635
3635
|
</li>
|
3636
3636
|
|
3637
3637
|
<li class="missed" data-hits="0" data-linenumber="90">
|
3638
3638
|
|
3639
3639
|
|
3640
|
-
<code class="ruby">
|
3640
|
+
<code class="ruby"> private</code>
|
3641
3641
|
</li>
|
3642
3642
|
|
3643
3643
|
<li class="missed" data-hits="0" data-linenumber="91">
|
3644
3644
|
|
3645
3645
|
|
3646
|
-
<code class="ruby">
|
3646
|
+
<code class="ruby"> def convert_integer_to_byte_string(original_integer)</code>
|
3647
3647
|
</li>
|
3648
3648
|
|
3649
3649
|
<li class="missed" data-hits="0" data-linenumber="92">
|
3650
3650
|
|
3651
3651
|
|
3652
|
-
<code class="ruby">
|
3652
|
+
<code class="ruby"> integer = original_integer.to_s</code>
|
3653
3653
|
</li>
|
3654
3654
|
|
3655
3655
|
<li class="missed" data-hits="0" data-linenumber="93">
|
3656
3656
|
|
3657
3657
|
|
3658
|
+
<code class="ruby"> raise InvalidInteger.new(original_integer) if integer.size > CODE_MAX_SIZE</code>
|
3659
|
+
</li>
|
3660
|
+
|
3661
|
+
<li class="missed" data-hits="0" data-linenumber="94">
|
3662
|
+
|
3663
|
+
|
3664
|
+
<code class="ruby"> [integer.to_s.rjust(CODE_MAX_SIZE, '0')].pack('H*')</code>
|
3665
|
+
</li>
|
3666
|
+
|
3667
|
+
<li class="missed" data-hits="0" data-linenumber="95">
|
3668
|
+
|
3669
|
+
|
3670
|
+
<code class="ruby"> end</code>
|
3671
|
+
</li>
|
3672
|
+
|
3673
|
+
<li class="missed" data-hits="0" data-linenumber="96">
|
3674
|
+
|
3675
|
+
|
3676
|
+
<code class="ruby"> end</code>
|
3677
|
+
</li>
|
3678
|
+
|
3679
|
+
<li class="missed" data-hits="0" data-linenumber="97">
|
3680
|
+
|
3681
|
+
|
3658
3682
|
<code class="ruby">end</code>
|
3659
3683
|
</li>
|
3660
3684
|
|
@@ -7297,7 +7321,7 @@
|
|
7297
7321
|
<li class="covered" data-hits="1" data-linenumber="22">
|
7298
7322
|
<span class="hits">1</span>
|
7299
7323
|
|
7300
|
-
<code class="ruby"> VERSION = "0.2.
|
7324
|
+
<code class="ruby"> VERSION = "0.2.2".freeze</code>
|
7301
7325
|
</li>
|
7302
7326
|
|
7303
7327
|
<li class="never" data-hits="" data-linenumber="23">
|
@@ -46,8 +46,8 @@
|
|
46
46
|
<tfoot>
|
47
47
|
<tr>
|
48
48
|
<td class="left_align">TOTAL</td>
|
49
|
-
<td class='right_align'><tt>
|
50
|
-
<td class='right_align'><tt>
|
49
|
+
<td class='right_align'><tt>1092</tt></td>
|
50
|
+
<td class='right_align'><tt>1071</tt></td>
|
51
51
|
<td class="left_align"><div class="percent_graph_legend"><tt class=''>2.11%</tt></div>
|
52
52
|
<div class="percent_graph">
|
53
53
|
<div class="covered" style="width:2px"></div>
|
@@ -144,8 +144,8 @@
|
|
144
144
|
|
145
145
|
<tr class="all_files all_coverage 10 20 30 40 50 60 70 80 90 100 lib codin_rep odd">
|
146
146
|
<td class="left_align"><a href="lib-codin_rep-employee_command_rb.html">lib/codin_rep/employee_command.rb</a></td>
|
147
|
-
<td class='right_align'><tt>
|
148
|
-
<td class='right_align'><tt>
|
147
|
+
<td class='right_align'><tt>97</tt></td>
|
148
|
+
<td class='right_align'><tt>97</tt></td>
|
149
149
|
<td class="left_align"><div class="percent_graph_legend"><tt class=''>0.00%</tt></div>
|
150
150
|
<div class="percent_graph">
|
151
151
|
<div class="covered" style="width:0px"></div>
|
@@ -274,7 +274,7 @@
|
|
274
274
|
</table>
|
275
275
|
</div>
|
276
276
|
|
277
|
-
<p>Generated on 2017-01-31
|
277
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
278
278
|
|
279
279
|
<script type="text/javascript">
|
280
280
|
$(document).ready(function(){$("#report_table").tablesorter({widgets: ['zebra'], textExtraction: 'complex'});});
|
@@ -129,7 +129,7 @@
|
|
129
129
|
<td><pre><a name="line27">27</a> COMMAND_CODE = "075h1".freeze</pre></td>
|
130
130
|
</tr>
|
131
131
|
<tr class="uncovered">
|
132
|
-
<td><pre><a name="line28">28</a> EXPECTED_HEADER = "REP003h1
|
132
|
+
<td><pre><a name="line28">28</a> EXPECTED_HEADER = "REP003h1".freeze</pre></td>
|
133
133
|
</tr>
|
134
134
|
<tr class="uncovered">
|
135
135
|
<td><pre><a name="line29">29</a> REGISTRATION_COMPLETED_HEADER = 'PGREP010h1'.freeze</pre></td>
|
@@ -194,7 +194,7 @@
|
|
194
194
|
</tbody>
|
195
195
|
</table>
|
196
196
|
|
197
|
-
<p>Generated on 2017-01-31
|
197
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
198
198
|
|
199
199
|
</body>
|
200
200
|
</html>
|
@@ -392,7 +392,7 @@
|
|
392
392
|
</tbody>
|
393
393
|
</table>
|
394
394
|
|
395
|
-
<p>Generated on 2017-01-31
|
395
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
396
396
|
|
397
397
|
</body>
|
398
398
|
</html>
|
@@ -425,7 +425,7 @@
|
|
425
425
|
</tbody>
|
426
426
|
</table>
|
427
427
|
|
428
|
-
<p>Generated on 2017-01-31
|
428
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
429
429
|
|
430
430
|
</body>
|
431
431
|
</html>
|
@@ -126,7 +126,7 @@
|
|
126
126
|
<td><pre><a name="line26">26</a> COMMAND_CODE = "016j1".freeze</pre></td>
|
127
127
|
</tr>
|
128
128
|
<tr class="uncovered">
|
129
|
-
<td><pre><a name="line27">27</a> EXPECTED_HEADER = "REP003j1
|
129
|
+
<td><pre><a name="line27">27</a> EXPECTED_HEADER = "REP003j1".freeze</pre></td>
|
130
130
|
</tr>
|
131
131
|
<tr class="uncovered">
|
132
132
|
<td><pre><a name="line28">28</a> REGISTRATION_COMPLETED_HEADER = 'PGREP010j1'.freeze</pre></td>
|
@@ -167,7 +167,7 @@
|
|
167
167
|
</tbody>
|
168
168
|
</table>
|
169
169
|
|
170
|
-
<p>Generated on 2017-01-31
|
170
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
171
171
|
|
172
172
|
</body>
|
173
173
|
</html>
|
@@ -25,8 +25,8 @@
|
|
25
25
|
<tbody>
|
26
26
|
<tr>
|
27
27
|
<td class="left_align"><a href="lib-codin_rep-employee_command_rb.html">lib/codin_rep/employee_command.rb</a></td>
|
28
|
-
<td class='right_align'><tt>
|
29
|
-
<td class='right_align'><tt>
|
28
|
+
<td class='right_align'><tt>97</tt></td>
|
29
|
+
<td class='right_align'><tt>97</tt></td>
|
30
30
|
<td class="left_align"><div class="percent_graph_legend"><tt class=''>0.00%</tt></div>
|
31
31
|
<div class="percent_graph">
|
32
32
|
<div class="covered" style="width:0px"></div>
|
@@ -228,64 +228,64 @@
|
|
228
228
|
<td><pre><a name="line60">60</a> @response = communicate!</pre></td>
|
229
229
|
</tr>
|
230
230
|
<tr class="uncovered">
|
231
|
-
<td><pre><a name="line61">61</a>
|
231
|
+
<td><pre><a name="line61">61</a> # The REP requires some time to process the employee commands, so there's</pre></td>
|
232
232
|
</tr>
|
233
233
|
<tr class="uncovered">
|
234
|
-
<td><pre><a name="line62">62</a>
|
234
|
+
<td><pre><a name="line62">62</a> # this artificial sleep here to do it.</pre></td>
|
235
235
|
</tr>
|
236
236
|
<tr class="uncovered">
|
237
|
-
<td><pre><a name="line63">63</a>
|
237
|
+
<td><pre><a name="line63">63</a> sleep 0.1</pre></td>
|
238
238
|
</tr>
|
239
239
|
<tr class="uncovered">
|
240
|
-
<td><pre><a name="line64">64</a>
|
240
|
+
<td><pre><a name="line64">64</a> return get_data_from_response_payload</pre></td>
|
241
241
|
</tr>
|
242
242
|
<tr class="uncovered">
|
243
|
-
<td><pre><a name="line65">65</a>
|
243
|
+
<td><pre><a name="line65">65</a> rescue</pre></td>
|
244
244
|
</tr>
|
245
245
|
<tr class="uncovered">
|
246
|
-
<td><pre><a name="line66">66</a> @communication.close
|
246
|
+
<td><pre><a name="line66">66</a> @communication.close</pre></td>
|
247
247
|
</tr>
|
248
248
|
<tr class="uncovered">
|
249
|
-
<td><pre><a name="line67">67</a>
|
249
|
+
<td><pre><a name="line67">67</a> raise</pre></td>
|
250
250
|
</tr>
|
251
251
|
<tr class="uncovered">
|
252
|
-
<td><pre><a name="line68">68</a>
|
252
|
+
<td><pre><a name="line68">68</a> ensure</pre></td>
|
253
253
|
</tr>
|
254
254
|
<tr class="uncovered">
|
255
|
-
<td><pre><a name="line69">69</a>
|
255
|
+
<td><pre><a name="line69">69</a> @communication.close if should_close_connection?</pre></td>
|
256
256
|
</tr>
|
257
257
|
<tr class="uncovered">
|
258
|
-
<td><pre><a name="line70">70</a>
|
258
|
+
<td><pre><a name="line70">70</a> end</pre></td>
|
259
259
|
</tr>
|
260
260
|
<tr class="uncovered">
|
261
|
-
<td><pre><a name="line71">71</a>
|
261
|
+
<td><pre><a name="line71">71</a> </pre></td>
|
262
262
|
</tr>
|
263
263
|
<tr class="uncovered">
|
264
|
-
<td><pre><a name="line72">72</a> </pre></td>
|
264
|
+
<td><pre><a name="line72">72</a> def get_expected_response_size</pre></td>
|
265
265
|
</tr>
|
266
266
|
<tr class="uncovered">
|
267
|
-
<td><pre><a name="line73">73</a>
|
267
|
+
<td><pre><a name="line73">73</a> @sent_registration ? 0 : self.class::EXPECTED_HEADER.size</pre></td>
|
268
268
|
</tr>
|
269
269
|
<tr class="uncovered">
|
270
|
-
<td><pre><a name="line74">74</a>
|
270
|
+
<td><pre><a name="line74">74</a> end</pre></td>
|
271
271
|
</tr>
|
272
272
|
<tr class="uncovered">
|
273
|
-
<td><pre><a name="line75">75</a>
|
273
|
+
<td><pre><a name="line75">75</a> </pre></td>
|
274
274
|
</tr>
|
275
275
|
<tr class="uncovered">
|
276
|
-
<td><pre><a name="line76">76</a>
|
276
|
+
<td><pre><a name="line76">76</a> def check_response_header</pre></td>
|
277
277
|
</tr>
|
278
278
|
<tr class="uncovered">
|
279
|
-
<td><pre><a name="line77">77</a>
|
279
|
+
<td><pre><a name="line77">77</a> expected_header = self.class::EXPECTED_HEADER</pre></td>
|
280
280
|
</tr>
|
281
281
|
<tr class="uncovered">
|
282
|
-
<td><pre><a name="line78">78</a> </pre></td>
|
282
|
+
<td><pre><a name="line78">78</a> unless @response.match(/^#{expected_header}/)</pre></td>
|
283
283
|
</tr>
|
284
284
|
<tr class="uncovered">
|
285
|
-
<td><pre><a name="line79">79</a>
|
285
|
+
<td><pre><a name="line79">79</a> raise UnknownHeader.new @response[0..expected_header.size], 'set employee', expected_header</pre></td>
|
286
286
|
</tr>
|
287
287
|
<tr class="uncovered">
|
288
|
-
<td><pre><a name="line80">80</a>
|
288
|
+
<td><pre><a name="line80">80</a> end</pre></td>
|
289
289
|
</tr>
|
290
290
|
<tr class="uncovered">
|
291
291
|
<td><pre><a name="line81">81</a> end</pre></td>
|
@@ -294,10 +294,10 @@
|
|
294
294
|
<td><pre><a name="line82">82</a> </pre></td>
|
295
295
|
</tr>
|
296
296
|
<tr class="uncovered">
|
297
|
-
<td><pre><a name="line83">83</a> def
|
297
|
+
<td><pre><a name="line83">83</a> def get_response_payload</pre></td>
|
298
298
|
</tr>
|
299
299
|
<tr class="uncovered">
|
300
|
-
<td><pre><a name="line84">84</a> true</pre></td>
|
300
|
+
<td><pre><a name="line84">84</a> @sent_employee_data = true</pre></td>
|
301
301
|
</tr>
|
302
302
|
<tr class="uncovered">
|
303
303
|
<td><pre><a name="line85">85</a> end</pre></td>
|
@@ -306,33 +306,45 @@
|
|
306
306
|
<td><pre><a name="line86">86</a> </pre></td>
|
307
307
|
</tr>
|
308
308
|
<tr class="uncovered">
|
309
|
-
<td><pre><a name="line87">87</a>
|
309
|
+
<td><pre><a name="line87">87</a> def get_data_from_response_payload</pre></td>
|
310
310
|
</tr>
|
311
311
|
<tr class="uncovered">
|
312
|
-
<td><pre><a name="line88">88</a>
|
312
|
+
<td><pre><a name="line88">88</a> true</pre></td>
|
313
313
|
</tr>
|
314
314
|
<tr class="uncovered">
|
315
|
-
<td><pre><a name="line89">89</a>
|
315
|
+
<td><pre><a name="line89">89</a> end</pre></td>
|
316
316
|
</tr>
|
317
317
|
<tr class="uncovered">
|
318
|
-
<td><pre><a name="line90">90</a>
|
318
|
+
<td><pre><a name="line90">90</a> </pre></td>
|
319
319
|
</tr>
|
320
320
|
<tr class="uncovered">
|
321
|
-
<td><pre><a name="line91">91</a>
|
321
|
+
<td><pre><a name="line91">91</a> private</pre></td>
|
322
322
|
</tr>
|
323
323
|
<tr class="uncovered">
|
324
|
-
<td><pre><a name="line92">92</a>
|
324
|
+
<td><pre><a name="line92">92</a> def convert_integer_to_byte_string(original_integer)</pre></td>
|
325
325
|
</tr>
|
326
326
|
<tr class="uncovered">
|
327
|
-
<td><pre><a name="line93">93</a>
|
327
|
+
<td><pre><a name="line93">93</a> integer = original_integer.to_s</pre></td>
|
328
328
|
</tr>
|
329
329
|
<tr class="uncovered">
|
330
|
-
<td><pre><a name="line94">94</a>
|
330
|
+
<td><pre><a name="line94">94</a> raise InvalidInteger.new(original_integer) if integer.size > CODE_MAX_SIZE</pre></td>
|
331
|
+
</tr>
|
332
|
+
<tr class="uncovered">
|
333
|
+
<td><pre><a name="line95">95</a> [integer.to_s.rjust(CODE_MAX_SIZE, '0')].pack('H*')</pre></td>
|
334
|
+
</tr>
|
335
|
+
<tr class="uncovered">
|
336
|
+
<td><pre><a name="line96">96</a> end</pre></td>
|
337
|
+
</tr>
|
338
|
+
<tr class="uncovered">
|
339
|
+
<td><pre><a name="line97">97</a> end</pre></td>
|
340
|
+
</tr>
|
341
|
+
<tr class="uncovered">
|
342
|
+
<td><pre><a name="line98">98</a> end</pre></td>
|
331
343
|
</tr>
|
332
344
|
</tbody>
|
333
345
|
</table>
|
334
346
|
|
335
|
-
<p>Generated on 2017-01-31
|
347
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
336
348
|
|
337
349
|
</body>
|
338
350
|
</html>
|
@@ -212,7 +212,7 @@
|
|
212
212
|
</tbody>
|
213
213
|
</table>
|
214
214
|
|
215
|
-
<p>Generated on 2017-01-31
|
215
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
216
216
|
|
217
217
|
</body>
|
218
218
|
</html>
|
@@ -521,7 +521,7 @@
|
|
521
521
|
</tbody>
|
522
522
|
</table>
|
523
523
|
|
524
|
-
<p>Generated on 2017-01-31
|
524
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
525
525
|
|
526
526
|
</body>
|
527
527
|
</html>
|
@@ -224,7 +224,7 @@
|
|
224
224
|
</tbody>
|
225
225
|
</table>
|
226
226
|
|
227
|
-
<p>Generated on 2017-01-31
|
227
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
228
228
|
|
229
229
|
</body>
|
230
230
|
</html>
|
@@ -611,7 +611,7 @@
|
|
611
611
|
</tbody>
|
612
612
|
</table>
|
613
613
|
|
614
|
-
<p>Generated on 2017-01-31
|
614
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
615
615
|
|
616
616
|
</body>
|
617
617
|
</html>
|
@@ -236,7 +236,7 @@
|
|
236
236
|
</tbody>
|
237
237
|
</table>
|
238
238
|
|
239
|
-
<p>Generated on 2017-01-31
|
239
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
240
240
|
|
241
241
|
</body>
|
242
242
|
</html>
|
@@ -206,7 +206,7 @@
|
|
206
206
|
</tbody>
|
207
207
|
</table>
|
208
208
|
|
209
|
-
<p>Generated on 2017-01-31
|
209
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
210
210
|
|
211
211
|
</body>
|
212
212
|
</html>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
<td><pre><a name="line22">22</a> module CodinRep</pre></td>
|
115
115
|
</tr>
|
116
116
|
<tr class="marked">
|
117
|
-
<td><pre><a name="line23">23</a> VERSION = "0.2.
|
117
|
+
<td><pre><a name="line23">23</a> VERSION = "0.2.2".freeze</pre></td>
|
118
118
|
</tr>
|
119
119
|
<tr class="inferred">
|
120
120
|
<td><pre><a name="line24">24</a> end</pre></td>
|
@@ -122,7 +122,7 @@
|
|
122
122
|
</tbody>
|
123
123
|
</table>
|
124
124
|
|
125
|
-
<p>Generated on 2017-01-31
|
125
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
126
126
|
|
127
127
|
</body>
|
128
128
|
</html>
|
@@ -311,7 +311,7 @@
|
|
311
311
|
</tbody>
|
312
312
|
</table>
|
313
313
|
|
314
|
-
<p>Generated on 2017-01-31
|
314
|
+
<p>Generated on 2017-01-31 15:21:16 -0200 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
|
315
315
|
|
316
316
|
</body>
|
317
317
|
</html>
|