medivo 0.2.18 → 0.2.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. data/app/controllers/medivo/labs_controller.rb +1 -0
  2. data/app/models/medivo/appointment.rb +5 -6
  3. data/lib/medivo/version.rb +1 -1
  4. data/spec/dummy/log/development.log +200 -0
  5. data/spec/dummy/tmp/cache/assets/C46/F00/sprockets%2F2281d588b540056c5a7306c32a3761b9 +0 -0
  6. data/spec/dummy/tmp/cache/assets/C53/C80/sprockets%2F9297b5f504687910109d311f03f8a7b3 +0 -0
  7. data/spec/dummy/tmp/cache/assets/C6C/8D0/sprockets%2F2f423a28516973330a94ad121151f3bf +0 -0
  8. data/spec/dummy/tmp/cache/assets/C81/D00/sprockets%2F64f056bd752d271308a86a6f865b1911 +0 -0
  9. data/spec/dummy/tmp/cache/assets/CB4/BD0/sprockets%2F3378f27c0d4f5e6d708665b22707a31f +0 -0
  10. data/spec/dummy/tmp/cache/assets/CB9/3B0/sprockets%2F367168463c7673b00086def7783ae5bb +0 -0
  11. data/spec/dummy/tmp/cache/assets/CC3/EF0/sprockets%2F453b504c1f8f374578636f699eaa455d +0 -0
  12. data/spec/dummy/tmp/cache/assets/CD5/670/sprockets%2F7f42231e2382a32f5a39dc7807f0b4d1 +0 -0
  13. data/spec/dummy/tmp/cache/assets/CD8/DA0/sprockets%2F622aa5281d15503829a5f7a0bf56fc29 +0 -0
  14. data/spec/dummy/tmp/cache/assets/CDD/820/sprockets%2Fb28231960c7ac62eff9048e702a29c70 +0 -0
  15. data/spec/dummy/tmp/cache/assets/CEC/EF0/sprockets%2F4b24a74018f693c06088bd52f8cc9f86 +0 -0
  16. data/spec/dummy/tmp/cache/assets/CEE/250/sprockets%2F96688f33f2f8aa261bf6701c1d6d7575 +0 -0
  17. data/spec/dummy/tmp/cache/assets/CF7/0D0/sprockets%2Ff6b91b7558f31378d6a71f5791eff480 +0 -0
  18. data/spec/dummy/tmp/cache/assets/D07/6B0/sprockets%2F69a2df619ff14da071309dac4196400e +0 -0
  19. data/spec/dummy/tmp/cache/assets/D20/F10/sprockets%2Fb2e907e4faa85fe755f4439e3b229088 +0 -0
  20. data/spec/dummy/tmp/cache/assets/D29/000/sprockets%2F61a10ddf57f1129c02a1049bfed6e007 +0 -0
  21. data/spec/dummy/tmp/cache/assets/D2C/F80/sprockets%2F399f6d5eb273936af7ff8f35a77c5037 +0 -0
  22. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  23. data/spec/dummy/tmp/cache/assets/D41/250/sprockets%2F7b3c4426715dcd1feedc4a95e5444256 +0 -0
  24. data/spec/dummy/tmp/cache/assets/D45/320/sprockets%2Fc50ff379a1bdf1dd4d22249058749cf6 +0 -0
  25. data/spec/dummy/tmp/cache/assets/D4C/7A0/sprockets%2Fbc635c7b186d1ef5178f4ed3722d868b +0 -0
  26. data/spec/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
  27. data/spec/dummy/tmp/cache/assets/D5D/3E0/sprockets%2F63fea6cc142b5f02da93bf81e70b2116 +0 -0
  28. data/spec/dummy/tmp/cache/assets/D60/030/sprockets%2Ffc9485f617fc5e9b8918755d2e08ecc6 +0 -0
  29. data/spec/dummy/tmp/cache/assets/D64/C50/sprockets%2F22ee6fb2ab1ea9694ac7f0f41a406094 +0 -0
  30. data/spec/dummy/tmp/cache/assets/D65/6D0/sprockets%2F3ce07ca1958d7ab3e80c4b3e0d24088c +0 -0
  31. data/spec/dummy/tmp/cache/assets/D69/130/sprockets%2Fbaa4ec50a34ce938c986612c2a47a64e +0 -0
  32. data/spec/dummy/tmp/cache/assets/D74/9A0/sprockets%2F0ca4e6e833c72156fc7e7d5f007d9ce3 +0 -0
  33. data/spec/dummy/tmp/cache/assets/D76/720/sprockets%2F88d8aa1d2fb41ce79b8ec4150ea74748 +0 -0
  34. data/spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
  35. data/spec/dummy/tmp/cache/assets/D88/2C0/sprockets%2F452ab3ebb1912cf1c2ba617eec52a718 +0 -0
  36. data/spec/dummy/tmp/cache/assets/D9C/F50/sprockets%2F224e78bb9e1c414a2d518a3aaffd6f77 +0 -0
  37. data/spec/dummy/tmp/cache/assets/D9F/260/sprockets%2Fa3e040f83c30e4bbc1c79ffae57909e6 +0 -0
  38. data/spec/dummy/tmp/cache/assets/DA1/640/sprockets%2F91874cbba5e63cd19d6a7bd3c8362dc4 +0 -0
  39. data/spec/dummy/tmp/cache/assets/DC1/230/sprockets%2F3a36cd467bdce1914a2b7af4ed4114cf +0 -0
  40. data/spec/dummy/tmp/cache/assets/DCA/B80/sprockets%2Fb4aad54185f42b1b871997ef2dc2fabb +0 -0
  41. data/spec/dummy/tmp/cache/assets/DCE/E80/sprockets%2Fc71ec62157b9cc7aabfc030955cef87b +0 -0
  42. data/spec/dummy/tmp/cache/assets/DD1/FD0/sprockets%2Fa531f33dc9c5852d39d64a9eda44dacf +0 -0
  43. data/spec/dummy/tmp/cache/assets/DD4/2B0/sprockets%2Fef214a63f29afe7f3cbffc65af943108 +0 -0
  44. data/spec/dummy/tmp/cache/assets/DFC/420/sprockets%2F502e2c683d1aaad6ac88966ffc4d2ade +0 -0
  45. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  46. data/spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4 +0 -0
  47. data/spec/dummy/tmp/pids/server.pid +1 -0
  48. data/spec/models/appointment_spec.rb +14 -7
  49. metadata +21 -19
@@ -10,6 +10,7 @@ module Medivo
10
10
  data = Medivo::Appointment.find(params[:lab_code], params[:date], params[:am_pm])
11
11
  render :json=> {times: data}
12
12
  rescue => e
13
+ p e.backtrace
13
14
  appointment_error_handler(e)
14
15
  end
15
16
 
@@ -27,8 +27,7 @@ module Medivo
27
27
  data = build_fake_data(date)
28
28
  end
29
29
  # filter the hash before returning
30
- search_date = Time.parse(date)
31
- filter_data(data, am_pm, search_date)
30
+ filter_data(data, am_pm, date.to_time)
32
31
  end
33
32
 
34
33
  ##
@@ -70,10 +69,10 @@ module Medivo
70
69
  true unless !Rails.env.test? and @config.real_data == false
71
70
  end
72
71
 
73
- def filter_data(times, am_pm, search_date)
72
+ def filter_data(times, am_pm, search_time)
74
73
  times.collect { |time| AppointmentTime.new(time) }
75
74
  .select { |at| at.match(am_pm, Time.now) }
76
- .sort_by {|at| at.nearness_to_date(search_date) }
75
+ .sort_by {|at| at.nearness_to_time(search_time) }
77
76
  .collect { |at| at.time_str }
78
77
  end
79
78
 
@@ -105,7 +104,7 @@ class AppointmentTime
105
104
  time and time_str.match(/#{am_pm}/) and (time >= current_time)
106
105
  end
107
106
 
108
- def nearness_to_date(date)
109
- (time - date).to_i.abs
107
+ def nearness_to_time(other_time)
108
+ (time - other_time).to_i.abs
110
109
  end
111
110
  end
@@ -1,3 +1,3 @@
1
1
  module Medivo
2
- VERSION = "0.2.18"
2
+ VERSION = "0.2.19"
3
3
  end
@@ -21457,3 +21457,203 @@ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&la
21457
21457
  Processing by Medivo::LabsController#find_appointment as JS
21458
21458
  Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"23021", "commit"=>"Search for appointments"}
21459
21459
  Completed 200 OK in 5182ms (Views: 4.8ms)
21460
+
21461
+
21462
+ Started GET "/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-11-16 10:37:19 -0500
21463
+ Processing by LabsController#lab_search as HTML
21464
+ Parameters: {"zip_code"=>"90210"}
21465
+ Rendered labs/search.html.haml within layouts/application (28.9ms)
21466
+ Compiled application.css (0ms) (pid 13083)
21467
+ Compiled application.js (8ms) (pid 13083)
21468
+ Compiled jquery.js (3ms) (pid 13083)
21469
+ Compiled jquery_ujs.js (0ms) (pid 13083)
21470
+ Compiled medivo/lab_list/application.js (8ms) (pid 13083)
21471
+ Compiled medivo/handlebars.js (0ms) (pid 13083)
21472
+ Compiled medivo/helpers.js (173ms) (pid 13083)
21473
+ Compiled medivo/lab_list/models.js (210ms) (pid 13083)
21474
+ Compiled medivo/models.js (169ms) (pid 13083)
21475
+ Compiled medivo/lab_list/views.js (181ms) (pid 13083)
21476
+ Compiled medivo/views.js (166ms) (pid 13083)
21477
+ Compiled medivo/lab_list/handlers.js (171ms) (pid 13083)
21478
+ Compiled medivo/lab_list/sample/show_labs.js (187ms) (pid 13083)
21479
+ Compiled medivo/lab_appointment/application.js (11ms) (pid 13083)
21480
+ Compiled medivo/date.js (0ms) (pid 13083)
21481
+ Compiled medivo/lab_appointment/models.js (171ms) (pid 13083)
21482
+ Compiled medivo/lab_appointment/views.js (162ms) (pid 13083)
21483
+ Compiled medivo/lab_appointment/handlers.js (176ms) (pid 13083)
21484
+ Compiled medivo/lab_appointment/sample/show_appointments.js (186ms) (pid 13083)
21485
+ Completed 200 OK in 4292ms (Views: 2178.9ms)
21486
+
21487
+
21488
+ Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2011-11-16 10:37:23 -0500
21489
+ Served asset /application.css - 304 Not Modified (0ms)
21490
+
21491
+
21492
+ Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:23 -0500
21493
+ Served asset /jquery.js - 304 Not Modified (4ms)
21494
+
21495
+
21496
+ Started GET "/assets/medivo/models.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:23 -0500
21497
+ Served asset /medivo/models.js - 304 Not Modified (2ms)
21498
+
21499
+
21500
+ Started GET "/assets/medivo/handlebars.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:23 -0500
21501
+ Served asset /medivo/handlebars.js - 304 Not Modified (4ms)
21502
+
21503
+
21504
+ Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21505
+ Served asset /jquery_ujs.js - 304 Not Modified (2ms)
21506
+
21507
+
21508
+ Started GET "/assets/medivo/helpers.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21509
+ Served asset /medivo/helpers.js - 304 Not Modified (2ms)
21510
+
21511
+
21512
+ Started GET "/assets/medivo/lab_list/models.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21513
+ Served asset /medivo/lab_list/models.js - 304 Not Modified (3ms)
21514
+
21515
+
21516
+ Started GET "/assets/medivo/views.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21517
+ Served asset /medivo/views.js - 304 Not Modified (2ms)
21518
+
21519
+
21520
+ Started GET "/assets/medivo/lab_list/views.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21521
+ Served asset /medivo/lab_list/views.js - 304 Not Modified (2ms)
21522
+
21523
+
21524
+ Started GET "/assets/medivo/lab_list/handlers.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21525
+ Served asset /medivo/lab_list/handlers.js - 304 Not Modified (2ms)
21526
+
21527
+
21528
+ Started GET "/assets/medivo/lab_list/application.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21529
+ Served asset /medivo/lab_list/application.js - 304 Not Modified (32ms)
21530
+
21531
+
21532
+ Started GET "/assets/medivo/lab_list/sample/show_labs.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21533
+ Served asset /medivo/lab_list/sample/show_labs.js - 304 Not Modified (2ms)
21534
+
21535
+
21536
+ Started GET "/assets/medivo/date.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21537
+ Served asset /medivo/date.js - 304 Not Modified (3ms)
21538
+
21539
+
21540
+ Started GET "/assets/medivo/lab_appointment/models.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21541
+ Served asset /medivo/lab_appointment/models.js - 304 Not Modified (2ms)
21542
+
21543
+
21544
+ Started GET "/assets/medivo/lab_appointment/views.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21545
+ Served asset /medivo/lab_appointment/views.js - 304 Not Modified (2ms)
21546
+
21547
+
21548
+ Started GET "/assets/medivo/lab_appointment/application.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21549
+ Served asset /medivo/lab_appointment/application.js - 304 Not Modified (3ms)
21550
+
21551
+
21552
+ Started GET "/assets/medivo/lab_appointment/sample/show_appointments.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21553
+ Served asset /medivo/lab_appointment/sample/show_appointments.js - 304 Not Modified (2ms)
21554
+
21555
+
21556
+ Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21557
+ Served asset /application.js - 304 Not Modified (0ms)
21558
+
21559
+
21560
+ Started GET "/assets/medivo/lab_appointment/handlers.js?body=1" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21561
+ Served asset /medivo/lab_appointment/handlers.js - 304 Not Modified (1ms)
21562
+
21563
+
21564
+ Started GET "/assets/medivo/ajax_waiting.gif" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21565
+ Served asset /medivo/ajax_waiting.gif - 304 Not Modified (2ms)
21566
+
21567
+
21568
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21569
+ Served asset /medivo/markerA.png - 304 Not Modified (3ms)
21570
+
21571
+
21572
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21573
+ Served asset /medivo/markerB.png - 304 Not Modified (5ms)
21574
+
21575
+
21576
+ Started GET "/assets/medivo/markerC.png" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21577
+ Served asset /medivo/markerC.png - 304 Not Modified (2ms)
21578
+
21579
+
21580
+ Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-11-16 10:37:24 -0500
21581
+ Served asset /medivo/arrow.png - 304 Not Modified (2ms)
21582
+
21583
+
21584
+ Started GET "/medivo/labs?utf8=%E2%9C%93&zip_code=10005&commit=Search" for 127.0.0.1 at 2011-11-16 10:37:33 -0500
21585
+ Processing by Medivo::LabsController#index as JS
21586
+ Parameters: {"utf8"=>"✓", "zip_code"=>"10005", "commit"=>"Search"}
21587
+ Completed 200 OK in 1971ms (Views: 19.8ms)
21588
+
21589
+
21590
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-11-16 10:37:35 -0500
21591
+ Served asset /medivo/markerA.png - 304 Not Modified (0ms)
21592
+
21593
+
21594
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-11-16 10:37:35 -0500
21595
+ Served asset /medivo/markerB.png - 304 Not Modified (0ms)
21596
+
21597
+
21598
+ Started GET "/assets/medivo/markerC.png" for 127.0.0.1 at 2011-11-16 10:37:35 -0500
21599
+ Served asset /medivo/markerC.png - 304 Not Modified (0ms)
21600
+
21601
+
21602
+ Started GET "/medivo/labs?utf8=%E2%9C%93&zip_code=10009&commit=Search" for 127.0.0.1 at 2011-11-16 10:39:58 -0500
21603
+ Processing by Medivo::LabsController#index as JS
21604
+ Parameters: {"utf8"=>"✓", "zip_code"=>"10009", "commit"=>"Search"}
21605
+ Completed 200 OK in 1864ms (Views: 20.8ms)
21606
+
21607
+
21608
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-11-16 10:40:00 -0500
21609
+ Served asset /medivo/markerA.png - 304 Not Modified (0ms)
21610
+
21611
+
21612
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-11-16 10:40:00 -0500
21613
+ Served asset /medivo/markerB.png - 304 Not Modified (0ms)
21614
+
21615
+
21616
+ Started GET "/assets/medivo/markerC.png" for 127.0.0.1 at 2011-11-16 10:40:00 -0500
21617
+ Served asset /medivo/markerC.png - 304 Not Modified (0ms)
21618
+
21619
+
21620
+ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&lab_code=21926&commit=Search+for+appointments" for 127.0.0.1 at 2011-11-16 10:40:10 -0500
21621
+ Processing by Medivo::LabsController#find_appointment as JS
21622
+ Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"21926", "commit"=>"Search for appointments"}
21623
+ Completed 500 Internal Server Error in 4066ms (Views: 4.5ms)
21624
+
21625
+
21626
+ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&lab_code=21926&commit=Search+for+appointments" for 127.0.0.1 at 2011-11-16 10:41:26 -0500
21627
+ Processing by Medivo::LabsController#find_appointment as JS
21628
+ Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"21926", "commit"=>"Search for appointments"}
21629
+ Completed 500 Internal Server Error in 6346ms (Views: 4.6ms)
21630
+
21631
+
21632
+ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&lab_code=21926&commit=Search+for+appointments" for 127.0.0.1 at 2011-11-16 10:44:25 -0500
21633
+ Processing by Medivo::LabsController#find_appointment as JS
21634
+ Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"21926", "commit"=>"Search for appointments"}
21635
+ Completed 500 Internal Server Error in 3540ms (Views: 4.5ms)
21636
+
21637
+
21638
+ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&lab_code=21926&commit=Search+for+appointments" for 127.0.0.1 at 2011-11-16 10:44:49 -0500
21639
+ Processing by Medivo::LabsController#find_appointment as JS
21640
+ Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"21926", "commit"=>"Search for appointments"}
21641
+ Completed 500 Internal Server Error in 3678ms (Views: 5.1ms)
21642
+
21643
+
21644
+ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&lab_code=21926&commit=Search+for+appointments" for 127.0.0.1 at 2011-11-16 10:45:49 -0500
21645
+ Processing by Medivo::LabsController#find_appointment as JS
21646
+ Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"21926", "commit"=>"Search for appointments"}
21647
+ Completed 500 Internal Server Error in 3997ms (Views: 4.6ms)
21648
+
21649
+
21650
+ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&lab_code=21926&commit=Search+for+appointments" for 127.0.0.1 at 2011-11-16 10:46:37 -0500
21651
+ Processing by Medivo::LabsController#find_appointment as JS
21652
+ Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"21926", "commit"=>"Search for appointments"}
21653
+ Completed 500 Internal Server Error in 4162ms (Views: 4.6ms)
21654
+
21655
+
21656
+ Started GET "/medivo/labs/find_appointment?utf8=%E2%9C%93&date=11%2F19%2F2011&lab_code=21926&commit=Search+for+appointments" for 127.0.0.1 at 2011-11-16 10:49:35 -0500
21657
+ Processing by Medivo::LabsController#find_appointment as JS
21658
+ Parameters: {"utf8"=>"✓", "date"=>"11/19/2011", "lab_code"=>"21926", "commit"=>"Search for appointments"}
21659
+ Completed 200 OK in 2671ms (Views: 4.5ms)
@@ -0,0 +1 @@
1
+ 14208
@@ -13,7 +13,9 @@ describe Medivo::Appointment do
13
13
  let(:body) { {'times'=> @all_times} }
14
14
 
15
15
  def returned_times(date, am_pm, freeze_date = date)
16
- Timecop.freeze(Date.parse(freeze_date))
16
+ freeze_date = Date.strptime(freeze_date, "%m/%d/%Y")
17
+ date = Date.strptime(date, "%m/%d/%Y")
18
+ Timecop.freeze(freeze_date)
17
19
  stub_appointment_request(lab_code, date, am_pm, body)
18
20
  value = Medivo::Appointment.find(lab_code, date, am_pm)
19
21
  Timecop.return
@@ -21,29 +23,34 @@ describe Medivo::Appointment do
21
23
  end
22
24
 
23
25
  it "filters out past date times" do
24
- returned_times('2011-11-04', '').should_not include "11/03/2011|08:30 AM"
26
+ @all_times = ["11/16/2011|01:00 PM"]
27
+ returned_times('11/19/2011', '')
28
+ end
29
+
30
+ it "filters out past date times" do
31
+ returned_times('11/04/2011', '').should_not include "11/03/2011|08:30 AM"
25
32
  end
26
33
 
27
34
  it "filters out past or pm times" do
28
- returned_times('2011-11-04', 'AM').should == ["11/04/2011|08:30 AM"]
35
+ returned_times('11/04/2011', 'AM').should == ["11/04/2011|08:30 AM"]
29
36
  end
30
37
 
31
38
  it "filters out past or am times" do
32
- returned_times('2011-11-04', 'PM').should == ["11/04/2011|08:30 PM"]
39
+ returned_times('11/04/2011', 'PM').should == ["11/04/2011|08:30 PM"]
33
40
  end
34
41
 
35
42
  it "filters out invalid time strings" do
36
43
  @all_times = ["11/02011|08:30 AM", "11/04/2011|11:30 AM"]
37
- returned_times('2011-11-04', '').should == ["11/04/2011|11:30 AM"]
44
+ returned_times('11/04/2011', '').should == ["11/04/2011|11:30 AM"]
38
45
  end
39
46
 
40
47
  it "orders the time strings by date" do
41
- returned_times('2011-11-04', '').should == ["11/04/2011|08:30 AM", "11/04/2011|08:30 PM"]
48
+ returned_times('11/04/2011', '').should == ["11/04/2011|08:30 AM", "11/04/2011|08:30 PM"]
42
49
  end
43
50
 
44
51
  it "orders the time strings by nearness to search date" do
45
52
  @all_times = ["11/06/2011|12:30 AM", "11/04/2011|08:30 PM", "11/05/2011|08:30 AM"]
46
- returned_times('2011-11-06', '', "2011-11-04").should == ["11/06/2011|12:30 AM", "11/05/2011|08:30 AM", "11/04/2011|08:30 PM"]
53
+ returned_times('11/06/2011', '', "11/04/2011").should == ["11/06/2011|12:30 AM", "11/05/2011|08:30 AM", "11/04/2011|08:30 PM"]
47
54
  end
48
55
  end
49
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: medivo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.18
4
+ version: 0.2.19
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &2152297540 !ruby/object:Gem::Requirement
17
+ requirement: &2165120660 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.1.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2152297540
25
+ version_requirements: *2165120660
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: jquery-rails
28
- requirement: &2152297120 !ruby/object:Gem::Requirement
28
+ requirement: &2165116880 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2152297120
36
+ version_requirements: *2165116880
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: coffee-script
39
- requirement: &2152296660 !ruby/object:Gem::Requirement
39
+ requirement: &2165116420 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2152296660
47
+ version_requirements: *2165116420
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: haml-rails
50
- requirement: &2152296240 !ruby/object:Gem::Requirement
50
+ requirement: &2165115960 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2152296240
58
+ version_requirements: *2165115960
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: geocoder
61
- requirement: &2152295820 !ruby/object:Gem::Requirement
61
+ requirement: &2165115540 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *2152295820
69
+ version_requirements: *2165115540
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: rest-client
72
- requirement: &2152295400 !ruby/object:Gem::Requirement
72
+ requirement: &2165115100 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: '0'
78
78
  type: :runtime
79
79
  prerelease: false
80
- version_requirements: *2152295400
80
+ version_requirements: *2165115100
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: pdfkit
83
- requirement: &2152294980 !ruby/object:Gem::Requirement
83
+ requirement: &2165114680 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: '0'
89
89
  type: :runtime
90
90
  prerelease: false
91
- version_requirements: *2152294980
91
+ version_requirements: *2165114680
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: prawn
94
- requirement: &2152294560 !ruby/object:Gem::Requirement
94
+ requirement: &2165114260 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,7 +99,7 @@ dependencies:
99
99
  version: '0'
100
100
  type: :runtime
101
101
  prerelease: false
102
- version_requirements: *2152294560
102
+ version_requirements: *2165114260
103
103
  description: Use the medivo platform to find lab locations, make labcorp appointments,
104
104
  place lab orders
105
105
  email:
@@ -269,6 +269,7 @@ files:
269
269
  - spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4
270
270
  - spec/dummy/tmp/cache/assets/E59/D50/sprockets%2Fbe1cc4d9b0efb617e58baa16dd1dee58
271
271
  - spec/dummy/tmp/image_path_fb5f3a59200b_1320622886.pdf
272
+ - spec/dummy/tmp/pids/server.pid
272
273
  - spec/fixtures/hl7/lc_hga1c_abnormal.hl7
273
274
  - spec/fixtures/hl7/lc_hga1c_normal.hl7
274
275
  - spec/fixtures/images/southeast.jpg
@@ -311,7 +312,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
311
312
  version: '0'
312
313
  segments:
313
314
  - 0
314
- hash: -280239849762613463
315
+ hash: 1009107623208251976
315
316
  required_rubygems_version: !ruby/object:Gem::Requirement
316
317
  none: false
317
318
  requirements:
@@ -320,7 +321,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
320
321
  version: '0'
321
322
  segments:
322
323
  - 0
323
- hash: -280239849762613463
324
+ hash: 1009107623208251976
324
325
  requirements: []
325
326
  rubyforge_project:
326
327
  rubygems_version: 1.6.2
@@ -428,6 +429,7 @@ test_files:
428
429
  - spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4
429
430
  - spec/dummy/tmp/cache/assets/E59/D50/sprockets%2Fbe1cc4d9b0efb617e58baa16dd1dee58
430
431
  - spec/dummy/tmp/image_path_fb5f3a59200b_1320622886.pdf
432
+ - spec/dummy/tmp/pids/server.pid
431
433
  - spec/fixtures/hl7/lc_hga1c_abnormal.hl7
432
434
  - spec/fixtures/hl7/lc_hga1c_normal.hl7
433
435
  - spec/fixtures/images/southeast.jpg