ncs_mdes_warehouse 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. data/CHANGELOG.md +14 -0
  2. data/Gemfile +0 -1
  3. data/ci-exec.sh +1 -1
  4. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/address.rb +1 -1
  5. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit.rb +1 -1
  6. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_2.rb +1 -1
  7. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_baby_name.rb +1 -1
  8. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_baby_name_2.rb +1 -1
  9. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_decorate_room.rb +1 -1
  10. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_decorate_room_2.rb +1 -1
  11. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_li.rb +1 -1
  12. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_li_baby_name.rb +1 -1
  13. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_li_decorate_room.rb +1 -1
  14. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_li_renovate_room.rb +1 -1
  15. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_renovate_room.rb +1 -1
  16. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/birth_visit_renovate_room_2.rb +1 -1
  17. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/contact.rb +1 -1
  18. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/drf_therm_verification.rb +1 -1
  19. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/dwelling_unit.rb +1 -1
  20. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother.rb +1 -1
  21. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_cond.rb +1 -1
  22. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_detail.rb +1 -1
  23. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_habits.rb +1 -1
  24. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_lice.rb +1 -1
  25. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_mold.rb +1 -1
  26. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_otc.rb +1 -1
  27. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_pet_type.rb +1 -1
  28. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_prescr.rb +1 -1
  29. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_renovate_room.rb +1 -1
  30. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_room_mold.rb +1 -1
  31. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_saq.rb +1 -1
  32. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/eighteen_mth_mother_suppl.rb +1 -1
  33. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/email.rb +1 -1
  34. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/env_equipment.rb +1 -1
  35. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/env_equipment_prob_log.rb +1 -1
  36. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/event.rb +1 -1
  37. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/father_pv1.rb +1 -1
  38. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/father_pv1_cancer.rb +1 -1
  39. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/father_pv1_educ.rb +1 -1
  40. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/father_pv1_race.rb +1 -1
  41. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_enumeration.rb +1 -1
  42. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_enumeration_age_elig.rb +1 -1
  43. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_enumeration_hidden_du.rb +1 -1
  44. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_enumeration_pregnant.rb +1 -1
  45. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_inventory.rb +1 -1
  46. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_inventory_age.rb +1 -1
  47. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_inventory_age_elig.rb +1 -1
  48. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/household_unit.rb +1 -1
  49. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/incident.rb +1 -1
  50. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/incident_media.rb +1 -1
  51. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/incident_unanticipated.rb +1 -1
  52. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/institution.rb +1 -1
  53. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/instrument.rb +1 -1
  54. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/internet_usage.rb +1 -1
  55. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/internet_usage_participate.rb +1 -1
  56. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/link_contact.rb +1 -1
  57. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/link_household_dwelling.rb +1 -1
  58. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/link_person_household.rb +1 -1
  59. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/link_person_institute.rb +1 -1
  60. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/link_person_participant.rb +1 -1
  61. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/link_person_provider.rb +1 -1
  62. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/listing_unit.rb +1 -1
  63. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/low_high_script.rb +1 -1
  64. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/nine_mth_mother.rb +1 -1
  65. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/nine_mth_mother_detail.rb +1 -1
  66. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/non_interview_rpt.rb +1 -1
  67. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/non_interview_rpt_dutype.rb +1 -1
  68. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/non_interview_rpt_noaccess.rb +1 -1
  69. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/non_interview_rpt_refusal.rb +1 -1
  70. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/non_interview_rpt_vacant.rb +1 -1
  71. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/outreach.rb +1 -1
  72. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/outreach_eval.rb +1 -1
  73. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/outreach_lang2.rb +1 -1
  74. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/outreach_race.rb +1 -1
  75. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/outreach_staff.rb +1 -1
  76. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/outreach_target.rb +1 -1
  77. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/participant.rb +1 -1
  78. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/participant_auth.rb +1 -1
  79. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/participant_consent.rb +1 -1
  80. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/participant_consent_sample.rb +1 -1
  81. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/participant_rvis.rb +1 -1
  82. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/participant_vis_consent.rb +1 -1
  83. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment.rb +1 -1
  84. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment_2.rb +1 -1
  85. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment_info_source.rb +1 -1
  86. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment_info_source_2.rb +1 -1
  87. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment_prov_source.rb +1 -1
  88. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment_prov_source_2.rb +1 -1
  89. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment_prov_svc.rb +1 -1
  90. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pb_recruitment_prov_svc_2.rb +1 -1
  91. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/person.rb +1 -1
  92. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/person_race.rb +1 -1
  93. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/ppg_cati.rb +1 -1
  94. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/ppg_details.rb +1 -1
  95. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/ppg_saq.rb +1 -1
  96. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/ppg_status_history.rb +1 -1
  97. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg.rb +1 -1
  98. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg_cool.rb +1 -1
  99. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg_heat2.rb +1 -1
  100. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg_pdecorate_room.rb +1 -1
  101. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg_prenovate_room.rb +1 -1
  102. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg_room_mold.rb +1 -1
  103. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg_saq.rb +1 -1
  104. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/pre_preg_sp_race.rb +1 -1
  105. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/prec_therm_cert.rb +1 -1
  106. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_eh.rb +1 -1
  107. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_eh_2.rb +1 -1
  108. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_eh_know_ncs.rb +1 -1
  109. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_eh_know_ncs_2.rb +1 -1
  110. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_eh_race.rb +1 -1
  111. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_eh_race_2.rb +1 -1
  112. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_hi.rb +1 -1
  113. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_hi_2.rb +1 -1
  114. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_hi_know_ncs.rb +1 -1
  115. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_hi_know_ncs_2.rb +1 -1
  116. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_hi_race.rb +1 -1
  117. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_hi_race_2.rb +1 -1
  118. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_pb.rb +1 -1
  119. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_pb_2.rb +1 -1
  120. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_pb_know_ncs.rb +1 -1
  121. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_pb_know_ncs_2.rb +1 -1
  122. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_pb_race.rb +1 -1
  123. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_screen_pb_race_2.rb +1 -1
  124. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1.rb +1 -1
  125. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_2.rb +1 -1
  126. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_commute.rb +1 -1
  127. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_commute_2.rb +1 -1
  128. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_cool.rb +1 -1
  129. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_cool_2.rb +1 -1
  130. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_diagnose_2.rb +1 -1
  131. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_diagnose_2_2.rb +1 -1
  132. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_heat2.rb +1 -1
  133. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_heat2_2.rb +1 -1
  134. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_local_trav.rb +1 -1
  135. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_local_trav_2.rb +1 -1
  136. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_nonenglish2_2.rb +1 -1
  137. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_pdecorate_room.rb +1 -1
  138. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_pdecorate_room_2.rb +1 -1
  139. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_pet_type.rb +1 -1
  140. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_pet_type_2.rb +1 -1
  141. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_prenovate2_room.rb +1 -1
  142. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_prenovate_room.rb +1 -1
  143. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_prenovate_room_2.rb +1 -1
  144. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_room_mold.rb +1 -1
  145. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_room_mold_2.rb +1 -1
  146. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_saq.rb +1 -1
  147. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_saq_2.rb +1 -1
  148. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_sp_race.rb +1 -1
  149. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_1_sp_race_2.rb +1 -1
  150. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2.rb +1 -1
  151. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_2.rb +1 -1
  152. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_cool.rb +1 -1
  153. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_cool_2.rb +1 -1
  154. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_diagnose_2.rb +1 -1
  155. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_diagnose_2_2.rb +1 -1
  156. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_heat2.rb +1 -1
  157. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_heat2_2.rb +1 -1
  158. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_pdecorate2_room.rb +1 -1
  159. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_pdecorate2_room_2.rb +1 -1
  160. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_prenovate_room.rb +1 -1
  161. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_prenovate_room_2.rb +1 -1
  162. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_room_mold.rb +1 -1
  163. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_room_mold_2.rb +1 -1
  164. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_saq.rb +1 -1
  165. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_2_saq_2.rb +1 -1
  166. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_li.rb +1 -1
  167. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_li_2.rb +1 -1
  168. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_li_cool.rb +1 -1
  169. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/preg_visit_li_cool_2.rb +1 -1
  170. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/provider.rb +1 -1
  171. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/provider_role.rb +1 -1
  172. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/psu.rb +1 -1
  173. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/ref_freezer_verification.rb +1 -1
  174. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/sample_receipt_confirm.rb +1 -1
  175. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/sample_receipt_store.rb +1 -1
  176. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/sample_shipping.rb +1 -1
  177. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_mother.rb +1 -1
  178. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_mother_detail.rb +1 -1
  179. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_mother_pet.rb +1 -1
  180. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq.rb +1 -1
  181. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq_2.rb +1 -1
  182. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq_formula_type.rb +1 -1
  183. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq_formula_type_2.rb +1 -1
  184. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq_supp.rb +1 -1
  185. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq_supp_2.rb +1 -1
  186. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq_water.rb +1 -1
  187. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/six_mth_saq_water_2.rb +1 -1
  188. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_blood.rb +1 -1
  189. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_blood_draw.rb +1 -1
  190. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_blood_hemolyze.rb +1 -1
  191. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_blood_tube.rb +1 -1
  192. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_blood_tube_comments.rb +1 -1
  193. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_cord_blood.rb +1 -1
  194. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_cord_blood_specimen.rb +1 -1
  195. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_equipment.rb +1 -1
  196. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_pickup.rb +1 -1
  197. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_receipt.rb +1 -1
  198. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_shipping.rb +1 -1
  199. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_spsc_info.rb +1 -1
  200. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_storage.rb +1 -1
  201. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/spec_urine.rb +1 -1
  202. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/srsc_info.rb +1 -1
  203. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/ssu.rb +1 -1
  204. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/staff.rb +1 -1
  205. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/staff_cert_training.rb +1 -1
  206. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/staff_exp_data_cllctn_tasks.rb +1 -1
  207. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/staff_exp_mngmnt_tasks.rb +1 -1
  208. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/staff_language.rb +1 -1
  209. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/staff_validation.rb +1 -1
  210. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/staff_weekly_expense.rb +1 -1
  211. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/study_center.rb +1 -1
  212. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/subsample_doc.rb +1 -1
  213. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf.rb +1 -1
  214. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_blank_collected.rb +1 -1
  215. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_dup_collected.rb +1 -1
  216. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_dup_filled.rb +1 -1
  217. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_n_collected.rb +1 -1
  218. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_reason_filled.rb +1 -1
  219. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_reason_filled2.rb +1 -1
  220. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_sample.rb +1 -1
  221. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twf_subsamples.rb +1 -1
  222. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq.rb +1 -1
  223. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_blank_collected.rb +1 -1
  224. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_dup_collected.rb +1 -1
  225. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_dup_filled.rb +1 -1
  226. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_n_collected.rb +1 -1
  227. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_reason_filled.rb +1 -1
  228. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_reason_filled2.rb +1 -1
  229. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_sample.rb +1 -1
  230. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tap_water_twq_subsamples.rb +1 -1
  231. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/telephone.rb +1 -1
  232. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/three_mth_mother.rb +1 -1
  233. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/three_mth_mother_child_detail.rb +1 -1
  234. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/three_mth_mother_child_habits.rb +1 -1
  235. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/three_mth_mother_race.rb +1 -1
  236. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/trh_meter_calibration.rb +1 -1
  237. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/tsu.rb +1 -1
  238. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_mother.rb +1 -1
  239. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_mother_detail.rb +1 -1
  240. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_mother_lice.rb +1 -1
  241. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_mother_renovate_room.rb +1 -1
  242. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_mother_room_mold.rb +1 -1
  243. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq.rb +1 -1
  244. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_2.rb +1 -1
  245. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_formula_brand.rb +1 -1
  246. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_formula_brand_2.rb +1 -1
  247. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_formula_type.rb +1 -1
  248. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_formula_type_2.rb +1 -1
  249. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_supplement.rb +1 -1
  250. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_supplement_2.rb +1 -1
  251. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_water.rb +1 -1
  252. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twelve_mth_saq_water_2.rb +1 -1
  253. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother.rb +1 -1
  254. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother_cond.rb +1 -1
  255. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother_detail.rb +1 -1
  256. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother_habits.rb +1 -1
  257. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother_mold.rb +1 -1
  258. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother_otc.rb +1 -1
  259. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother_prescr.rb +1 -1
  260. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_mother_suppl.rb +1 -1
  261. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_pet_type.rb +1 -1
  262. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_renovate_room.rb +1 -1
  263. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_room_mold.rb +1 -1
  264. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/twenty_four_mth_saq.rb +1 -1
  265. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/vacuum_bag.rb +1 -1
  266. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/vacuum_bag_outside.rb +1 -1
  267. data/generated_models/ncs_navigator/warehouse/models/two_point_zero/validation_ins.rb +1 -1
  268. data/lib/ncs_navigator/warehouse/cli.rb +0 -3
  269. data/lib/ncs_navigator/warehouse/configuration.rb +23 -2
  270. data/lib/ncs_navigator/warehouse/configuration/file_evaluator.rb +5 -1
  271. data/lib/ncs_navigator/warehouse/data_mapper.rb +7 -1
  272. data/lib/ncs_navigator/warehouse/data_mapper_patches.rb +1 -0
  273. data/lib/ncs_navigator/warehouse/database_initializer.rb +1 -1
  274. data/lib/ncs_navigator/warehouse/table_modeler/model_template.rb.erb +1 -1
  275. data/lib/ncs_navigator/warehouse/transform_status.rb +2 -3
  276. data/lib/ncs_navigator/warehouse/transformers.rb +5 -4
  277. data/lib/ncs_navigator/warehouse/transformers/database.rb +1 -1
  278. data/lib/ncs_navigator/warehouse/transformers/enum_transformer.rb +11 -8
  279. data/lib/ncs_navigator/warehouse/transformers/subprocess_transformer.rb +140 -0
  280. data/lib/ncs_navigator/warehouse/version.rb +1 -1
  281. data/ncs_mdes_warehouse.gemspec +10 -3
  282. data/spec/ncs_navigator/warehouse/configuration_spec.rb +14 -0
  283. data/spec/ncs_navigator/warehouse/data_mapper_spec.rb +4 -0
  284. data/spec/ncs_navigator/warehouse/models/mdes_model_spec.rb +0 -2
  285. data/spec/ncs_navigator/warehouse/table_modeler_spec.rb +0 -1
  286. data/spec/ncs_navigator/warehouse/transform_status_spec.rb +35 -0
  287. data/spec/ncs_navigator/warehouse/transformers/enum_transformer_spec.rb +3 -1
  288. data/spec/ncs_navigator/warehouse/transformers/subprocess_transformer_spec.rb +227 -0
  289. data/spec/spec_helper.rb +1 -1
  290. metadata +138 -39
@@ -1,8 +1,8 @@
1
1
  require 'ncs_navigator/warehouse'
2
2
  require 'ncs_navigator/configuration'
3
3
  require 'ncs_navigator/mdes'
4
+ require 'ncs_navigator/warehouse/data_mapper'
4
5
 
5
- require 'data_mapper'
6
6
  require 'active_support/core_ext/object/try'
7
7
  require 'pathname'
8
8
 
@@ -30,7 +30,7 @@ module NcsNavigator::Warehouse
30
30
  # given file.
31
31
  # @param [String] filename
32
32
  def from_file(filename)
33
- FileEvaluator.new(filename).result
33
+ FileEvaluator.new(filename.to_s).result
34
34
  end
35
35
 
36
36
  ##
@@ -338,6 +338,27 @@ module NcsNavigator::Warehouse
338
338
  end
339
339
  end
340
340
 
341
+ ####
342
+ #### Meta
343
+ ####
344
+
345
+ ##
346
+ # The file from which this configuration was originally read. If
347
+ # the configuration was constructed solely in memory, this value
348
+ # will be `nil`.
349
+ #
350
+ # @return [Pathname,nil]
351
+ attr_reader :configuration_file
352
+
353
+ ##
354
+ # Specify the file from which this configuration was read.
355
+ #
356
+ # @param [Pathname,String,nil] fn
357
+ # @return [void]
358
+ def configuration_file=(fn)
359
+ @configuration_file = coerce_to_pathname(fn)
360
+ end
361
+
341
362
  private
342
363
 
343
364
  def coerce_to_pathname(value)
@@ -8,13 +8,17 @@ class NcsNavigator::Warehouse::Configuration
8
8
  alias :c :configuration
9
9
 
10
10
  def initialize(filename)
11
- @filename = filename
11
+ @filename = Pathname.new(filename)
12
+ unless @filename.absolute?
13
+ @filename = @filename.realpath
14
+ end
12
15
  @base_configuration = NcsNavigator::Warehouse::Configuration.new
13
16
  @configuration = ErrorAccumulator.new(@base_configuration, @filename)
14
17
  end
15
18
 
16
19
  def eval
17
20
  instance_eval(File.read(@filename), @filename)
21
+ configuration.configuration_file = @filename
18
22
  configuration.finish
19
23
  @evaled = true
20
24
  end
@@ -1,4 +1,9 @@
1
- require 'data_mapper'
1
+ %w(
2
+ dm-core dm-constraints dm-migrations dm-transactions dm-validations dm-types dm-aggregates
3
+ ).each do |dm|
4
+ require dm
5
+ end
6
+
2
7
  require 'ncs_navigator/warehouse'
3
8
 
4
9
  module NcsNavigator::Warehouse
@@ -14,6 +19,7 @@ module NcsNavigator::Warehouse
14
19
  accept_options :pii, :omittable
15
20
  attr_reader :pii, :omittable
16
21
  end
22
+ into.lazy(false)
17
23
  end
18
24
 
19
25
  def initialize(model, name, options = {})
@@ -4,6 +4,7 @@
4
4
  # been submitted to the dm-constraints:
5
5
  # https://github.com/datamapper/dm-constraints/pull/13
6
6
 
7
+ require 'ncs_navigator/warehouse/data_mapper'
7
8
  require 'data_mapper/constraints/adapters/do_adapter'
8
9
  # @private
9
10
  module DataMapper::Constraints::Adapters::DataObjectsAdapter::SQL
@@ -1,10 +1,10 @@
1
1
  require 'ncs_navigator/warehouse'
2
2
 
3
3
  require 'bcdatabase'
4
- require 'data_mapper'
5
4
  require 'benchmark'
6
5
  require 'forwardable'
7
6
 
7
+ require 'ncs_navigator/warehouse/data_mapper'
8
8
  require 'ncs_navigator/warehouse/data_mapper_patches'
9
9
 
10
10
  module NcsNavigator::Warehouse
@@ -1,5 +1,5 @@
1
- require 'data_mapper'
2
1
  require 'ncs_navigator/warehouse'
2
+ require 'ncs_navigator/warehouse/data_mapper'
3
3
 
4
4
  module <%= module_name %>
5
5
  class <%= t.wh_model_name %>
@@ -1,6 +1,5 @@
1
1
  require 'ncs_navigator/warehouse'
2
-
3
- require 'data_mapper'
2
+ require 'ncs_navigator/warehouse/data_mapper'
4
3
 
5
4
  module NcsNavigator::Warehouse
6
5
  ##
@@ -27,7 +26,7 @@ module NcsNavigator::Warehouse
27
26
  storage_names[:mdes_warehouse_reporting] = 'wh_transform_status'
28
27
 
29
28
  property :id, Serial
30
- property :name, String, :required => true, :length => 255
29
+ property :name, Text, :required => true
31
30
  property :start_time, DateTime
32
31
  property :end_time, DateTime
33
32
  property :record_count, Integer, :default => 0
@@ -11,9 +11,10 @@ module NcsNavigator::Warehouse
11
11
  # `Enumerable` of MDES Warehouse model instances, validates and
12
12
  # saves them. It's a good general base for your own transformers.
13
13
  module Transformers
14
- autoload :Database, 'ncs_navigator/warehouse/transformers/database'
15
- autoload :EnumTransformer, 'ncs_navigator/warehouse/transformers/enum_transformer'
16
- autoload :SamplingUnits, 'ncs_navigator/warehouse/transformers/sampling_units'
17
- autoload :VdrXml, 'ncs_navigator/warehouse/transformers/vdr_xml'
14
+ autoload :Database, 'ncs_navigator/warehouse/transformers/database'
15
+ autoload :EnumTransformer, 'ncs_navigator/warehouse/transformers/enum_transformer'
16
+ autoload :SamplingUnits, 'ncs_navigator/warehouse/transformers/sampling_units'
17
+ autoload :SubprocessTransformer, 'ncs_navigator/warehouse/transformers/subprocess_transformer'
18
+ autoload :VdrXml, 'ncs_navigator/warehouse/transformers/vdr_xml'
18
19
  end
19
20
  end
@@ -1,8 +1,8 @@
1
1
  require 'ncs_navigator/warehouse'
2
+ require 'ncs_navigator/warehouse/data_mapper'
2
3
 
3
4
  require 'active_support/core_ext/string'
4
5
  require 'forwardable'
5
- require 'data_mapper'
6
6
 
7
7
  module NcsNavigator::Warehouse::Transformers
8
8
  ##
@@ -42,7 +42,7 @@ module NcsNavigator::Warehouse::Transformers
42
42
  log.debug("Saving valid record #{record_ident record}.")
43
43
  begin
44
44
  unless record.save
45
- msg = "Could not save."
45
+ msg = "Could not save valid record #{record.inspect}. #{record_messages(record).join(' ')}"
46
46
  log.error msg
47
47
  status.unsuccessful_record(record, msg)
48
48
  end
@@ -52,13 +52,7 @@ module NcsNavigator::Warehouse::Transformers
52
52
  status.unsuccessful_record(record, msg)
53
53
  end
54
54
  else
55
- messages = record.errors.keys.collect { |prop|
56
- record.errors[prop].collect { |e|
57
- v = record.send(prop)
58
- "#{e} (#{prop}=#{v.inspect})."
59
- }
60
- }.flatten
61
- msg = "Invalid record. #{messages.join(' ')}"
55
+ msg = "Invalid record. #{record_messages(record).join(' ')}"
62
56
  log.error msg
63
57
  status.unsuccessful_record(record, msg)
64
58
  end
@@ -74,6 +68,15 @@ module NcsNavigator::Warehouse::Transformers
74
68
  rec.class.name.demodulize, rec.class.key.first.name, rec.key.try(:first).inspect]
75
69
  end
76
70
 
71
+ def record_messages(record)
72
+ record.errors.keys.collect { |prop|
73
+ record.errors[prop].collect { |e|
74
+ v = record.send(prop)
75
+ "#{e} (#{prop}=#{v.inspect})."
76
+ }
77
+ }.flatten
78
+ end
79
+
77
80
  def apply_global_values_if_necessary(record)
78
81
  {
79
82
  :psu_id => @configuration.navigator.psus.first.id,
@@ -0,0 +1,140 @@
1
+ require 'ncs_navigator/warehouse'
2
+ require 'childprocess'
3
+ require 'forwardable'
4
+ require 'json'
5
+ require 'fileutils'
6
+
7
+ module NcsNavigator::Warehouse::Transformers
8
+ ##
9
+ # A transformer that executes a separate executable to perform the
10
+ # transformation. The executable should provide error information
11
+ # on standard out. As it proceeds with the transformation, it can
12
+ # write single line messages. Each message either be an unstructured
13
+ # string or a single-line JSON object whose attributes are a subset
14
+ # of the attributes on {TransformError}. If the final line can be
15
+ # interpreted as an integer alone, it will be used as the record
16
+ # count for the transformer. Example standard out:
17
+ #
18
+ # Could not connect to frob
19
+ # { "record_id": "F111", "model_class": "Person", "message": "was invalid" }
20
+ # 39
21
+ #
22
+ # This output will result in a {TransformStatus} with record count
23
+ # 39 and two errors. The errors will have the messages `Could not
24
+ # connect to frob` and `was invalid` and the latter will have the
25
+ # identity of the specific troublesome record.
26
+ #
27
+ # If the subprocess is a ruby script, it may be useful to pass the
28
+ # warehouse configuration filename as one of its arguments so it can
29
+ # use the Warehouse API to connect to the database, etc.
30
+ class SubprocessTransformer
31
+ extend Forwardable
32
+
33
+ def_delegators :configuration, :log, :shell
34
+
35
+ ##
36
+ # @return [Array<String>] The process parameters, including the
37
+ # executable name.
38
+ attr_reader :exec_and_args
39
+
40
+ ##
41
+ # @return [Configuration] The warehouse configuration in use.
42
+ attr_reader :configuration
43
+
44
+ ##
45
+ # @return [String] the working directory for the subprocess.
46
+ attr_reader :directory
47
+
48
+ ##
49
+ # @return [Hash<String, String>] supplemental environment variable
50
+ # values for the subprocess.
51
+ attr_reader :environment
52
+
53
+ ##
54
+ # @param config [Configuration]
55
+ # @param exec_and_args [String<Array>] the arguments for the
56
+ # subprocess to spawn, including the executable name (which
57
+ # should be the first item in the array)
58
+ # @param options [Hash]
59
+ #
60
+ # @option options :environment [Hash<String, String>] values to
61
+ # include in the subprocess's environment. The subprocess will
62
+ # inherit all the environment variables from the parent ETL
63
+ # process, so this only needs to include overrides.
64
+ # @option options :directory [String] the directory from which to
65
+ # run the subprocess if different from the current working
66
+ # directory.
67
+ def initialize(config, exec_and_args, options={})
68
+ @configuration = config
69
+ @exec_and_args = exec_and_args
70
+ @directory = options[:directory] || '.'
71
+ @environment = options[:environment] || {}
72
+ end
73
+
74
+ ##
75
+ # @return [String]
76
+ def name
77
+ exec_and_args.join(' ')
78
+ end
79
+
80
+ ##
81
+ # Spawns the child process and updates the provided
82
+ # {TransformStatus} with the results.
83
+ #
84
+ # @param [TransformStatus] transform_status
85
+ #
86
+ # @return [void]
87
+ def transform(transform_status)
88
+ process = ChildProcess.build(*exec_and_args)
89
+ process.environment.merge!(environment)
90
+
91
+ # inherit stderr
92
+ process.io.inherit!
93
+
94
+ # capture stdout
95
+ out_r, out_w = IO.pipe
96
+ process.io.stdout = out_w
97
+
98
+ log.info "Spawning subprocess transformer `#{exec_and_args.join(' ')}`"
99
+ shell.say "Spawning subprocess transformer `#{exec_and_args.join(' ')}`"
100
+
101
+ FileUtils.cd directory do
102
+ process.start
103
+ end
104
+
105
+ log.info " PID is #{process.pid}"
106
+ shell.say_line ": #{process.pid}"
107
+ out_w.close
108
+
109
+ out_lines = out_r.readlines
110
+ if !out_lines.empty? && out_lines.last.to_i.to_s == out_lines.last.strip
111
+ transform_status.record_count = out_lines.pop.to_i
112
+ end
113
+ out_lines.each do |error|
114
+ attrs =
115
+ begin
116
+ JSON.parse(error.strip)
117
+ rescue JSON::ParserError => e
118
+ { 'message' => error.strip }
119
+ end
120
+ transform_status.transform_errors <<
121
+ NcsNavigator::Warehouse::TransformError.new(attrs)
122
+ end
123
+
124
+ unless process.exited?
125
+ process.stop
126
+ end
127
+
128
+ if process.exit_code != 0
129
+ transform_status.add_error(
130
+ "`#{exec_and_args.join(' ')}` process exited with code #{process.exit_code}")
131
+ end
132
+
133
+ if transform_status.transform_errors.empty?
134
+ shell.say_line "Subprocess completed."
135
+ else
136
+ shell.say_line "Subprocess completed with errors."
137
+ end
138
+ end
139
+ end
140
+ end
@@ -1,5 +1,5 @@
1
1
  module NcsNavigator
2
2
  module Warehouse
3
- VERSION = '0.2.0'
3
+ VERSION = '0.3.0'
4
4
  end
5
5
  end
@@ -23,17 +23,24 @@ Gem::Specification.new do |s|
23
23
 
24
24
  s.add_dependency 'thor', '~> 0.14.6'
25
25
  s.add_dependency 'rubyzip', '~> 0.9.4'
26
+ s.add_dependency 'childprocess', '~> 0.2.3'
27
+ s.add_dependency 'json', '~> 1.6'
26
28
 
27
29
  s.add_dependency 'nokogiri', '~> 1.5.0'
28
30
  s.add_dependency 'builder', '>= 2.1.2'
29
31
 
30
- s.add_dependency 'data_mapper', '~> 1.2.0'
32
+ %w(
33
+ dm-core dm-constraints dm-migrations dm-transactions dm-validations dm-types dm-aggregates
34
+ dm-postgres-adapter
35
+ ).each do |dm_gem|
36
+ s.add_dependency dm_gem, '~> 1.2.0'
37
+ end
38
+
31
39
  s.add_dependency 'bcdatabase', '~> 1.1'
32
- s.add_dependency 'dm-postgres-adapter', '~> 1.2.0'
33
40
 
34
41
  s.add_development_dependency 'rspec', '~> 2.6'
35
42
  s.add_development_dependency 'rake', '~> 0.9.2'
36
43
  s.add_development_dependency 'yard', '~> 0.7.2'
37
- s.add_development_dependency 'ci_reporter', '~> 1.6.5'
44
+ s.add_development_dependency 'ci_reporter', '1.6.6'
38
45
  s.add_development_dependency 'fakefs', '~> 0.4.0'
39
46
  end
@@ -394,6 +394,20 @@ module NcsNavigator::Warehouse
394
394
  subject.bcdatabase_group.should == :custom
395
395
  end
396
396
 
397
+ describe 'source file tracking' do
398
+ it 'knows what file it came from' do
399
+ write_file { }
400
+ subject.configuration_file.to_s.should == filename.to_s
401
+ end
402
+
403
+ it 'resolves relative paths' do
404
+ write_file { }
405
+ FileUtils.cd tmpdir do
406
+ Configuration.from_file('test.rb').configuration_file.to_s.should == filename.to_s
407
+ end
408
+ end
409
+ end
410
+
397
411
  describe 'with errors' do
398
412
  before do
399
413
  write_file do |f|
@@ -9,6 +9,10 @@ module NcsNavigator::Warehouse::DataMapper
9
9
  it 'uses the default method for other types' do
10
10
  subject.send(:typecast_to_primitive, 45).should == '45'
11
11
  end
12
+
13
+ it 'is not lazily-loaded' do
14
+ subject.options[:lazy].should be_false
15
+ end
12
16
  end
13
17
 
14
18
  describe NcsString, :modifies_warehouse_state do
@@ -1,7 +1,5 @@
1
1
  require File.expand_path('../../../../spec_helper', __FILE__)
2
2
 
3
- require 'data_mapper'
4
-
5
3
  module NcsNavigator::Warehouse::Models
6
4
  module Spec
7
5
  ##
@@ -1,7 +1,6 @@
1
1
  require File.expand_path('../../../spec_helper', __FILE__)
2
2
 
3
3
  require 'ncs_navigator/mdes'
4
- require 'data_mapper'
5
4
 
6
5
  module NcsNavigator::Warehouse
7
6
  module Spec
@@ -0,0 +1,35 @@
1
+ require File.expand_path('../../../spec_helper', __FILE__)
2
+
3
+ module NcsNavigator::Warehouse
4
+ class SampleRecordishThing
5
+ include ::DataMapper::Resource
6
+ property :record_id, Serial, :key => true
7
+ end
8
+
9
+ SampleRecordishThing.finalize
10
+
11
+ describe TransformStatus do
12
+ subject { TransformStatus.memory_only('DC') }
13
+
14
+ describe '#unsuccessful_record' do
15
+ let(:rec) { SampleRecordishThing.new.tap { |t| t.record_id = 42 } }
16
+ let(:actual) { subject.transform_errors.last }
17
+
18
+ before do
19
+ subject.unsuccessful_record(rec, 'bad news')
20
+ end
21
+
22
+ it 'includes the record ID' do
23
+ actual.record_id.should == '42'
24
+ end
25
+
26
+ it 'includes the class' do
27
+ actual.model_class.should == SampleRecordishThing.to_s
28
+ end
29
+
30
+ it 'includes the message' do
31
+ actual.message.should == 'bad news'
32
+ end
33
+ end
34
+ end
35
+ end