wbookstore 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/.idea/.rakeTasks +7 -0
  3. data/.idea/current.iml +35 -0
  4. data/.idea/misc.xml +14 -0
  5. data/.idea/modules.xml +8 -0
  6. data/.idea/vcs.xml +6 -0
  7. data/.idea/workspace.xml +424 -0
  8. data/Gemfile +4 -0
  9. data/Gemfile.lock +34 -0
  10. data/RakeFile.rb +11 -0
  11. data/coverage/.last_run.json +5 -0
  12. data/coverage/.resultset.json +146 -0
  13. data/coverage/.resultset.json.lock +0 -0
  14. data/coverage/assets/0.10.0/application.css +799 -0
  15. data/coverage/assets/0.10.0/application.js +1707 -0
  16. data/coverage/assets/0.10.0/colorbox/border.png +0 -0
  17. data/coverage/assets/0.10.0/colorbox/controls.png +0 -0
  18. data/coverage/assets/0.10.0/colorbox/loading.gif +0 -0
  19. data/coverage/assets/0.10.0/colorbox/loading_background.png +0 -0
  20. data/coverage/assets/0.10.0/favicon_green.png +0 -0
  21. data/coverage/assets/0.10.0/favicon_red.png +0 -0
  22. data/coverage/assets/0.10.0/favicon_yellow.png +0 -0
  23. data/coverage/assets/0.10.0/loading.gif +0 -0
  24. data/coverage/assets/0.10.0/magnify.png +0 -0
  25. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
  26. data/coverage/assets/0.10.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
  27. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
  28. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  29. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
  30. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
  31. data/coverage/assets/0.10.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
  32. data/coverage/assets/0.10.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
  33. data/coverage/assets/0.10.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
  34. data/coverage/assets/0.10.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
  35. data/coverage/assets/0.10.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
  36. data/coverage/assets/0.10.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
  37. data/coverage/assets/0.10.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
  38. data/coverage/index.html +490 -0
  39. data/lib/BookStoreCore.rb +52 -0
  40. data/lib/bookstore.rb +95 -0
  41. data/lib/bookstore_test.rb +32 -0
  42. data/lib/fi.json +1 -0
  43. data/spec/BookStoreCore_spec.rb +38 -0
  44. data/spec/spec_helper.rb +4 -0
  45. data/wbookstore.gemspec +17 -0
  46. metadata +86 -0
Binary file
Binary file
@@ -0,0 +1,490 @@
1
+ <!DOCTYPE html>
2
+ <html xmlns='http://www.w3.org/1999/xhtml'>
3
+ <head>
4
+ <title>Code coverage for Current</title>
5
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6
+ <script src='./assets/0.10.0/application.js' type='text/javascript'></script>
7
+ <link href='./assets/0.10.0/application.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
8
+ <link rel="shortcut icon" type="image/png" href="./assets/0.10.0/favicon_yellow.png" />
9
+ <link rel="icon" type="image/png" href="./assets/0.10.0/favicon.png" />
10
+ </head>
11
+
12
+ <body>
13
+ <div id="loading">
14
+ <img src="./assets/0.10.0/loading.gif" alt="loading"/>
15
+ </div>
16
+ <div id="wrapper" style="display:none;">
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2016-08-05T16:02:08+05:00">2016-08-05T16:02:08+05:00</abbr></div>
18
+ <ul class="group_tabs"></ul>
19
+
20
+ <div id="content">
21
+ <div class="file_list_container" id="AllFiles">
22
+ <h2>
23
+ <span class="group_name">All Files</span>
24
+ (<span class="covered_percent"><span class="yellow">89.19%</span></span>
25
+ covered at
26
+ <span class="covered_strength">
27
+ <span class="green">
28
+ 2.5
29
+ </span>
30
+ </span> hits/line)
31
+ </h2>
32
+ <a name="AllFiles"></a>
33
+ <div>
34
+ <b>1</b> files in total.
35
+ <b>37</b> relevant lines.
36
+ <span class="green"><b>33</b> lines covered</span> and
37
+ <span class="red"><b>4</b> lines missed </span>
38
+ </div>
39
+ <table class="file_list">
40
+ <thead>
41
+ <tr>
42
+ <th>File</th>
43
+ <th>% covered</th>
44
+ <th>Lines</th>
45
+ <th>Relevant Lines</th>
46
+ <th>Lines covered</th>
47
+ <th>Lines missed</th>
48
+ <th>Avg. Hits / Line</th>
49
+ </tr>
50
+ </thead>
51
+ <tbody>
52
+
53
+ <tr>
54
+ <td class="strong"><a href="#303f7f77f3922f4b9ead3e89a2968f87d4fbdceb" class="src_link" title="BookStoreCore.rb">BookStoreCore.rb</a></td>
55
+ <td class="yellow strong">89.19 %</td>
56
+ <td>65</td>
57
+ <td>37</td>
58
+ <td>33</td>
59
+ <td>4</td>
60
+ <td>2.5</td>
61
+ </tr>
62
+
63
+ </tbody>
64
+ </table>
65
+ </div>
66
+
67
+
68
+
69
+ </div>
70
+
71
+ <div id="footer">
72
+ Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.12.0
73
+ and simplecov-html v0.10.0<br/>
74
+ using MiniTest, RSpec
75
+ </div>
76
+
77
+ <div class="source_files">
78
+
79
+ <div class="source_table" id="303f7f77f3922f4b9ead3e89a2968f87d4fbdceb">
80
+ <div class="header">
81
+ <h3>BookStoreCore.rb</h3>
82
+ <h4><span class="yellow">89.19 %</span> covered</h4>
83
+ <div>
84
+ <b>37</b> relevant lines.
85
+ <span class="green"><b>33</b> lines covered</span> and
86
+ <span class="red"><b>4</b> lines missed.</span>
87
+ </div>
88
+ </div>
89
+
90
+ <pre>
91
+ <ol>
92
+
93
+ <li class="covered" data-hits="2" data-linenumber="1">
94
+ <span class="hits">2</span>
95
+
96
+ <code class="ruby">require &#39;json&#39;</code>
97
+ </li>
98
+
99
+ <li class="never" data-hits="" data-linenumber="2">
100
+
101
+
102
+ <code class="ruby"></code>
103
+ </li>
104
+
105
+ <li class="covered" data-hits="2" data-linenumber="3">
106
+ <span class="hits">2</span>
107
+
108
+ <code class="ruby">class BookStoreCore</code>
109
+ </li>
110
+
111
+ <li class="never" data-hits="" data-linenumber="4">
112
+
113
+
114
+ <code class="ruby"></code>
115
+ </li>
116
+
117
+ <li class="covered" data-hits="2" data-linenumber="5">
118
+ <span class="hits">2</span>
119
+
120
+ <code class="ruby"> @@instance = BookStoreCore.new </code>
121
+ </li>
122
+
123
+ <li class="never" data-hits="" data-linenumber="6">
124
+
125
+
126
+ <code class="ruby"></code>
127
+ </li>
128
+
129
+ <li class="covered" data-hits="2" data-linenumber="7">
130
+ <span class="hits">2</span>
131
+
132
+ <code class="ruby"> def self.instance</code>
133
+ </li>
134
+
135
+ <li class="covered" data-hits="6" data-linenumber="8">
136
+ <span class="hits">6</span>
137
+
138
+ <code class="ruby"> return @@instance</code>
139
+ </li>
140
+
141
+ <li class="never" data-hits="" data-linenumber="9">
142
+
143
+
144
+ <code class="ruby"> end</code>
145
+ </li>
146
+
147
+ <li class="never" data-hits="" data-linenumber="10">
148
+
149
+
150
+ <code class="ruby"></code>
151
+ </li>
152
+
153
+ <li class="covered" data-hits="2" data-linenumber="11">
154
+ <span class="hits">2</span>
155
+
156
+ <code class="ruby"> def writef(path,bookHash)</code>
157
+ </li>
158
+
159
+ <li class="missed" data-hits="0" data-linenumber="12">
160
+
161
+
162
+ <code class="ruby"> File.open(path,&quot;w&quot;) do |f|</code>
163
+ </li>
164
+
165
+ <li class="missed" data-hits="0" data-linenumber="13">
166
+
167
+
168
+ <code class="ruby"> f.write(bookHash.to_json)</code>
169
+ </li>
170
+
171
+ <li class="never" data-hits="" data-linenumber="14">
172
+
173
+
174
+ <code class="ruby"> end</code>
175
+ </li>
176
+
177
+ <li class="never" data-hits="" data-linenumber="15">
178
+
179
+
180
+ <code class="ruby"> end</code>
181
+ </li>
182
+
183
+ <li class="never" data-hits="" data-linenumber="16">
184
+
185
+
186
+ <code class="ruby"> </code>
187
+ </li>
188
+
189
+ <li class="covered" data-hits="2" data-linenumber="17">
190
+ <span class="hits">2</span>
191
+
192
+ <code class="ruby"> def readf(path)</code>
193
+ </li>
194
+
195
+ <li class="missed" data-hits="0" data-linenumber="18">
196
+
197
+
198
+ <code class="ruby"> file = File.read(path)</code>
199
+ </li>
200
+
201
+ <li class="missed" data-hits="0" data-linenumber="19">
202
+
203
+
204
+ <code class="ruby"> JSON.parse(file)</code>
205
+ </li>
206
+
207
+ <li class="never" data-hits="" data-linenumber="20">
208
+
209
+
210
+ <code class="ruby"> end</code>
211
+ </li>
212
+
213
+ <li class="never" data-hits="" data-linenumber="21">
214
+
215
+
216
+ <code class="ruby"></code>
217
+ </li>
218
+
219
+ <li class="covered" data-hits="2" data-linenumber="22">
220
+ <span class="hits">2</span>
221
+
222
+ <code class="ruby"> def is_exist(title , bookHash )</code>
223
+ </li>
224
+
225
+ <li class="covered" data-hits="2" data-linenumber="23">
226
+ <span class="hits">2</span>
227
+
228
+ <code class="ruby"> is_exist = false</code>
229
+ </li>
230
+
231
+ <li class="covered" data-hits="2" data-linenumber="24">
232
+ <span class="hits">2</span>
233
+
234
+ <code class="ruby"> bookHash.each{ |k,v|</code>
235
+ </li>
236
+
237
+ <li class="covered" data-hits="8" data-linenumber="25">
238
+ <span class="hits">8</span>
239
+
240
+ <code class="ruby"> if k.to_s == title</code>
241
+ </li>
242
+
243
+ <li class="covered" data-hits="2" data-linenumber="26">
244
+ <span class="hits">2</span>
245
+
246
+ <code class="ruby"> is_exist=true</code>
247
+ </li>
248
+
249
+ <li class="never" data-hits="" data-linenumber="27">
250
+
251
+
252
+ <code class="ruby"> end</code>
253
+ </li>
254
+
255
+ <li class="never" data-hits="" data-linenumber="28">
256
+
257
+
258
+ <code class="ruby"> }</code>
259
+ </li>
260
+
261
+ <li class="covered" data-hits="2" data-linenumber="29">
262
+ <span class="hits">2</span>
263
+
264
+ <code class="ruby"> is_exist</code>
265
+ </li>
266
+
267
+ <li class="never" data-hits="" data-linenumber="30">
268
+
269
+
270
+ <code class="ruby"> end</code>
271
+ </li>
272
+
273
+ <li class="never" data-hits="" data-linenumber="31">
274
+
275
+
276
+ <code class="ruby"> </code>
277
+ </li>
278
+
279
+ <li class="covered" data-hits="2" data-linenumber="32">
280
+ <span class="hits">2</span>
281
+
282
+ <code class="ruby"> def add_update_book( title, rating, bookHash )</code>
283
+ </li>
284
+
285
+ <li class="covered" data-hits="2" data-linenumber="33">
286
+ <span class="hits">2</span>
287
+
288
+ <code class="ruby"> bookHash[title.to_sym] = rating.to_i</code>
289
+ </li>
290
+
291
+ <li class="covered" data-hits="2" data-linenumber="34">
292
+ <span class="hits">2</span>
293
+
294
+ <code class="ruby"> bookHash</code>
295
+ </li>
296
+
297
+ <li class="never" data-hits="" data-linenumber="35">
298
+
299
+
300
+ <code class="ruby"> end</code>
301
+ </li>
302
+
303
+ <li class="never" data-hits="" data-linenumber="36">
304
+
305
+
306
+ <code class="ruby"> </code>
307
+ </li>
308
+
309
+ <li class="covered" data-hits="2" data-linenumber="37">
310
+ <span class="hits">2</span>
311
+
312
+ <code class="ruby"> def delete_book(title , bookHash)</code>
313
+ </li>
314
+
315
+ <li class="covered" data-hits="2" data-linenumber="38">
316
+ <span class="hits">2</span>
317
+
318
+ <code class="ruby"> updated_books = {}</code>
319
+ </li>
320
+
321
+ <li class="covered" data-hits="2" data-linenumber="39">
322
+ <span class="hits">2</span>
323
+
324
+ <code class="ruby"> bookHash.each{ |k,v|</code>
325
+ </li>
326
+
327
+ <li class="covered" data-hits="8" data-linenumber="40">
328
+ <span class="hits">8</span>
329
+
330
+ <code class="ruby"> if k.to_s != title</code>
331
+ </li>
332
+
333
+ <li class="covered" data-hits="6" data-linenumber="41">
334
+ <span class="hits">6</span>
335
+
336
+ <code class="ruby"> updated_books[k]=v</code>
337
+ </li>
338
+
339
+ <li class="never" data-hits="" data-linenumber="42">
340
+
341
+
342
+ <code class="ruby"> end</code>
343
+ </li>
344
+
345
+ <li class="never" data-hits="" data-linenumber="43">
346
+
347
+
348
+ <code class="ruby"> }</code>
349
+ </li>
350
+
351
+ <li class="covered" data-hits="2" data-linenumber="44">
352
+ <span class="hits">2</span>
353
+
354
+ <code class="ruby"> updated_books</code>
355
+ </li>
356
+
357
+ <li class="never" data-hits="" data-linenumber="45">
358
+
359
+
360
+ <code class="ruby"> </code>
361
+ </li>
362
+
363
+ <li class="never" data-hits="" data-linenumber="46">
364
+
365
+
366
+ <code class="ruby"> end</code>
367
+ </li>
368
+
369
+ <li class="never" data-hits="" data-linenumber="47">
370
+
371
+
372
+ <code class="ruby"> </code>
373
+ </li>
374
+
375
+ <li class="covered" data-hits="2" data-linenumber="48">
376
+ <span class="hits">2</span>
377
+
378
+ <code class="ruby"> def get_full_title(start_chars , bookHash)</code>
379
+ </li>
380
+
381
+ <li class="covered" data-hits="2" data-linenumber="49">
382
+ <span class="hits">2</span>
383
+
384
+ <code class="ruby"> output_string = &#39;&#39;</code>
385
+ </li>
386
+
387
+ <li class="covered" data-hits="2" data-linenumber="50">
388
+ <span class="hits">2</span>
389
+
390
+ <code class="ruby"> bookHash.each { |title, rating|</code>
391
+ </li>
392
+
393
+ <li class="covered" data-hits="8" data-linenumber="51">
394
+ <span class="hits">8</span>
395
+
396
+ <code class="ruby"> output_string += &quot;#{title}&quot; if title.to_s.include? start_chars</code>
397
+ </li>
398
+
399
+ <li class="never" data-hits="" data-linenumber="52">
400
+
401
+
402
+ <code class="ruby"> }</code>
403
+ </li>
404
+
405
+ <li class="covered" data-hits="2" data-linenumber="53">
406
+ <span class="hits">2</span>
407
+
408
+ <code class="ruby"> output_string</code>
409
+ </li>
410
+
411
+ <li class="never" data-hits="" data-linenumber="54">
412
+
413
+
414
+ <code class="ruby"> end</code>
415
+ </li>
416
+
417
+ <li class="never" data-hits="" data-linenumber="55">
418
+
419
+
420
+ <code class="ruby"> </code>
421
+ </li>
422
+
423
+ <li class="covered" data-hits="2" data-linenumber="56">
424
+ <span class="hits">2</span>
425
+
426
+ <code class="ruby"> def get_all_books(bookHash)</code>
427
+ </li>
428
+
429
+ <li class="covered" data-hits="2" data-linenumber="57">
430
+ <span class="hits">2</span>
431
+
432
+ <code class="ruby"> output_string = &#39;&#39;</code>
433
+ </li>
434
+
435
+ <li class="covered" data-hits="2" data-linenumber="58">
436
+ <span class="hits">2</span>
437
+
438
+ <code class="ruby"> bookHash.each do |book, rating|</code>
439
+ </li>
440
+
441
+ <li class="covered" data-hits="2" data-linenumber="59">
442
+ <span class="hits">2</span>
443
+
444
+ <code class="ruby"> output_string += &quot;#{book} has rating #{rating}.&quot;</code>
445
+ </li>
446
+
447
+ <li class="never" data-hits="" data-linenumber="60">
448
+
449
+
450
+ <code class="ruby"> end </code>
451
+ </li>
452
+
453
+ <li class="covered" data-hits="2" data-linenumber="61">
454
+ <span class="hits">2</span>
455
+
456
+ <code class="ruby"> output_string</code>
457
+ </li>
458
+
459
+ <li class="never" data-hits="" data-linenumber="62">
460
+
461
+
462
+ <code class="ruby"> end</code>
463
+ </li>
464
+
465
+ <li class="never" data-hits="" data-linenumber="63">
466
+
467
+
468
+ <code class="ruby"> </code>
469
+ </li>
470
+
471
+ <li class="covered" data-hits="2" data-linenumber="64">
472
+ <span class="hits">2</span>
473
+
474
+ <code class="ruby"> private_class_method :new</code>
475
+ </li>
476
+
477
+ <li class="never" data-hits="" data-linenumber="65">
478
+
479
+
480
+ <code class="ruby">end</code>
481
+ </li>
482
+
483
+ </ol>
484
+ </pre>
485
+ </div>
486
+
487
+ </div>
488
+ </div>
489
+ </body>
490
+ </html>