friendly-cukes 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +14 -0
  3. data/DETAILED_DESCRIPTION.md +235 -0
  4. data/Gemfile +17 -0
  5. data/LICENSE.txt +22 -0
  6. data/README.md +108 -0
  7. data/Rakefile +2 -0
  8. data/bin/build-extractor +69 -0
  9. data/bin/friendly-cukes +48 -0
  10. data/friendly-cukes.gemspec +41 -0
  11. data/lib/friendly/build_extractor.rb +647 -0
  12. data/lib/friendly/cukes.rb +29 -0
  13. data/lib/friendly/cukes/framework/Gemfile +16 -0
  14. data/lib/friendly/cukes/framework/Gemfile.lock +113 -0
  15. data/lib/friendly/cukes/framework/Rakefile.rb +19 -0
  16. data/lib/friendly/cukes/framework/config/config.yml +87 -0
  17. data/lib/friendly/cukes/framework/config/cucumber.yml +49 -0
  18. data/lib/friendly/cukes/framework/coverage/.last_run.json +5 -0
  19. data/lib/friendly/cukes/framework/coverage/.resultset.json +3519 -0
  20. data/lib/friendly/cukes/framework/coverage/.resultset.json.lock +0 -0
  21. data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/jquery-1.3.2.min.js +19 -0
  22. data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/jquery.tablesorter.min.js +15 -0
  23. data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/print.css +12 -0
  24. data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/rcov.js +42 -0
  25. data/lib/friendly/cukes/framework/coverage/rcov/assets/0.2.3/screen.css +270 -0
  26. data/lib/friendly/cukes/framework/coverage/rcov/index.html +392 -0
  27. data/lib/friendly/cukes/framework/coverage/rcov/library-app_init-app_driver_rb.html +98 -0
  28. data/lib/friendly/cukes/framework/coverage/rcov/library-app_utils-data_file_names_rb.html +65 -0
  29. data/lib/friendly/cukes/framework/coverage/rcov/library-app_utils-page_utils_rb.html +533 -0
  30. data/lib/friendly/cukes/framework/coverage/rcov/library-generic-create_log_rb.html +521 -0
  31. data/lib/friendly/cukes/framework/coverage/rcov/library-generic-custom_html_report_rb.html +2522 -0
  32. data/lib/friendly/cukes/framework/coverage/rcov/library-generic-datetime_library_rb.html +296 -0
  33. data/lib/friendly/cukes/framework/coverage/rcov/library-generic-file_library_rb.html +995 -0
  34. data/lib/friendly/cukes/framework/coverage/rcov/library-generic-performance_report_rb.html +1613 -0
  35. data/lib/friendly/cukes/framework/coverage/rcov/library-generic-read_from_yml_rb.html +944 -0
  36. data/lib/friendly/cukes/framework/coverage/rcov/object_repository-desktop-gem_search_rb.html +773 -0
  37. data/lib/friendly/cukes/framework/coverage/rcov/object_repository-desktop-google_search_rb.html +230 -0
  38. data/lib/friendly/cukes/framework/coverage/rcov/object_repository-mobile-mobile_google_search_rb.html +230 -0
  39. data/lib/friendly/cukes/framework/coverage/rcov/step_definitions-desktop-gem_search_rb.html +188 -0
  40. data/lib/friendly/cukes/framework/coverage/rcov/step_definitions-desktop-google_search_steps_rb.html +167 -0
  41. data/lib/friendly/cukes/framework/coverage/rcov/step_definitions-mobile-mobile_google_search_steps_rb.html +167 -0
  42. data/lib/friendly/cukes/framework/coverage/rcov/support-browser_settings_rb.html +851 -0
  43. data/lib/friendly/cukes/framework/coverage/rcov/support-env_rb.html +242 -0
  44. data/lib/friendly/cukes/framework/coverage/rcov/support-hooks_rb.html +878 -0
  45. data/lib/friendly/cukes/framework/coverage/rcov/support-html_formatter_rb.html +230 -0
  46. data/lib/friendly/cukes/framework/features/desktop/google_search/google_search.feature +19 -0
  47. data/lib/friendly/cukes/framework/features/desktop/rubygems_search/gem_name_tc_04.yml +2 -0
  48. data/lib/friendly/cukes/framework/features/desktop/rubygems_search/gem_search.feature +37 -0
  49. data/lib/friendly/cukes/framework/features/desktop/test_data/gem_name.yml +2 -0
  50. data/lib/friendly/cukes/framework/features/mobile/google_search/mobile_google_search.feature +19 -0
  51. data/lib/friendly/cukes/framework/library/app_init/app_init.rb +13 -0
  52. data/lib/friendly/cukes/framework/library/app_utils/data_file_names.rb +2 -0
  53. data/lib/friendly/cukes/framework/library/app_utils/page_utils.rb +157 -0
  54. data/lib/friendly/cukes/framework/library/generic/app_logo_1.png +0 -0
  55. data/lib/friendly/cukes/framework/library/generic/create_log.rb +154 -0
  56. data/lib/friendly/cukes/framework/library/generic/custom_html_report.rb +852 -0
  57. data/lib/friendly/cukes/framework/library/generic/datetime_library.rb +79 -0
  58. data/lib/friendly/cukes/framework/library/generic/file_library.rb +311 -0
  59. data/lib/friendly/cukes/framework/library/generic/performance_report.rb +518 -0
  60. data/lib/friendly/cukes/framework/library/generic/read_from_yml.rb +294 -0
  61. data/lib/friendly/cukes/framework/object_repository/desktop/desktop_web_object_repo.rb +50 -0
  62. data/lib/friendly/cukes/framework/object_repository/mobile/mobile_web_object_repo.rb +22 -0
  63. data/lib/friendly/cukes/framework/page_objects/desktop/gem_search.rb +213 -0
  64. data/lib/friendly/cukes/framework/page_objects/desktop/google_search.rb +53 -0
  65. data/lib/friendly/cukes/framework/page_objects/mobile/mobile_google_search.rb +53 -0
  66. data/lib/friendly/cukes/framework/step_definitions/desktop/gem_search.rb +43 -0
  67. data/lib/friendly/cukes/framework/step_definitions/desktop/google_search_steps.rb +36 -0
  68. data/lib/friendly/cukes/framework/step_definitions/mobile/mobile_google_search_steps.rb +36 -0
  69. data/lib/friendly/cukes/framework/support/browser_settings.rb +264 -0
  70. data/lib/friendly/cukes/framework/support/env.rb +65 -0
  71. data/lib/friendly/cukes/framework/support/hooks.rb +274 -0
  72. data/lib/friendly/cukes/framework/support/html_formatter.rb +57 -0
  73. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/app_env.log +15 -0
  74. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/detailed_report/app_logo_1.png +0 -0
  75. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/detailed_report/desktop_gem_search.html +647 -0
  76. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/detailed_report/desktop_google_search.html +590 -0
  77. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/custom_report/report_home.html +593 -0
  78. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/desktop_rubygems_search.log +84 -0
  79. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/report_21_05_2015-11_04_54.html +472 -0
  80. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_33/report_21_05_2015-11_04_54.json +299 -0
  81. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/app_env.log +15 -0
  82. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/desktop_google_search.log +22 -0
  83. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/report_21_05_2015-11_03_49.html +472 -0
  84. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-11_03_37/report_21_05_2015-11_03_49.json +155 -0
  85. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/app_env.log +15 -0
  86. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/mobile_google_search.log +22 -0
  87. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/report_21_05_2015-17_29_26.html +472 -0
  88. data/lib/friendly/cukes/framework/test_result/test_report_21_05_2015-17_28_10/report_21_05_2015-17_29_26.json +143 -0
  89. data/lib/friendly/cukes/version.rb +61 -0
  90. metadata +309 -0
@@ -0,0 +1,296 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <title>library/generic/datetime_library.rb</title>
5
+ <link href="./assets/0.2.3/screen.css" media="all" rel="stylesheet" type="text/css" />
6
+ <link href="./assets/0.2.3/print.css" media="print" rel="stylesheet" type="text/css" />
7
+ <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
8
+ <script type="text/javascript" src="./assets/0.2.3/rcov.js"></script>
9
+ </head>
10
+ <body>
11
+ <h1>Cukes C0 Coverage Information - Simploco - RCov</h1>
12
+ <h2>library/generic/datetime_library.rb</h2>
13
+
14
+ <div class="report_table_wrapper">
15
+ <table class='report' id='report_table'>
16
+ <thead>
17
+ <tr>
18
+ <th class="left_align">Name</th>
19
+ <th class="right_align">Total Lines</th>
20
+ <th class="right_align">Lines of Code</th>
21
+ <th class="left_align">Total Coverage</th>
22
+ <th class="left_align">Code Coverage</th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <tr>
27
+ <td class="left_align"><a href="library-generic-datetime_library_rb.html">library/generic/datetime_library.rb</a></td>
28
+ <td class='right_align'><tt>79</tt></td>
29
+ <td class='right_align'><tt>30</tt></td>
30
+ <td class="left_align"><div class="percent_graph_legend"><tt class=''>91.14%</tt></div>
31
+ <div class="percent_graph">
32
+ <div class="covered" style="width:91px"></div>
33
+ <div class="uncovered" style="width:9px"></div>
34
+ </div></td>
35
+ <td class="left_align"><div class="percent_graph_legend"><tt class=''>76.67%</tt></div>
36
+ <div class="percent_graph">
37
+ <div class="covered" style="width:77px"></div>
38
+ <div class="uncovered" style="width:23px"></div>
39
+ </div></td>
40
+ </tr>
41
+ </tbody>
42
+ </table>
43
+ </div>
44
+
45
+ <h3>Key</h3>
46
+
47
+ <div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>
48
+
49
+ <h3>Coverage Details</h3>
50
+
51
+ <table class="details">
52
+ <tbody>
53
+ <tr class="inferred">
54
+ <td><pre><a name="line2">2</a> =begin</pre></td>
55
+ </tr>
56
+ <tr class="inferred">
57
+ <td><pre><a name="line3">3</a> *Name : DateTimeLibrary</pre></td>
58
+ </tr>
59
+ <tr class="inferred">
60
+ <td><pre><a name="line4">4</a> *Description : module that define methods for all datetime related manipulations</pre></td>
61
+ </tr>
62
+ <tr class="inferred">
63
+ <td><pre><a name="line5">5</a> *Author : Chandra sekaran</pre></td>
64
+ </tr>
65
+ <tr class="inferred">
66
+ <td><pre><a name="line6">6</a> *Creation Date : 23/08/2014</pre></td>
67
+ </tr>
68
+ <tr class="inferred">
69
+ <td><pre><a name="line7">7</a> *Updation Date :</pre></td>
70
+ </tr>
71
+ <tr class="inferred">
72
+ <td><pre><a name="line8">8</a> =end</pre></td>
73
+ </tr>
74
+ <tr class="inferred">
75
+ <td><pre><a name="line9">9</a> </pre></td>
76
+ </tr>
77
+ <tr class="marked">
78
+ <td><pre><a name="line10">10</a> module CUKES</pre></td>
79
+ </tr>
80
+ <tr class="marked">
81
+ <td><pre><a name="line11">11</a> module DateTimeLibrary</pre></td>
82
+ </tr>
83
+ <tr class="inferred">
84
+ <td><pre><a name="line12">12</a> </pre></td>
85
+ </tr>
86
+ <tr class="inferred">
87
+ <td><pre><a name="line13">13</a> # Description : returns the current system time (datetime format)</pre></td>
88
+ </tr>
89
+ <tr class="inferred">
90
+ <td><pre><a name="line14">14</a> # Author : Chandra sekaran</pre></td>
91
+ </tr>
92
+ <tr class="inferred">
93
+ <td><pre><a name="line15">15</a> #</pre></td>
94
+ </tr>
95
+ <tr class="marked">
96
+ <td><pre><a name="line16">16</a> def get_current_datetime</pre></td>
97
+ </tr>
98
+ <tr class="marked">
99
+ <td><pre><a name="line17">17</a> Time.now</pre></td>
100
+ </tr>
101
+ <tr class="inferred">
102
+ <td><pre><a name="line18">18</a> rescue Exception =&gt; ex</pre></td>
103
+ </tr>
104
+ <tr class="uncovered">
105
+ <td><pre><a name="line19">19</a> $log.error(&quot;Error in getting current time : #{ex}&quot;)</pre></td>
106
+ </tr>
107
+ <tr class="uncovered">
108
+ <td><pre><a name="line20">20</a> exit</pre></td>
109
+ </tr>
110
+ <tr class="inferred">
111
+ <td><pre><a name="line21">21</a> end</pre></td>
112
+ </tr>
113
+ <tr class="inferred">
114
+ <td><pre><a name="line22">22</a> </pre></td>
115
+ </tr>
116
+ <tr class="inferred">
117
+ <td><pre><a name="line23">23</a> # Description : returns the formatted system time (datetime format)</pre></td>
118
+ </tr>
119
+ <tr class="inferred">
120
+ <td><pre><a name="line24">24</a> # Author : Chandra sekaran</pre></td>
121
+ </tr>
122
+ <tr class="inferred">
123
+ <td><pre><a name="line25">25</a> # Arguments :</pre></td>
124
+ </tr>
125
+ <tr class="inferred">
126
+ <td><pre><a name="line26">26</a> # date_time : datetime value that has to be formatted</pre></td>
127
+ </tr>
128
+ <tr class="inferred">
129
+ <td><pre><a name="line27">27</a> #</pre></td>
130
+ </tr>
131
+ <tr class="marked">
132
+ <td><pre><a name="line28">28</a> def get_formatted_datetime(date_time)</pre></td>
133
+ </tr>
134
+ <tr class="marked">
135
+ <td><pre><a name="line29">29</a> date_time.strftime(DATETIME_FORMAT)</pre></td>
136
+ </tr>
137
+ <tr class="inferred">
138
+ <td><pre><a name="line30">30</a> rescue Exception =&gt; ex</pre></td>
139
+ </tr>
140
+ <tr class="uncovered">
141
+ <td><pre><a name="line31">31</a> $log.error(&quot;Error in getting formatted time : #{ex}&quot;)</pre></td>
142
+ </tr>
143
+ <tr class="inferred">
144
+ <td><pre><a name="line32">32</a> #exit</pre></td>
145
+ </tr>
146
+ <tr class="inferred">
147
+ <td><pre><a name="line33">33</a> end</pre></td>
148
+ </tr>
149
+ <tr class="inferred">
150
+ <td><pre><a name="line34">34</a> </pre></td>
151
+ </tr>
152
+ <tr class="inferred">
153
+ <td><pre><a name="line35">35</a> # Description : returns the difference between two dates in Hours:Minutes:Seconds string</pre></td>
154
+ </tr>
155
+ <tr class="inferred">
156
+ <td><pre><a name="line36">36</a> # Author : Chandra sekaran</pre></td>
157
+ </tr>
158
+ <tr class="inferred">
159
+ <td><pre><a name="line37">37</a> # Arguments :</pre></td>
160
+ </tr>
161
+ <tr class="inferred">
162
+ <td><pre><a name="line38">38</a> # start_date : datetime value for start time</pre></td>
163
+ </tr>
164
+ <tr class="inferred">
165
+ <td><pre><a name="line39">39</a> # end_date : datetime value for end time</pre></td>
166
+ </tr>
167
+ <tr class="inferred">
168
+ <td><pre><a name="line40">40</a> #</pre></td>
169
+ </tr>
170
+ <tr class="marked">
171
+ <td><pre><a name="line41">41</a> def get_datetime_diff(start_time, end_time)</pre></td>
172
+ </tr>
173
+ <tr class="marked">
174
+ <td><pre><a name="line42">42</a> num_difference = end_time.to_i - start_time.to_i</pre></td>
175
+ </tr>
176
+ <tr class="marked">
177
+ <td><pre><a name="line43">43</a> num_seconds = num_difference % 60 # get seconds</pre></td>
178
+ </tr>
179
+ <tr class="marked">
180
+ <td><pre><a name="line44">44</a> num_difference = (num_difference - num_seconds) / 60</pre></td>
181
+ </tr>
182
+ <tr class="marked">
183
+ <td><pre><a name="line45">45</a> num_minutes = num_difference % 60 # get minutes</pre></td>
184
+ </tr>
185
+ <tr class="marked">
186
+ <td><pre><a name="line46">46</a> num_difference = (num_difference - num_minutes) / 60</pre></td>
187
+ </tr>
188
+ <tr class="marked">
189
+ <td><pre><a name="line47">47</a> num_hours = num_difference % 24 # get hours</pre></td>
190
+ </tr>
191
+ <tr class="marked">
192
+ <td><pre><a name="line48">48</a> num_difference = (num_difference - num_hours) / 24</pre></td>
193
+ </tr>
194
+ <tr class="marked">
195
+ <td><pre><a name="line49">49</a> num_days = num_difference % 7 # get days</pre></td>
196
+ </tr>
197
+ <tr class="inferred">
198
+ <td><pre><a name="line50">50</a> # num_weeks = (num_difference - num_days) / 7</pre></td>
199
+ </tr>
200
+ <tr class="inferred">
201
+ <td><pre><a name="line51">51</a> </pre></td>
202
+ </tr>
203
+ <tr class="marked">
204
+ <td><pre><a name="line52">52</a> if num_days &gt; 0</pre></td>
205
+ </tr>
206
+ <tr class="uncovered">
207
+ <td><pre><a name="line53">53</a> return &quot;#{num_days}:#{num_hours}:#{num_minutes}:#{num_seconds}&quot;</pre></td>
208
+ </tr>
209
+ <tr class="inferred">
210
+ <td><pre><a name="line54">54</a> else</pre></td>
211
+ </tr>
212
+ <tr class="marked">
213
+ <td><pre><a name="line55">55</a> return &quot;#{num_hours}:#{num_minutes}:#{num_seconds}&quot;</pre></td>
214
+ </tr>
215
+ <tr class="inferred">
216
+ <td><pre><a name="line56">56</a> end</pre></td>
217
+ </tr>
218
+ <tr class="inferred">
219
+ <td><pre><a name="line57">57</a> rescue Exception =&gt; ex</pre></td>
220
+ </tr>
221
+ <tr class="uncovered">
222
+ <td><pre><a name="line58">58</a> $log.error(&quot;Error in getting datetime difference : #{ex}&quot;)</pre></td>
223
+ </tr>
224
+ <tr class="inferred">
225
+ <td><pre><a name="line59">59</a> #exit</pre></td>
226
+ </tr>
227
+ <tr class="inferred">
228
+ <td><pre><a name="line60">60</a> end</pre></td>
229
+ </tr>
230
+ <tr class="inferred">
231
+ <td><pre><a name="line61">61</a> </pre></td>
232
+ </tr>
233
+ <tr class="inferred">
234
+ <td><pre><a name="line62">62</a> # Description : converts nanoseconds into DD:HH:MM:SS time format</pre></td>
235
+ </tr>
236
+ <tr class="inferred">
237
+ <td><pre><a name="line63">63</a> # Author : Chandra sekaran</pre></td>
238
+ </tr>
239
+ <tr class="inferred">
240
+ <td><pre><a name="line64">64</a> # Argument :</pre></td>
241
+ </tr>
242
+ <tr class="inferred">
243
+ <td><pre><a name="line65">65</a> # num_nanoseconds : datetime value for start time</pre></td>
244
+ </tr>
245
+ <tr class="inferred">
246
+ <td><pre><a name="line66">66</a> # Return Argument : time in DD:HH:MM:SS as string</pre></td>
247
+ </tr>
248
+ <tr class="inferred">
249
+ <td><pre><a name="line67">67</a> #</pre></td>
250
+ </tr>
251
+ <tr class="marked">
252
+ <td><pre><a name="line68">68</a> def format_nonoseconds_to_time(num_nanoseconds)</pre></td>
253
+ </tr>
254
+ <tr class="marked">
255
+ <td><pre><a name="line69">69</a> hours = num_nanoseconds/3.6E+12</pre></td>
256
+ </tr>
257
+ <tr class="marked">
258
+ <td><pre><a name="line70">70</a> minutes = hours*60%60</pre></td>
259
+ </tr>
260
+ <tr class="marked">
261
+ <td><pre><a name="line71">71</a> seconds = (hours*3600%60).round</pre></td>
262
+ </tr>
263
+ <tr class="marked">
264
+ <td><pre><a name="line72">72</a> days = hours.to_i/24</pre></td>
265
+ </tr>
266
+ <tr class="marked">
267
+ <td><pre><a name="line73">73</a> &quot;#{days.to_i}:#{(hours.to_i%24).to_i}:#{minutes.to_i}:#{seconds}&quot; # returns time in DD:HH:MM:SS format</pre></td>
268
+ </tr>
269
+ <tr class="inferred">
270
+ <td><pre><a name="line74">74</a> rescue Exception =&gt; ex</pre></td>
271
+ </tr>
272
+ <tr class="uncovered">
273
+ <td><pre><a name="line75">75</a> $log.error(&quot;Error in converting nanoseconds (#{num_nanoseconds}) to time : #{ex}&quot;)</pre></td>
274
+ </tr>
275
+ <tr class="uncovered">
276
+ <td><pre><a name="line76">76</a> exit</pre></td>
277
+ </tr>
278
+ <tr class="inferred">
279
+ <td><pre><a name="line77">77</a> end</pre></td>
280
+ </tr>
281
+ <tr class="inferred">
282
+ <td><pre><a name="line78">78</a> </pre></td>
283
+ </tr>
284
+ <tr class="inferred">
285
+ <td><pre><a name="line79">79</a> end</pre></td>
286
+ </tr>
287
+ <tr class="inferred">
288
+ <td><pre><a name="line80">80</a> end</pre></td>
289
+ </tr>
290
+ </tbody>
291
+ </table>
292
+
293
+ <p>Generated on 2015-05-08 10:40:30 +0530 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
294
+
295
+ </body>
296
+ </html>
@@ -0,0 +1,995 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+ <html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <title>library/generic/file_library.rb</title>
5
+ <link href="./assets/0.2.3/screen.css" media="all" rel="stylesheet" type="text/css" />
6
+ <link href="./assets/0.2.3/print.css" media="print" rel="stylesheet" type="text/css" />
7
+ <meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
8
+ <script type="text/javascript" src="./assets/0.2.3/rcov.js"></script>
9
+ </head>
10
+ <body>
11
+ <h1>Cukes C0 Coverage Information - Simploco - RCov</h1>
12
+ <h2>library/generic/file_library.rb</h2>
13
+
14
+ <div class="report_table_wrapper">
15
+ <table class='report' id='report_table'>
16
+ <thead>
17
+ <tr>
18
+ <th class="left_align">Name</th>
19
+ <th class="right_align">Total Lines</th>
20
+ <th class="right_align">Lines of Code</th>
21
+ <th class="left_align">Total Coverage</th>
22
+ <th class="left_align">Code Coverage</th>
23
+ </tr>
24
+ </thead>
25
+ <tbody>
26
+ <tr>
27
+ <td class="left_align"><a href="library-generic-file_library_rb.html">library/generic/file_library.rb</a></td>
28
+ <td class='right_align'><tt>312</tt></td>
29
+ <td class='right_align'><tt>132</tt></td>
30
+ <td class="left_align"><div class="percent_graph_legend"><tt class=''>73.08%</tt></div>
31
+ <div class="percent_graph">
32
+ <div class="covered" style="width:73px"></div>
33
+ <div class="uncovered" style="width:27px"></div>
34
+ </div></td>
35
+ <td class="left_align"><div class="percent_graph_legend"><tt class=''>36.36%</tt></div>
36
+ <div class="percent_graph">
37
+ <div class="covered" style="width:36px"></div>
38
+ <div class="uncovered" style="width:64px"></div>
39
+ </div></td>
40
+ </tr>
41
+ </tbody>
42
+ </table>
43
+ </div>
44
+
45
+ <h3>Key</h3>
46
+
47
+ <div class="key"><pre><span class='marked'>Code reported as executed by Ruby looks like this...</span><span class='marked1'>and this: this line is also marked as covered.</span><span class='inferred'>Lines considered as run by rcov, but not reported by Ruby, look like this,</span><span class='inferred1'>and this: these lines were inferred by rcov (using simple heuristics).</span><span class='uncovered'>Finally, here's a line marked as not executed.</span></pre></div>
48
+
49
+ <h3>Coverage Details</h3>
50
+
51
+ <table class="details">
52
+ <tbody>
53
+ <tr class="inferred">
54
+ <td><pre><a name="line2">2</a> =begin</pre></td>
55
+ </tr>
56
+ <tr class="inferred">
57
+ <td><pre><a name="line3">3</a> *Name : FileLibrary</pre></td>
58
+ </tr>
59
+ <tr class="inferred">
60
+ <td><pre><a name="line4">4</a> *Description : class that define methods for file related manipulations</pre></td>
61
+ </tr>
62
+ <tr class="inferred">
63
+ <td><pre><a name="line5">5</a> *Author : Chandra sekaran</pre></td>
64
+ </tr>
65
+ <tr class="inferred">
66
+ <td><pre><a name="line6">6</a> *Creation Date : 23/08/2014</pre></td>
67
+ </tr>
68
+ <tr class="inferred">
69
+ <td><pre><a name="line7">7</a> *Updation Date :</pre></td>
70
+ </tr>
71
+ <tr class="inferred">
72
+ <td><pre><a name="line8">8</a> =end</pre></td>
73
+ </tr>
74
+ <tr class="inferred">
75
+ <td><pre><a name="line9">9</a> </pre></td>
76
+ </tr>
77
+ <tr class="marked">
78
+ <td><pre><a name="line10">10</a> module CUKES</pre></td>
79
+ </tr>
80
+ <tr class="marked">
81
+ <td><pre><a name="line11">11</a> module FileLibrary</pre></td>
82
+ </tr>
83
+ <tr class="marked">
84
+ <td><pre><a name="line12">12</a> include DataMagic</pre></td>
85
+ </tr>
86
+ <tr class="inferred">
87
+ <td><pre><a name="line13">13</a> </pre></td>
88
+ </tr>
89
+ <tr class="inferred">
90
+ <td><pre><a name="line14">14</a> # Description : checks for file existance and returns the boolean result</pre></td>
91
+ </tr>
92
+ <tr class="inferred">
93
+ <td><pre><a name="line15">15</a> # Author : Chandra sekaran</pre></td>
94
+ </tr>
95
+ <tr class="inferred">
96
+ <td><pre><a name="line16">16</a> # Arguments :</pre></td>
97
+ </tr>
98
+ <tr class="inferred">
99
+ <td><pre><a name="line17">17</a> # str_file_path : absolute path of file</pre></td>
100
+ </tr>
101
+ <tr class="inferred">
102
+ <td><pre><a name="line18">18</a> # Return values :</pre></td>
103
+ </tr>
104
+ <tr class="inferred">
105
+ <td><pre><a name="line19">19</a> # bool_file : boolean variable that hold the result of the file existence</pre></td>
106
+ </tr>
107
+ <tr class="inferred">
108
+ <td><pre><a name="line20">20</a> #</pre></td>
109
+ </tr>
110
+ <tr class="marked">
111
+ <td><pre><a name="line21">21</a> def is_file_exists(str_file_path)</pre></td>
112
+ </tr>
113
+ <tr class="marked">
114
+ <td><pre><a name="line22">22</a> bool_file = File.exists?(str_file_path)#get_absolute_path(str_file_name) )</pre></td>
115
+ </tr>
116
+ <tr class="marked">
117
+ <td><pre><a name="line23">23</a> bool_file</pre></td>
118
+ </tr>
119
+ <tr class="inferred">
120
+ <td><pre><a name="line24">24</a> rescue Exception =&gt; ex</pre></td>
121
+ </tr>
122
+ <tr class="uncovered">
123
+ <td><pre><a name="line25">25</a> $log.error(&quot;Error while checking for existence of #{str_file_path} : #{ex}&quot;)</pre></td>
124
+ </tr>
125
+ <tr class="uncovered">
126
+ <td><pre><a name="line26">26</a> exit</pre></td>
127
+ </tr>
128
+ <tr class="inferred">
129
+ <td><pre><a name="line27">27</a> end</pre></td>
130
+ </tr>
131
+ <tr class="inferred">
132
+ <td><pre><a name="line28">28</a> </pre></td>
133
+ </tr>
134
+ <tr class="inferred">
135
+ <td><pre><a name="line29">29</a> # Description : opens the yml file</pre></td>
136
+ </tr>
137
+ <tr class="inferred">
138
+ <td><pre><a name="line30">30</a> # Author : Chandra sekaran</pre></td>
139
+ </tr>
140
+ <tr class="inferred">
141
+ <td><pre><a name="line31">31</a> # Arguments :</pre></td>
142
+ </tr>
143
+ <tr class="inferred">
144
+ <td><pre><a name="line32">32</a> # str_file_path : absolute path of yml file</pre></td>
145
+ </tr>
146
+ <tr class="inferred">
147
+ <td><pre><a name="line33">33</a> # Return values :</pre></td>
148
+ </tr>
149
+ <tr class="inferred">
150
+ <td><pre><a name="line34">34</a> # obj_file : hash value of the yml file content</pre></td>
151
+ </tr>
152
+ <tr class="inferred">
153
+ <td><pre><a name="line35">35</a> #</pre></td>
154
+ </tr>
155
+ <tr class="marked">
156
+ <td><pre><a name="line36">36</a> def open_yml_file(str_file_path)</pre></td>
157
+ </tr>
158
+ <tr class="marked">
159
+ <td><pre><a name="line37">37</a> obj_file = YAML.load_file(File.open(str_file_path)) #get_absolute_path(str_file_name)) # obj_file = YAML.load_file(format_filepath(str_file_name))</pre></td>
160
+ </tr>
161
+ <tr class="marked">
162
+ <td><pre><a name="line38">38</a> obj_file</pre></td>
163
+ </tr>
164
+ <tr class="inferred">
165
+ <td><pre><a name="line39">39</a> rescue Exception =&gt; ex</pre></td>
166
+ </tr>
167
+ <tr class="uncovered">
168
+ <td><pre><a name="line40">40</a> $log.error(&quot;Error while opening #{str_file_path} : #{ex}&quot;)</pre></td>
169
+ </tr>
170
+ <tr class="uncovered">
171
+ <td><pre><a name="line41">41</a> exit</pre></td>
172
+ </tr>
173
+ <tr class="inferred">
174
+ <td><pre><a name="line42">42</a> end</pre></td>
175
+ </tr>
176
+ <tr class="inferred">
177
+ <td><pre><a name="line43">43</a> </pre></td>
178
+ </tr>
179
+ <tr class="inferred">
180
+ <td><pre><a name="line44">44</a> # Description : opens the excel file</pre></td>
181
+ </tr>
182
+ <tr class="inferred">
183
+ <td><pre><a name="line45">45</a> # Author : Chandra sekaran</pre></td>
184
+ </tr>
185
+ <tr class="inferred">
186
+ <td><pre><a name="line46">46</a> # Arguments :</pre></td>
187
+ </tr>
188
+ <tr class="inferred">
189
+ <td><pre><a name="line47">47</a> # str_file_name : absolute path of excel file</pre></td>
190
+ </tr>
191
+ <tr class="inferred">
192
+ <td><pre><a name="line48">48</a> # Return values :</pre></td>
193
+ </tr>
194
+ <tr class="inferred">
195
+ <td><pre><a name="line49">49</a> # obj_file : file object of the workbook</pre></td>
196
+ </tr>
197
+ <tr class="inferred">
198
+ <td><pre><a name="line50">50</a> #</pre></td>
199
+ </tr>
200
+ <tr class="marked">
201
+ <td><pre><a name="line51">51</a> def open_excel_file(str_file_name)</pre></td>
202
+ </tr>
203
+ <tr class="uncovered">
204
+ <td><pre><a name="line52">52</a> Spreadsheet.client_encoding = &#39;UTF-8&#39;</pre></td>
205
+ </tr>
206
+ <tr class="uncovered">
207
+ <td><pre><a name="line53">53</a> obj_file = Spreadsheet.open(get_absolute_path(str_file_name))</pre></td>
208
+ </tr>
209
+ <tr class="uncovered">
210
+ <td><pre><a name="line54">54</a> $log.success(&quot;File #{str_file_name} opened successfully.&quot;)</pre></td>
211
+ </tr>
212
+ <tr class="uncovered">
213
+ <td><pre><a name="line55">55</a> obj_file</pre></td>
214
+ </tr>
215
+ <tr class="inferred">
216
+ <td><pre><a name="line56">56</a> rescue Exception =&gt; ex</pre></td>
217
+ </tr>
218
+ <tr class="uncovered">
219
+ <td><pre><a name="line57">57</a> $log.error(&quot;Error while opening #{str_file_name} : #{ex}&quot;)</pre></td>
220
+ </tr>
221
+ <tr class="uncovered">
222
+ <td><pre><a name="line58">58</a> exit</pre></td>
223
+ </tr>
224
+ <tr class="inferred">
225
+ <td><pre><a name="line59">59</a> end</pre></td>
226
+ </tr>
227
+ <tr class="inferred">
228
+ <td><pre><a name="line60">60</a> </pre></td>
229
+ </tr>
230
+ <tr class="inferred">
231
+ <td><pre><a name="line61">61</a> # Description : closes the given file object</pre></td>
232
+ </tr>
233
+ <tr class="inferred">
234
+ <td><pre><a name="line62">62</a> # Author : Chandra sekaran</pre></td>
235
+ </tr>
236
+ <tr class="inferred">
237
+ <td><pre><a name="line63">63</a> # Arguments :</pre></td>
238
+ </tr>
239
+ <tr class="inferred">
240
+ <td><pre><a name="line64">64</a> # file_object : object of the file to be closed</pre></td>
241
+ </tr>
242
+ <tr class="inferred">
243
+ <td><pre><a name="line65">65</a> #</pre></td>
244
+ </tr>
245
+ <tr class="marked">
246
+ <td><pre><a name="line66">66</a> def close_file(file_object)</pre></td>
247
+ </tr>
248
+ <tr class="uncovered">
249
+ <td><pre><a name="line67">67</a> file_object.close</pre></td>
250
+ </tr>
251
+ <tr class="inferred">
252
+ <td><pre><a name="line68">68</a> #$log.success(&quot;File #{file_object} closed successfully.&quot;)</pre></td>
253
+ </tr>
254
+ <tr class="inferred">
255
+ <td><pre><a name="line69">69</a> rescue Exception =&gt; ex</pre></td>
256
+ </tr>
257
+ <tr class="inferred">
258
+ <td><pre><a name="line70">70</a> #file_object = nil</pre></td>
259
+ </tr>
260
+ <tr class="uncovered">
261
+ <td><pre><a name="line71">71</a> $log.error(&quot;Error while closing #{file_object} : #{ex}&quot;)</pre></td>
262
+ </tr>
263
+ <tr class="uncovered">
264
+ <td><pre><a name="line72">72</a> exit</pre></td>
265
+ </tr>
266
+ <tr class="inferred">
267
+ <td><pre><a name="line73">73</a> end</pre></td>
268
+ </tr>
269
+ <tr class="inferred">
270
+ <td><pre><a name="line74">74</a> </pre></td>
271
+ </tr>
272
+ <tr class="inferred">
273
+ <td><pre><a name="line75">75</a> # Description : creates a new directory under the given path</pre></td>
274
+ </tr>
275
+ <tr class="inferred">
276
+ <td><pre><a name="line76">76</a> # Author : Chandra sekaran</pre></td>
277
+ </tr>
278
+ <tr class="inferred">
279
+ <td><pre><a name="line77">77</a> # Arguments :</pre></td>
280
+ </tr>
281
+ <tr class="inferred">
282
+ <td><pre><a name="line78">78</a> # str_directory_path : absolute path of directory</pre></td>
283
+ </tr>
284
+ <tr class="inferred">
285
+ <td><pre><a name="line79">79</a> #</pre></td>
286
+ </tr>
287
+ <tr class="marked">
288
+ <td><pre><a name="line80">80</a> def create_directory(str_directory_path)</pre></td>
289
+ </tr>
290
+ <tr class="marked">
291
+ <td><pre><a name="line81">81</a> unless File.directory?(str_directory_path)</pre></td>
292
+ </tr>
293
+ <tr class="marked">
294
+ <td><pre><a name="line82">82</a> FileUtils.mkdir_p(str_directory_path)</pre></td>
295
+ </tr>
296
+ <tr class="inferred">
297
+ <td><pre><a name="line83">83</a> end</pre></td>
298
+ </tr>
299
+ <tr class="inferred">
300
+ <td><pre><a name="line84">84</a> #$log.success(&quot;New directory created : #{str_directory_path}&quot;)</pre></td>
301
+ </tr>
302
+ <tr class="inferred">
303
+ <td><pre><a name="line85">85</a> rescue Exception =&gt; ex</pre></td>
304
+ </tr>
305
+ <tr class="uncovered">
306
+ <td><pre><a name="line86">86</a> $log.error(&quot;Error in creating directory #{str_directory_path} : #{ex}&quot;)</pre></td>
307
+ </tr>
308
+ <tr class="uncovered">
309
+ <td><pre><a name="line87">87</a> exit</pre></td>
310
+ </tr>
311
+ <tr class="inferred">
312
+ <td><pre><a name="line88">88</a> end</pre></td>
313
+ </tr>
314
+ <tr class="inferred">
315
+ <td><pre><a name="line89">89</a> </pre></td>
316
+ </tr>
317
+ <tr class="inferred">
318
+ <td><pre><a name="line90">90</a> # Description : deletes an object</pre></td>
319
+ </tr>
320
+ <tr class="inferred">
321
+ <td><pre><a name="line91">91</a> # Author : Chandra sekaran</pre></td>
322
+ </tr>
323
+ <tr class="inferred">
324
+ <td><pre><a name="line92">92</a> # Arguments :</pre></td>
325
+ </tr>
326
+ <tr class="inferred">
327
+ <td><pre><a name="line93">93</a> # object : object to be deleted</pre></td>
328
+ </tr>
329
+ <tr class="inferred">
330
+ <td><pre><a name="line94">94</a> #</pre></td>
331
+ </tr>
332
+ <tr class="marked">
333
+ <td><pre><a name="line95">95</a> def self.delete_object(object)</pre></td>
334
+ </tr>
335
+ <tr class="uncovered">
336
+ <td><pre><a name="line96">96</a> object = nil</pre></td>
337
+ </tr>
338
+ <tr class="inferred">
339
+ <td><pre><a name="line97">97</a> end</pre></td>
340
+ </tr>
341
+ <tr class="inferred">
342
+ <td><pre><a name="line98">98</a> </pre></td>
343
+ </tr>
344
+ <tr class="inferred">
345
+ <td><pre><a name="line99">99</a> # Description : extracts the features module and submodule names from a given file path</pre></td>
346
+ </tr>
347
+ <tr class="inferred">
348
+ <td><pre><a name="line100">100</a> # Author : Chandra sekaran</pre></td>
349
+ </tr>
350
+ <tr class="inferred">
351
+ <td><pre><a name="line101">101</a> # Arguments :</pre></td>
352
+ </tr>
353
+ <tr class="inferred">
354
+ <td><pre><a name="line102">102</a> # str_file_path : absolute path of the feature file</pre></td>
355
+ </tr>
356
+ <tr class="inferred">
357
+ <td><pre><a name="line103">103</a> # Return value :</pre></td>
358
+ </tr>
359
+ <tr class="inferred">
360
+ <td><pre><a name="line104">104</a> # str_feature_dir: string value of module/submodule name</pre></td>
361
+ </tr>
362
+ <tr class="inferred">
363
+ <td><pre><a name="line105">105</a> #</pre></td>
364
+ </tr>
365
+ <tr class="marked">
366
+ <td><pre><a name="line106">106</a> def get_feature_module_name(str_file_path)</pre></td>
367
+ </tr>
368
+ <tr class="marked">
369
+ <td><pre><a name="line107">107</a> str_file_path = format_file_path(str_file_path)</pre></td>
370
+ </tr>
371
+ <tr class="marked">
372
+ <td><pre><a name="line108">108</a> str_file_path = str_file_path.split(&quot;features/&quot;).last # extracts all strings after &#39;features\&#39;</pre></td>
373
+ </tr>
374
+ <tr class="inferred">
375
+ <td><pre><a name="line109">109</a> #puts str_file_path</pre></td>
376
+ </tr>
377
+ <tr class="marked">
378
+ <td><pre><a name="line110">110</a> arr_file_dirs = str_file_path.split(&quot;/&quot;) # split the strings into array based on &#39;\&#39;</pre></td>
379
+ </tr>
380
+ <tr class="marked">
381
+ <td><pre><a name="line111">111</a> str_feature_dir = &quot;&quot;</pre></td>
382
+ </tr>
383
+ <tr class="inferred">
384
+ <td><pre><a name="line112">112</a> </pre></td>
385
+ </tr>
386
+ <tr class="marked">
387
+ <td><pre><a name="line113">113</a> arr_file_dirs.pop # removes the last element i.e., feature file</pre></td>
388
+ </tr>
389
+ <tr class="inferred">
390
+ <td><pre><a name="line114">114</a> # arr_file_dirs.pop # removes the second last element i.e., test case folder</pre></td>
391
+ </tr>
392
+ <tr class="marked">
393
+ <td><pre><a name="line115">115</a> (0..arr_file_dirs.size - 1).each do |num_counter|</pre></td>
394
+ </tr>
395
+ <tr class="marked">
396
+ <td><pre><a name="line116">116</a> str_feature_dir &lt;&lt; &quot;_&quot; if num_counter &gt; 0</pre></td>
397
+ </tr>
398
+ <tr class="marked">
399
+ <td><pre><a name="line117">117</a> str_feature_dir &lt;&lt; &quot;#{arr_file_dirs[num_counter]}&quot; # form a new string from array values</pre></td>
400
+ </tr>
401
+ <tr class="inferred">
402
+ <td><pre><a name="line118">118</a> end</pre></td>
403
+ </tr>
404
+ <tr class="marked">
405
+ <td><pre><a name="line119">119</a> str_feature_dir</pre></td>
406
+ </tr>
407
+ <tr class="inferred">
408
+ <td><pre><a name="line120">120</a> rescue Exception =&gt; ex</pre></td>
409
+ </tr>
410
+ <tr class="uncovered">
411
+ <td><pre><a name="line121">121</a> $log.error(&quot;Error in extracting features directory : #{ex}&quot;)</pre></td>
412
+ </tr>
413
+ <tr class="uncovered">
414
+ <td><pre><a name="line122">122</a> exit</pre></td>
415
+ </tr>
416
+ <tr class="inferred">
417
+ <td><pre><a name="line123">123</a> end</pre></td>
418
+ </tr>
419
+ <tr class="inferred">
420
+ <td><pre><a name="line124">124</a> </pre></td>
421
+ </tr>
422
+ <tr class="inferred">
423
+ <td><pre><a name="line125">125</a> # Description : Renames the created html/json report file and moves it to the current log directory</pre></td>
424
+ </tr>
425
+ <tr class="inferred">
426
+ <td><pre><a name="line126">126</a> # Author : Chandra sekaran</pre></td>
427
+ </tr>
428
+ <tr class="inferred">
429
+ <td><pre><a name="line127">127</a> #</pre></td>
430
+ </tr>
431
+ <tr class="marked">
432
+ <td><pre><a name="line128">128</a> def create_html_report</pre></td>
433
+ </tr>
434
+ <tr class="marked">
435
+ <td><pre><a name="line129">129</a> str_timestamp = $log_env.get_formatted_datetime($end_time)</pre></td>
436
+ </tr>
437
+ <tr class="inferred">
438
+ <td><pre><a name="line130">130</a> # rename and move html report file into current test report directory</pre></td>
439
+ </tr>
440
+ <tr class="marked">
441
+ <td><pre><a name="line131">131</a> File.rename(&quot;#{$REPORT_FILE_NAME}.html&quot;, &quot;report_#{str_timestamp}.html&quot;)</pre></td>
442
+ </tr>
443
+ <tr class="marked">
444
+ <td><pre><a name="line132">132</a> FileUtils.mv(&quot;report_#{str_timestamp}.html&quot;, $current_log_dir)</pre></td>
445
+ </tr>
446
+ <tr class="inferred">
447
+ <td><pre><a name="line133">133</a> # rename and move json report file into current test report directory</pre></td>
448
+ </tr>
449
+ <tr class="marked">
450
+ <td><pre><a name="line134">134</a> File.rename(&quot;#{$REPORT_FILE_NAME}.json&quot;, &quot;report_#{str_timestamp}.json&quot;)</pre></td>
451
+ </tr>
452
+ <tr class="marked">
453
+ <td><pre><a name="line135">135</a> FileUtils.mv(&quot;report_#{str_timestamp}.json&quot;, $current_log_dir)</pre></td>
454
+ </tr>
455
+ <tr class="marked">
456
+ <td><pre><a name="line136">136</a> $log.info(&quot;Html/JSON report files created and saved in &#39;#{$current_log_dir}&#39;&quot;)</pre></td>
457
+ </tr>
458
+ <tr class="inferred">
459
+ <td><pre><a name="line137">137</a> rescue Exception =&gt; ex</pre></td>
460
+ </tr>
461
+ <tr class="uncovered">
462
+ <td><pre><a name="line138">138</a> $log.error(&quot;Error in creating html report : #{ex}&quot;)</pre></td>
463
+ </tr>
464
+ <tr class="uncovered">
465
+ <td><pre><a name="line139">139</a> exit</pre></td>
466
+ </tr>
467
+ <tr class="inferred">
468
+ <td><pre><a name="line140">140</a> end</pre></td>
469
+ </tr>
470
+ <tr class="inferred">
471
+ <td><pre><a name="line141">141</a> </pre></td>
472
+ </tr>
473
+ <tr class="inferred">
474
+ <td><pre><a name="line142">142</a> # Description : renames all files extension under given file path</pre></td>
475
+ </tr>
476
+ <tr class="inferred">
477
+ <td><pre><a name="line143">143</a> # Author : Chandra sekaran</pre></td>
478
+ </tr>
479
+ <tr class="inferred">
480
+ <td><pre><a name="line144">144</a> # Arguments :</pre></td>
481
+ </tr>
482
+ <tr class="inferred">
483
+ <td><pre><a name="line145">145</a> # str_file_path : absolute path of file</pre></td>
484
+ </tr>
485
+ <tr class="inferred">
486
+ <td><pre><a name="line146">146</a> # str_file_type : new file extension to be created</pre></td>
487
+ </tr>
488
+ <tr class="inferred">
489
+ <td><pre><a name="line147">147</a> #</pre></td>
490
+ </tr>
491
+ <tr class="marked">
492
+ <td><pre><a name="line148">148</a> def rename_file_type(str_file_path, str_file_type)</pre></td>
493
+ </tr>
494
+ <tr class="uncovered">
495
+ <td><pre><a name="line149">149</a> Dir.glob(str_file_path).each do |file|</pre></td>
496
+ </tr>
497
+ <tr class="uncovered">
498
+ <td><pre><a name="line150">150</a> FileUtils.mv file, &quot;#{File.dirname(file)}/#{File.basename(file,&#39;.*&#39;)}.#{str_file_type}&quot;</pre></td>
499
+ </tr>
500
+ <tr class="inferred">
501
+ <td><pre><a name="line151">151</a> end</pre></td>
502
+ </tr>
503
+ <tr class="uncovered">
504
+ <td><pre><a name="line152">152</a> $log.info(&quot;File type(s) under &#39;#{str_file_path}&#39; renamed successfully to &#39;#{str_file_type}&#39;&quot;)</pre></td>
505
+ </tr>
506
+ <tr class="inferred">
507
+ <td><pre><a name="line153">153</a> rescue Exception =&gt; ex</pre></td>
508
+ </tr>
509
+ <tr class="uncovered">
510
+ <td><pre><a name="line154">154</a> $log.error(&quot;Error in renaming &#39;#{str_file_path}&#39; to type &#39;#{str_file_type}&#39;: #{ex}&quot;)</pre></td>
511
+ </tr>
512
+ <tr class="uncovered">
513
+ <td><pre><a name="line155">155</a> exit</pre></td>
514
+ </tr>
515
+ <tr class="inferred">
516
+ <td><pre><a name="line156">156</a> end</pre></td>
517
+ </tr>
518
+ <tr class="inferred">
519
+ <td><pre><a name="line157">157</a> </pre></td>
520
+ </tr>
521
+ <tr class="inferred">
522
+ <td><pre><a name="line158">158</a> # Description : get files which are all created under given file path with extension and after given timestamp</pre></td>
523
+ </tr>
524
+ <tr class="inferred">
525
+ <td><pre><a name="line159">159</a> # Author : Gomathi</pre></td>
526
+ </tr>
527
+ <tr class="inferred">
528
+ <td><pre><a name="line160">160</a> # Arguments :</pre></td>
529
+ </tr>
530
+ <tr class="inferred">
531
+ <td><pre><a name="line161">161</a> # str_file_path : absolute path of file</pre></td>
532
+ </tr>
533
+ <tr class="inferred">
534
+ <td><pre><a name="line162">162</a> # str_file_type : file extension</pre></td>
535
+ </tr>
536
+ <tr class="inferred">
537
+ <td><pre><a name="line163">163</a> # obj_time_stamp : execution start time as time object</pre></td>
538
+ </tr>
539
+ <tr class="inferred">
540
+ <td><pre><a name="line164">164</a> # Return argument :</pre></td>
541
+ </tr>
542
+ <tr class="inferred">
543
+ <td><pre><a name="line165">165</a> # arr_files : array of file path(s)</pre></td>
544
+ </tr>
545
+ <tr class="inferred">
546
+ <td><pre><a name="line166">166</a> #</pre></td>
547
+ </tr>
548
+ <tr class="marked">
549
+ <td><pre><a name="line167">167</a> def get_files_absolute_path(str_file_path, str_file_type, obj_time_stamp)</pre></td>
550
+ </tr>
551
+ <tr class="marked">
552
+ <td><pre><a name="line168">168</a> arr_abs_path = Dir[&quot;#{str_file_path}/*/*.#{str_file_type}&quot;]</pre></td>
553
+ </tr>
554
+ <tr class="marked">
555
+ <td><pre><a name="line169">169</a> arr_files = []</pre></td>
556
+ </tr>
557
+ <tr class="marked">
558
+ <td><pre><a name="line170">170</a> arr_abs_path.each do |file_path|</pre></td>
559
+ </tr>
560
+ <tr class="marked">
561
+ <td><pre><a name="line171">171</a> arr_files &lt;&lt; file_path if File.ctime(file_path) &gt; obj_time_stamp</pre></td>
562
+ </tr>
563
+ <tr class="inferred">
564
+ <td><pre><a name="line172">172</a> end</pre></td>
565
+ </tr>
566
+ <tr class="marked">
567
+ <td><pre><a name="line173">173</a> arr_files</pre></td>
568
+ </tr>
569
+ <tr class="inferred">
570
+ <td><pre><a name="line174">174</a> rescue Exception =&gt; ex</pre></td>
571
+ </tr>
572
+ <tr class="uncovered">
573
+ <td><pre><a name="line175">175</a> $log.error(&quot;Error in getting &#39;#{str_file_type}&#39; file(s) under &#39;#{str_file_path}&#39; for &#39;#{obj_time_stamp}&#39; : #{ex}&quot;)</pre></td>
574
+ </tr>
575
+ <tr class="uncovered">
576
+ <td><pre><a name="line176">176</a> exit</pre></td>
577
+ </tr>
578
+ <tr class="inferred">
579
+ <td><pre><a name="line177">177</a> end</pre></td>
580
+ </tr>
581
+ <tr class="inferred">
582
+ <td><pre><a name="line178">178</a> </pre></td>
583
+ </tr>
584
+ <tr class="inferred">
585
+ <td><pre><a name="line179">179</a> # Description : formats the file path by replacing &quot;\&quot; with &quot;/&quot;</pre></td>
586
+ </tr>
587
+ <tr class="inferred">
588
+ <td><pre><a name="line180">180</a> # Author : Chandra sekaran</pre></td>
589
+ </tr>
590
+ <tr class="inferred">
591
+ <td><pre><a name="line181">181</a> # Arguments :</pre></td>
592
+ </tr>
593
+ <tr class="inferred">
594
+ <td><pre><a name="line182">182</a> # str_fileabs_path : absolute path of file</pre></td>
595
+ </tr>
596
+ <tr class="inferred">
597
+ <td><pre><a name="line183">183</a> # Return value :</pre></td>
598
+ </tr>
599
+ <tr class="inferred">
600
+ <td><pre><a name="line184">184</a> # str_file_path : formatted absolute path of file</pre></td>
601
+ </tr>
602
+ <tr class="inferred">
603
+ <td><pre><a name="line185">185</a> #</pre></td>
604
+ </tr>
605
+ <tr class="marked">
606
+ <td><pre><a name="line186">186</a> def format_file_path(str_fileabs_path)</pre></td>
607
+ </tr>
608
+ <tr class="marked">
609
+ <td><pre><a name="line187">187</a> str_file_path = str_fileabs_path</pre></td>
610
+ </tr>
611
+ <tr class="marked">
612
+ <td><pre><a name="line188">188</a> str_file_path.each_char do |letter| # replace all the escape sequences</pre></td>
613
+ </tr>
614
+ <tr class="marked">
615
+ <td><pre><a name="line189">189</a> case letter</pre></td>
616
+ </tr>
617
+ <tr class="inferred">
618
+ <td><pre><a name="line190">190</a> when /[\a]/</pre></td>
619
+ </tr>
620
+ <tr class="uncovered">
621
+ <td><pre><a name="line191">191</a> str_file_path[letter] = &quot;/a&quot;</pre></td>
622
+ </tr>
623
+ <tr class="inferred">
624
+ <td><pre><a name="line192">192</a> when /[\e]/</pre></td>
625
+ </tr>
626
+ <tr class="uncovered">
627
+ <td><pre><a name="line193">193</a> str_file_path[letter] = &quot;/e&quot;</pre></td>
628
+ </tr>
629
+ <tr class="inferred">
630
+ <td><pre><a name="line194">194</a> when /[\b]/</pre></td>
631
+ </tr>
632
+ <tr class="uncovered">
633
+ <td><pre><a name="line195">195</a> str_file_path[letter] = &quot;/b&quot;</pre></td>
634
+ </tr>
635
+ <tr class="inferred">
636
+ <td><pre><a name="line196">196</a> when /[\cx]/</pre></td>
637
+ </tr>
638
+ <tr class="uncovered">
639
+ <td><pre><a name="line197">197</a> str_file_path[letter] = &quot;/cx&quot;</pre></td>
640
+ </tr>
641
+ <tr class="inferred">
642
+ <td><pre><a name="line198">198</a> when /[\f]/</pre></td>
643
+ </tr>
644
+ <tr class="uncovered">
645
+ <td><pre><a name="line199">199</a> str_file_path[letter] = &quot;/f&quot;</pre></td>
646
+ </tr>
647
+ <tr class="inferred">
648
+ <td><pre><a name="line200">200</a> when /[\n]/</pre></td>
649
+ </tr>
650
+ <tr class="uncovered">
651
+ <td><pre><a name="line201">201</a> str_file_path[letter] = &quot;/n&quot;</pre></td>
652
+ </tr>
653
+ <tr class="inferred">
654
+ <td><pre><a name="line202">202</a> when /[\nnn]/</pre></td>
655
+ </tr>
656
+ <tr class="inferred">
657
+ <td><pre><a name="line203">203</a> #str_file_path[letter] = &quot;/nnn&quot; # not required as \n is given</pre></td>
658
+ </tr>
659
+ <tr class="inferred">
660
+ <td><pre><a name="line204">204</a> when /[\r]/</pre></td>
661
+ </tr>
662
+ <tr class="uncovered">
663
+ <td><pre><a name="line205">205</a> str_file_path[letter] = &quot;/r&quot;</pre></td>
664
+ </tr>
665
+ <tr class="inferred">
666
+ <td><pre><a name="line206">206</a> when /[\s]/</pre></td>
667
+ </tr>
668
+ <tr class="uncovered">
669
+ <td><pre><a name="line207">207</a> str_file_path[letter] = &quot;/t&quot; # it is taking &quot;\t&quot; as &quot;\s&quot;</pre></td>
670
+ </tr>
671
+ <tr class="inferred">
672
+ <td><pre><a name="line208">208</a> when /[\t]/</pre></td>
673
+ </tr>
674
+ <tr class="uncovered">
675
+ <td><pre><a name="line209">209</a> str_file_path[letter] = &quot;/t&quot;</pre></td>
676
+ </tr>
677
+ <tr class="inferred">
678
+ <td><pre><a name="line210">210</a> when &quot;\\&quot;</pre></td>
679
+ </tr>
680
+ <tr class="marked">
681
+ <td><pre><a name="line211">211</a> str_file_path[letter] = &quot;/&quot;</pre></td>
682
+ </tr>
683
+ <tr class="inferred">
684
+ <td><pre><a name="line212">212</a> #when /[\v]/ # not required due to expression error</pre></td>
685
+ </tr>
686
+ <tr class="inferred">
687
+ <td><pre><a name="line213">213</a> #str_file_path[letter] = &quot;/v&quot; # not required due to expression error</pre></td>
688
+ </tr>
689
+ <tr class="inferred">
690
+ <td><pre><a name="line214">214</a> #when /[\x]/ # not required due to expression error</pre></td>
691
+ </tr>
692
+ <tr class="inferred">
693
+ <td><pre><a name="line215">215</a> #str_file_path[letter] = &quot;/x&quot; # not required due to expression error</pre></td>
694
+ </tr>
695
+ <tr class="inferred">
696
+ <td><pre><a name="line216">216</a> #when /[\xnn]/ # not required due to expression error</pre></td>
697
+ </tr>
698
+ <tr class="inferred">
699
+ <td><pre><a name="line217">217</a> #str_file_path[letter] = &quot;/xnn&quot; # not required due to expression error</pre></td>
700
+ </tr>
701
+ <tr class="inferred">
702
+ <td><pre><a name="line218">218</a> end</pre></td>
703
+ </tr>
704
+ <tr class="inferred">
705
+ <td><pre><a name="line219">219</a> end</pre></td>
706
+ </tr>
707
+ <tr class="marked">
708
+ <td><pre><a name="line220">220</a> return str_file_path</pre></td>
709
+ </tr>
710
+ <tr class="inferred">
711
+ <td><pre><a name="line221">221</a> rescue Exception =&gt; ex</pre></td>
712
+ </tr>
713
+ <tr class="uncovered">
714
+ <td><pre><a name="line222">222</a> $log.error(&quot;Error in formatting file path (#{str_file_path}) : #{ex}&quot;)</pre></td>
715
+ </tr>
716
+ <tr class="uncovered">
717
+ <td><pre><a name="line223">223</a> exit</pre></td>
718
+ </tr>
719
+ <tr class="inferred">
720
+ <td><pre><a name="line224">224</a> end</pre></td>
721
+ </tr>
722
+ <tr class="inferred">
723
+ <td><pre><a name="line225">225</a> </pre></td>
724
+ </tr>
725
+ <tr class="inferred">
726
+ <td><pre><a name="line226">226</a> # Description : extracts local file name and sets the directory path for DataMagic to load the data file for the current scenario/step</pre></td>
727
+ </tr>
728
+ <tr class="inferred">
729
+ <td><pre><a name="line227">227</a> # Author : Chandra sekaran</pre></td>
730
+ </tr>
731
+ <tr class="inferred">
732
+ <td><pre><a name="line228">228</a> # Arguments :</pre></td>
733
+ </tr>
734
+ <tr class="inferred">
735
+ <td><pre><a name="line229">229</a> # str_datafile_name : name of data file</pre></td>
736
+ </tr>
737
+ <tr class="inferred">
738
+ <td><pre><a name="line230">230</a> # Return value :</pre></td>
739
+ </tr>
740
+ <tr class="inferred">
741
+ <td><pre><a name="line231">231</a> # : hash of the loaded yml file</pre></td>
742
+ </tr>
743
+ <tr class="inferred">
744
+ <td><pre><a name="line232">232</a> #</pre></td>
745
+ </tr>
746
+ <tr class="marked">
747
+ <td><pre><a name="line233">233</a> def set_scenario_based_datafile(str_global_file_name)</pre></td>
748
+ </tr>
749
+ <tr class="uncovered">
750
+ <td><pre><a name="line234">234</a> str_local_file_name = str_global_file_name</pre></td>
751
+ </tr>
752
+ <tr class="uncovered">
753
+ <td><pre><a name="line235">235</a> $scenario_tags.each do |tag|</pre></td>
754
+ </tr>
755
+ <tr class="uncovered">
756
+ <td><pre><a name="line236">236</a> if tag.include? &quot;tc&quot;</pre></td>
757
+ </tr>
758
+ <tr class="uncovered">
759
+ <td><pre><a name="line237">237</a> tag_name = tag.gsub(&quot;@&quot;, &quot;_&quot;)</pre></td>
760
+ </tr>
761
+ <tr class="uncovered">
762
+ <td><pre><a name="line238">238</a> tmp = str_global_file_name.gsub(&quot;.&quot;, &quot;#{tag_name}.&quot;)</pre></td>
763
+ </tr>
764
+ <tr class="uncovered">
765
+ <td><pre><a name="line239">239</a> str_local_file_name = tmp</pre></td>
766
+ </tr>
767
+ <tr class="uncovered">
768
+ <td><pre><a name="line240">240</a> break</pre></td>
769
+ </tr>
770
+ <tr class="inferred">
771
+ <td><pre><a name="line241">241</a> end</pre></td>
772
+ </tr>
773
+ <tr class="inferred">
774
+ <td><pre><a name="line242">242</a> end</pre></td>
775
+ </tr>
776
+ <tr class="uncovered">
777
+ <td><pre><a name="line243">243</a> str_file_name = set_datafile_path(str_local_file_name, str_global_file_name)</pre></td>
778
+ </tr>
779
+ <tr class="uncovered">
780
+ <td><pre><a name="line244">244</a> DataMagic.load(str_file_name) # returns yml content as a hash</pre></td>
781
+ </tr>
782
+ <tr class="inferred">
783
+ <td><pre><a name="line245">245</a> rescue Exception =&gt; ex</pre></td>
784
+ </tr>
785
+ <tr class="uncovered">
786
+ <td><pre><a name="line246">246</a> $log.error(&quot;Error in setting scenario based data file for (#{str_global_file_name}) : #{ex}&quot;)</pre></td>
787
+ </tr>
788
+ <tr class="uncovered">
789
+ <td><pre><a name="line247">247</a> exit</pre></td>
790
+ </tr>
791
+ <tr class="inferred">
792
+ <td><pre><a name="line248">248</a> end</pre></td>
793
+ </tr>
794
+ <tr class="inferred">
795
+ <td><pre><a name="line249">249</a> </pre></td>
796
+ </tr>
797
+ <tr class="inferred">
798
+ <td><pre><a name="line250">250</a> # Description : sets the directory path for DataMagic to load the data file for the current scenario/step</pre></td>
799
+ </tr>
800
+ <tr class="inferred">
801
+ <td><pre><a name="line251">251</a> # Author : Chandra sekaran</pre></td>
802
+ </tr>
803
+ <tr class="inferred">
804
+ <td><pre><a name="line252">252</a> # Arguments :</pre></td>
805
+ </tr>
806
+ <tr class="inferred">
807
+ <td><pre><a name="line253">253</a> # str_local_file_name : name of local data file</pre></td>
808
+ </tr>
809
+ <tr class="inferred">
810
+ <td><pre><a name="line254">254</a> # str_global_file_name: name of global data file</pre></td>
811
+ </tr>
812
+ <tr class="inferred">
813
+ <td><pre><a name="line255">255</a> # Return value :</pre></td>
814
+ </tr>
815
+ <tr class="inferred">
816
+ <td><pre><a name="line256">256</a> # actual_file : name of the required file</pre></td>
817
+ </tr>
818
+ <tr class="inferred">
819
+ <td><pre><a name="line257">257</a> #</pre></td>
820
+ </tr>
821
+ <tr class="marked">
822
+ <td><pre><a name="line258">258</a> def set_datafile_path(str_local_file_name, str_global_file_name)</pre></td>
823
+ </tr>
824
+ <tr class="uncovered">
825
+ <td><pre><a name="line259">259</a> str_feature_file_path = format_file_path($str_feature_file_path)</pre></td>
826
+ </tr>
827
+ <tr class="uncovered">
828
+ <td><pre><a name="line260">260</a> arr_temp = str_feature_file_path.split(&quot;/&quot;)</pre></td>
829
+ </tr>
830
+ <tr class="uncovered">
831
+ <td><pre><a name="line261">261</a> arr_temp.pop</pre></td>
832
+ </tr>
833
+ <tr class="uncovered">
834
+ <td><pre><a name="line262">262</a> arr_temp.push(str_local_file_name)</pre></td>
835
+ </tr>
836
+ <tr class="uncovered">
837
+ <td><pre><a name="line263">263</a> str_datafile_dir = arr_temp * &quot;/&quot;</pre></td>
838
+ </tr>
839
+ <tr class="uncovered">
840
+ <td><pre><a name="line264">264</a> actual_file = &quot;&quot;</pre></td>
841
+ </tr>
842
+ <tr class="uncovered">
843
+ <td><pre><a name="line265">265</a> if File.exists?(str_datafile_dir)</pre></td>
844
+ </tr>
845
+ <tr class="uncovered">
846
+ <td><pre><a name="line266">266</a> arr_temp_dir = str_datafile_dir.split(&#39;/&#39;)</pre></td>
847
+ </tr>
848
+ <tr class="uncovered">
849
+ <td><pre><a name="line267">267</a> arr_temp_dir.pop</pre></td>
850
+ </tr>
851
+ <tr class="uncovered">
852
+ <td><pre><a name="line268">268</a> @str_temp_dir = arr_temp_dir * &quot;/&quot;</pre></td>
853
+ </tr>
854
+ <tr class="uncovered">
855
+ <td><pre><a name="line269">269</a> DataMagic.yml_directory = @str_temp_dir</pre></td>
856
+ </tr>
857
+ <tr class="uncovered">
858
+ <td><pre><a name="line270">270</a> actual_file = str_local_file_name</pre></td>
859
+ </tr>
860
+ <tr class="inferred">
861
+ <td><pre><a name="line271">271</a> else</pre></td>
862
+ </tr>
863
+ <tr class="uncovered">
864
+ <td><pre><a name="line272">272</a> arr_temp_dir = str_datafile_dir.split(&#39;/&#39;)</pre></td>
865
+ </tr>
866
+ <tr class="uncovered">
867
+ <td><pre><a name="line273">273</a> arr_temp_dir.pop</pre></td>
868
+ </tr>
869
+ <tr class="uncovered">
870
+ <td><pre><a name="line274">274</a> arr_temp_dir.pop</pre></td>
871
+ </tr>
872
+ <tr class="uncovered">
873
+ <td><pre><a name="line275">275</a> arr_temp_dir.push(&quot;test_data&quot;)</pre></td>
874
+ </tr>
875
+ <tr class="uncovered">
876
+ <td><pre><a name="line276">276</a> @str_temp_dir = arr_temp_dir * &quot;/&quot;</pre></td>
877
+ </tr>
878
+ <tr class="uncovered">
879
+ <td><pre><a name="line277">277</a> DataMagic.yml_directory = @str_temp_dir</pre></td>
880
+ </tr>
881
+ <tr class="uncovered">
882
+ <td><pre><a name="line278">278</a> actual_file = str_global_file_name</pre></td>
883
+ </tr>
884
+ <tr class="inferred">
885
+ <td><pre><a name="line279">279</a> end</pre></td>
886
+ </tr>
887
+ <tr class="uncovered">
888
+ <td><pre><a name="line280">280</a> puts &quot;Test data file successfully set to #{@str_temp_dir}&quot;</pre></td>
889
+ </tr>
890
+ <tr class="uncovered">
891
+ <td><pre><a name="line281">281</a> return actual_file</pre></td>
892
+ </tr>
893
+ <tr class="inferred">
894
+ <td><pre><a name="line282">282</a> rescue Exception =&gt; ex</pre></td>
895
+ </tr>
896
+ <tr class="uncovered">
897
+ <td><pre><a name="line283">283</a> $log.error(&quot;Error in setting data file path (#{str_local_file_name}/#{str_global_file_name}) : #{ex}&quot;)</pre></td>
898
+ </tr>
899
+ <tr class="uncovered">
900
+ <td><pre><a name="line284">284</a> exit</pre></td>
901
+ </tr>
902
+ <tr class="inferred">
903
+ <td><pre><a name="line285">285</a> end</pre></td>
904
+ </tr>
905
+ <tr class="inferred">
906
+ <td><pre><a name="line286">286</a> </pre></td>
907
+ </tr>
908
+ <tr class="inferred">
909
+ <td><pre><a name="line287">287</a> # Description : execute the kernel command</pre></td>
910
+ </tr>
911
+ <tr class="inferred">
912
+ <td><pre><a name="line288">288</a> # Author : Chandra sekaran</pre></td>
913
+ </tr>
914
+ <tr class="inferred">
915
+ <td><pre><a name="line289">289</a> # Arguments :</pre></td>
916
+ </tr>
917
+ <tr class="inferred">
918
+ <td><pre><a name="line290">290</a> # str_command : command string</pre></td>
919
+ </tr>
920
+ <tr class="inferred">
921
+ <td><pre><a name="line291">291</a> # Return value : a boolean value</pre></td>
922
+ </tr>
923
+ <tr class="inferred">
924
+ <td><pre><a name="line292">292</a> #</pre></td>
925
+ </tr>
926
+ <tr class="marked">
927
+ <td><pre><a name="line293">293</a> def execute_command(str_command)</pre></td>
928
+ </tr>
929
+ <tr class="uncovered">
930
+ <td><pre><a name="line294">294</a> str_stdout, str_stderr = &#39;&#39;, &#39;&#39;</pre></td>
931
+ </tr>
932
+ <tr class="uncovered">
933
+ <td><pre><a name="line295">295</a> Open3.popen3(str_command) do |i,o,e|</pre></td>
934
+ </tr>
935
+ <tr class="uncovered">
936
+ <td><pre><a name="line296">296</a> i.close</pre></td>
937
+ </tr>
938
+ <tr class="uncovered">
939
+ <td><pre><a name="line297">297</a> while((line = o.gets))</pre></td>
940
+ </tr>
941
+ <tr class="uncovered">
942
+ <td><pre><a name="line298">298</a> str_stdout &lt;&lt; line</pre></td>
943
+ </tr>
944
+ <tr class="inferred">
945
+ <td><pre><a name="line299">299</a> end</pre></td>
946
+ </tr>
947
+ <tr class="uncovered">
948
+ <td><pre><a name="line300">300</a> while((line = e.gets))</pre></td>
949
+ </tr>
950
+ <tr class="uncovered">
951
+ <td><pre><a name="line301">301</a> str_stderr &lt;&lt; line</pre></td>
952
+ </tr>
953
+ <tr class="inferred">
954
+ <td><pre><a name="line302">302</a> end</pre></td>
955
+ </tr>
956
+ <tr class="inferred">
957
+ <td><pre><a name="line303">303</a> end</pre></td>
958
+ </tr>
959
+ <tr class="uncovered">
960
+ <td><pre><a name="line304">304</a> $log.success(&quot;STDOUT : #{str_stdout.strip}&quot;) if !(str_stdout.nil? || str_stdout.empty?)</pre></td>
961
+ </tr>
962
+ <tr class="uncovered">
963
+ <td><pre><a name="line305">305</a> raise str_stderr.strip if !(str_stderr.nil? || str_stderr.empty?)</pre></td>
964
+ </tr>
965
+ <tr class="uncovered">
966
+ <td><pre><a name="line306">306</a> return true</pre></td>
967
+ </tr>
968
+ <tr class="inferred">
969
+ <td><pre><a name="line307">307</a> rescue Exception =&gt; ex</pre></td>
970
+ </tr>
971
+ <tr class="uncovered">
972
+ <td><pre><a name="line308">308</a> $log.error(&quot;Error while executing the command (#{str_command}) : #{ex}&quot;)</pre></td>
973
+ </tr>
974
+ <tr class="uncovered">
975
+ <td><pre><a name="line309">309</a> exit</pre></td>
976
+ </tr>
977
+ <tr class="inferred">
978
+ <td><pre><a name="line310">310</a> end</pre></td>
979
+ </tr>
980
+ <tr class="inferred">
981
+ <td><pre><a name="line311">311</a> </pre></td>
982
+ </tr>
983
+ <tr class="inferred">
984
+ <td><pre><a name="line312">312</a> end</pre></td>
985
+ </tr>
986
+ <tr class="inferred">
987
+ <td><pre><a name="line313">313</a> end</pre></td>
988
+ </tr>
989
+ </tbody>
990
+ </table>
991
+
992
+ <p>Generated on 2015-05-08 10:40:30 +0530 with <a href="https://github.com/fguillen/simplecov-rcov">SimpleCov-RCov 0.2.3</a></p>
993
+
994
+ </body>
995
+ </html>