enju_grid 0.1.0.pre1

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 (341) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +8 -0
  4. data/Rakefile +47 -0
  5. data/app/views/layouts/manifestations.html.erb +28 -0
  6. data/app/views/manifestations/_manifestation.html.erb +6 -0
  7. data/app/views/manifestations/index.html.erb +125 -0
  8. data/config/routes.rb +2 -0
  9. data/lib/enju_grid/engine.rb +6 -0
  10. data/lib/enju_grid/version.rb +3 -0
  11. data/lib/enju_grid.rb +5 -0
  12. data/lib/tasks/enju_grid_tasks.rake +4 -0
  13. data/spec/dummy/README.rdoc +261 -0
  14. data/spec/dummy/Rakefile +7 -0
  15. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  16. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  17. data/spec/dummy/app/controllers/application_controller.rb +8 -0
  18. data/spec/dummy/app/helpers/application_helper.rb +8 -0
  19. data/spec/dummy/app/models/ability.rb +201 -0
  20. data/spec/dummy/app/models/user.rb +9 -0
  21. data/spec/dummy/app/views/layouts/application.html.erb +14 -0
  22. data/spec/dummy/app/views/page/403.html.erb +9 -0
  23. data/spec/dummy/app/views/page/403.mobile.erb +5 -0
  24. data/spec/dummy/app/views/page/403.xml.erb +4 -0
  25. data/spec/dummy/app/views/page/404.html.erb +9 -0
  26. data/spec/dummy/app/views/page/404.mobile.erb +5 -0
  27. data/spec/dummy/app/views/page/404.xml.erb +4 -0
  28. data/spec/dummy/app/views/page/_footer.html.erb +4 -0
  29. data/spec/dummy/app/views/page/_header.html.erb +2 -0
  30. data/spec/dummy/app/views/page/_include.html.erb +4 -0
  31. data/spec/dummy/app/views/page/_menu.html.erb +2 -0
  32. data/spec/dummy/app/views/page/_select_locale.html.erb +2 -0
  33. data/spec/dummy/config/application.rb +64 -0
  34. data/spec/dummy/config/application.yml +42 -0
  35. data/spec/dummy/config/boot.rb +10 -0
  36. data/spec/dummy/config/database.yml +25 -0
  37. data/spec/dummy/config/environment.rb +5 -0
  38. data/spec/dummy/config/environments/development.rb +37 -0
  39. data/spec/dummy/config/environments/production.rb +67 -0
  40. data/spec/dummy/config/environments/test.rb +38 -0
  41. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  42. data/spec/dummy/config/initializers/devise.rb +207 -0
  43. data/spec/dummy/config/initializers/inflections.rb +18 -0
  44. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  45. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  46. data/spec/dummy/config/initializers/session_store.rb +8 -0
  47. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  48. data/spec/dummy/config/locales/en.yml +5 -0
  49. data/spec/dummy/config/routes.rb +60 -0
  50. data/spec/dummy/config.ru +4 -0
  51. data/spec/dummy/db/migrate/001_create_agents.rb +50 -0
  52. data/spec/dummy/db/migrate/002_devise_create_users.rb +46 -0
  53. data/spec/dummy/db/migrate/005_create_manifestations.rb +43 -0
  54. data/spec/dummy/db/migrate/006_create_items.rb +21 -0
  55. data/spec/dummy/db/migrate/012_create_owns.rb +12 -0
  56. data/spec/dummy/db/migrate/015_create_creates.rb +12 -0
  57. data/spec/dummy/db/migrate/029_create_subjects.rb +27 -0
  58. data/spec/dummy/db/migrate/032_create_checkins.rb +17 -0
  59. data/spec/dummy/db/migrate/033_create_checkouts.rb +25 -0
  60. data/spec/dummy/db/migrate/035_create_reserves.rb +26 -0
  61. data/spec/dummy/db/migrate/041_create_roles.rb +13 -0
  62. data/spec/dummy/db/migrate/047_create_produces.rb +12 -0
  63. data/spec/dummy/db/migrate/055_create_bookmarks.rb +22 -0
  64. data/spec/dummy/db/migrate/059_create_libraries.rb +28 -0
  65. data/spec/dummy/db/migrate/069_create_shelves.rb +15 -0
  66. data/spec/dummy/db/migrate/073_create_carrier_types.rb +11 -0
  67. data/spec/dummy/db/migrate/077_create_user_groups.rb +12 -0
  68. data/spec/dummy/db/migrate/080_create_library_groups.rb +17 -0
  69. data/spec/dummy/db/migrate/112_create_frequencies.rb +12 -0
  70. data/spec/dummy/db/migrate/117_create_form_of_works.rb +12 -0
  71. data/spec/dummy/db/migrate/120_create_baskets.rb +12 -0
  72. data/spec/dummy/db/migrate/121_create_checked_items.rb +17 -0
  73. data/spec/dummy/db/migrate/124_create_bookstores.rb +17 -0
  74. data/spec/dummy/db/migrate/125_create_donates.rb +12 -0
  75. data/spec/dummy/db/migrate/127_create_use_restrictions.rb +16 -0
  76. data/spec/dummy/db/migrate/129_create_item_has_use_restrictions.rb +16 -0
  77. data/spec/dummy/db/migrate/130_create_request_status_types.rb +12 -0
  78. data/spec/dummy/db/migrate/131_create_request_types.rb +12 -0
  79. data/spec/dummy/db/migrate/132_create_circulation_statuses.rb +16 -0
  80. data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
  81. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
  82. data/spec/dummy/db/migrate/142_create_classifications.rb +19 -0
  83. data/spec/dummy/db/migrate/144_create_classification_types.rb +16 -0
  84. data/spec/dummy/db/migrate/145_create_subject_heading_types.rb +16 -0
  85. data/spec/dummy/db/migrate/146_create_subject_types.rb +16 -0
  86. data/spec/dummy/db/migrate/20080830154109_create_realizes.rb +13 -0
  87. data/spec/dummy/db/migrate/20080830172106_create_exemplifies.rb +13 -0
  88. data/spec/dummy/db/migrate/20080905191442_create_agent_types.rb +12 -0
  89. data/spec/dummy/db/migrate/20081006090811_create_subscriptions.rb +17 -0
  90. data/spec/dummy/db/migrate/20081006093246_create_subscribes.rb +14 -0
  91. data/spec/dummy/db/migrate/20081023092436_create_search_engines.rb +17 -0
  92. data/spec/dummy/db/migrate/20081025083323_create_countries.rb +28 -0
  93. data/spec/dummy/db/migrate/20081025083905_create_languages.rb +23 -0
  94. data/spec/dummy/db/migrate/20081027150907_create_picture_files.rb +15 -0
  95. data/spec/dummy/db/migrate/20081028083142_create_agent_import_files.rb +20 -0
  96. data/spec/dummy/db/migrate/20081028083208_create_resource_import_files.rb +20 -0
  97. data/spec/dummy/db/migrate/20081030023412_create_checkout_types.rb +17 -0
  98. data/spec/dummy/db/migrate/20081030023518_create_user_group_has_checkout_types.rb +25 -0
  99. data/spec/dummy/db/migrate/20081030023615_create_carrier_type_has_checkout_types.rb +18 -0
  100. data/spec/dummy/db/migrate/20081212075554_create_checkout_stat_has_manifestations.rb +17 -0
  101. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +15 -0
  102. data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +13 -0
  103. data/spec/dummy/db/migrate/20081212151820_create_bookmark_stat_has_manifestations.rb +13 -0
  104. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +15 -0
  105. data/spec/dummy/db/migrate/20081215094955_create_checkout_stat_has_users.rb +17 -0
  106. data/spec/dummy/db/migrate/20081216190517_create_reserve_stat_has_manifestations.rb +17 -0
  107. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +15 -0
  108. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +15 -0
  109. data/spec/dummy/db/migrate/20081220034117_create_reserve_stat_has_users.rb +17 -0
  110. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +23 -0
  111. data/spec/dummy/db/migrate/20090705133942_add_attachments_picture_to_picture_file.rb +15 -0
  112. data/spec/dummy/db/migrate/20090705212043_add_attachments_attachment_to_manifestation.rb +15 -0
  113. data/spec/dummy/db/migrate/20090720091106_create_medium_of_performances.rb +12 -0
  114. data/spec/dummy/db/migrate/20090720091429_create_content_types.rb +12 -0
  115. data/spec/dummy/db/migrate/20090812151902_create_agent_relationship_types.rb +12 -0
  116. data/spec/dummy/db/migrate/20090831220301_create_lending_policies.rb +21 -0
  117. data/spec/dummy/db/migrate/20091012101112_add_dcndl_schema.rb +27 -0
  118. data/spec/dummy/db/migrate/20091025080447_create_licenses.rb +12 -0
  119. data/spec/dummy/db/migrate/20091202124834_create_versions.rb +18 -0
  120. data/spec/dummy/db/migrate/20091214131723_create_series_statements.rb +13 -0
  121. data/spec/dummy/db/migrate/20100129142347_create_import_requests.rb +14 -0
  122. data/spec/dummy/db/migrate/20100211105551_add_admin_networks_to_library_group.rb +9 -0
  123. data/spec/dummy/db/migrate/20100222124420_add_allow_bookmark_external_url_to_library_group.rb +9 -0
  124. data/spec/dummy/db/migrate/20100223121519_rename_series_statement_title_to_original_title.rb +13 -0
  125. data/spec/dummy/db/migrate/20100314190054_add_opening_hour_to_library.rb +9 -0
  126. data/spec/dummy/db/migrate/20100321235924_add_series_statement_identifier_to_series_statement.rb +10 -0
  127. data/spec/dummy/db/migrate/20100525124311_create_manifestation_relationships.rb +13 -0
  128. data/spec/dummy/db/migrate/20100525171356_acts_as_taggable_on_migration.rb +30 -0
  129. data/spec/dummy/db/migrate/20100606065209_create_user_has_roles.rb +12 -0
  130. data/spec/dummy/db/migrate/20100606073747_create_agent_relationships.rb +13 -0
  131. data/spec/dummy/db/migrate/20100607044753_create_manifestation_relationship_types.rb +12 -0
  132. data/spec/dummy/db/migrate/20100814091104_add_position_to_agent_relationship.rb +11 -0
  133. data/spec/dummy/db/migrate/20100925043847_create_resource_import_results.rb +15 -0
  134. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +11 -0
  135. data/spec/dummy/db/migrate/20101212070145_add_acquired_at_to_item.rb +9 -0
  136. data/spec/dummy/db/migrate/20110222073537_add_url_to_library_group.rb +9 -0
  137. data/spec/dummy/db/migrate/20110301035123_add_pub_date_to_manifestation.rb +9 -0
  138. data/spec/dummy/db/migrate/20110301121550_add_birth_date_and_death_date_to_agent.rb +11 -0
  139. data/spec/dummy/db/migrate/20110301134521_add_expire_date_to_reserve.rb +9 -0
  140. data/spec/dummy/db/migrate/20110318183304_add_valid_period_for_new_user_to_user_group.rb +11 -0
  141. data/spec/dummy/db/migrate/20110328130826_add_current_checkout_count_to_user_group_has_checkout_type.rb +9 -0
  142. data/spec/dummy/db/migrate/20110603184217_add_edit_mode_to_resource_import_file.rb +9 -0
  143. data/spec/dummy/db/migrate/20110619064807_add_edition_string_to_manifestation.rb +9 -0
  144. data/spec/dummy/db/migrate/20110620173525_add_bookstore_id_to_item.rb +11 -0
  145. data/spec/dummy/db/migrate/20110621093332_remove_expire_date_from_reserve.rb +9 -0
  146. data/spec/dummy/db/migrate/20110627034940_create_series_statement_merge_lists.rb +9 -0
  147. data/spec/dummy/db/migrate/20110627035057_create_series_statement_merges.rb +12 -0
  148. data/spec/dummy/db/migrate/20110627122938_add_number_of_day_to_notify_overdue_to_user_group.rb +13 -0
  149. data/spec/dummy/db/migrate/20110913120629_add_lft_and_rgt_to_classification.rb +11 -0
  150. data/spec/dummy/db/migrate/20110916091020_add_volume_number_to_manifestation.rb +13 -0
  151. data/spec/dummy/db/migrate/20110916103953_add_manifestaiton_id_to_series_statement.rb +10 -0
  152. data/spec/dummy/db/migrate/20110918162329_add_note_to_series_statement.rb +9 -0
  153. data/spec/dummy/db/migrate/20111124110059_create_create_types.rb +12 -0
  154. data/spec/dummy/db/migrate/20111124110319_create_realize_types.rb +12 -0
  155. data/spec/dummy/db/migrate/20111124110355_create_produce_types.rb +12 -0
  156. data/spec/dummy/db/migrate/20111124112131_add_create_type_to_create.rb +7 -0
  157. data/spec/dummy/db/migrate/20111217234412_add_save_checkout_history_to_user.rb +5 -0
  158. data/spec/dummy/db/migrate/20111218002349_add_checkout_icalendar_token_to_user.rb +6 -0
  159. data/spec/dummy/db/migrate/20111231145823_add_share_bookmarks_to_user.rb +5 -0
  160. data/spec/dummy/db/migrate/20120105074911_add_isil_to_library.rb +5 -0
  161. data/spec/dummy/db/migrate/20120125152919_add_title_subseries_transcription_to_series_statement.rb +6 -0
  162. data/spec/dummy/db/migrate/20120129014038_create_budget_types.rb +12 -0
  163. data/spec/dummy/db/migrate/20120129020544_add_budget_type_id_to_item.rb +6 -0
  164. data/spec/dummy/db/migrate/20120319120638_add_content_type_id_to_manifestation.rb +6 -0
  165. data/spec/dummy/db/migrate/20120319173203_create_accepts.rb +14 -0
  166. data/spec/dummy/db/migrate/20120406020752_add_url_to_subject.rb +5 -0
  167. data/spec/dummy/db/migrate/20120410104851_add_year_of_publication_to_manifestation.rb +5 -0
  168. data/spec/dummy/db/migrate/20120413072700_add_picture_meta_to_picture_file.rb +5 -0
  169. data/spec/dummy/db/migrate/20120413100352_add_fingerprint_to_picture_file.rb +5 -0
  170. data/spec/dummy/db/migrate/20120413161340_add_fingerprint_to_resource_import_file.rb +5 -0
  171. data/spec/dummy/db/migrate/20120413161403_add_fingerprint_to_agent_import_file.rb +5 -0
  172. data/spec/dummy/db/migrate/20120413170705_add_error_message_to_resource_import_file.rb +5 -0
  173. data/spec/dummy/db/migrate/20120413170720_add_error_message_to_agent_import_file.rb +5 -0
  174. data/spec/dummy/db/migrate/20120415164821_add_attachment_meta_to_manifestation.rb +5 -0
  175. data/spec/dummy/db/migrate/20120418081407_add_month_of_publication_to_manifestation.rb +5 -0
  176. data/spec/dummy/db/migrate/20120424103932_add_librarian_id_to_checked_item.rb +5 -0
  177. data/spec/dummy/db/migrate/20120510140958_add_closed_to_shelf.rb +5 -0
  178. data/spec/dummy/db/migrate/20120511072422_add_agent_identifier_to_agent.rb +6 -0
  179. data/spec/dummy/db/migrate/20120602141129_add_edit_mode_to_agent_import_file.rb +5 -0
  180. data/spec/dummy/db/migrate/20121116031206_add_fulltext_content_to_manifestation.rb +5 -0
  181. data/spec/dummy/db/migrate/20130221154434_add_additional_attributes_to_user.rb +16 -0
  182. data/spec/dummy/db/migrate/20130303124821_add_retained_at_to_reserve.rb +5 -0
  183. data/spec/dummy/db/migrate/20130304015019_add_postponed_at_to_reserve.rb +5 -0
  184. data/spec/dummy/db/migrate/20130412083556_add_latitude_and_longitude_to_library.rb +6 -0
  185. data/spec/dummy/db/migrate/20130416054135_add_circulation_status_id_to_item.rb +8 -0
  186. data/spec/dummy/db/migrate/20130421093852_add_periodical_to_manifestation.rb +5 -0
  187. data/spec/dummy/db/migrate/20130421155019_add_creator_string_to_series_statement.rb +7 -0
  188. data/spec/dummy/db/migrate/20130421164124_add_series_master_to_series_statement.rb +5 -0
  189. data/spec/dummy/db/migrate/20130429020822_add_root_manifestation_id_to_series_statement.rb +6 -0
  190. data/spec/dummy/db/migrate/20130504133816_add_manifestation_id_to_subject.rb +6 -0
  191. data/spec/dummy/db/migrate/20130504143515_add_manifestation_id_to_classification.rb +6 -0
  192. data/spec/dummy/db/migrate/20130504195916_add_subject_heading_type_id_to_subject.rb +5 -0
  193. data/spec/dummy/db/migrate/20130506175303_create_identifier_types.rb +12 -0
  194. data/spec/dummy/db/migrate/20130506175834_create_identifiers.rb +15 -0
  195. data/spec/dummy/db/migrate/20130509185724_add_statement_of_responsibility_to_manifestation.rb +5 -0
  196. data/spec/dummy/db/migrate/20130519065638_add_lock_version_to_reserve.rb +5 -0
  197. data/spec/dummy/db/migrate/20130519065837_add_lock_version_to_checkin.rb +5 -0
  198. data/spec/dummy/db/migrate/20140110122216_create_user_import_files.rb +18 -0
  199. data/spec/dummy/db/migrate/20140110131010_create_user_import_results.rb +11 -0
  200. data/spec/dummy/db/migrate/20140122054321_create_profiles.rb +20 -0
  201. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +14 -0
  202. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +18 -0
  203. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +18 -0
  204. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +18 -0
  205. data/spec/dummy/db/migrate/20140524074813_create_user_import_file_transitions.rb +18 -0
  206. data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +14 -0
  207. data/spec/dummy/db/migrate/20140524142813_add_taggings_count_to_tag.rb +5 -0
  208. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +14 -0
  209. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +14 -0
  210. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +14 -0
  211. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +14 -0
  212. data/spec/dummy/db/migrate/20140610123439_drop_email_unique_constraint_enju_leaf_rc10.rb +11 -0
  213. data/spec/dummy/db/migrate/20140614065404_create_resource_export_files.rb +11 -0
  214. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +18 -0
  215. data/spec/dummy/db/migrate/20140628072217_add_user_encoding_to_user_import_file.rb +5 -0
  216. data/spec/dummy/db/migrate/20140628073524_add_user_encoding_to_agent_import_file.rb +5 -0
  217. data/spec/dummy/db/migrate/20140628073535_add_user_encoding_to_resource_import_file.rb +5 -0
  218. data/spec/dummy/db/migrate/20140709113413_create_user_export_files.rb +11 -0
  219. data/spec/dummy/db/migrate/20140709113905_create_user_export_file_transitions.rb +18 -0
  220. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
  221. data/spec/dummy/db/migrate/20140720170714_add_default_library_id_to_user_import_file.rb +5 -0
  222. data/spec/dummy/db/migrate/20140720170735_add_default_user_group_id_to_user_import_file.rb +5 -0
  223. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
  224. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
  225. data/spec/dummy/db/migrate/20140810061942_add_user_id_to_user_checkout_stat.rb +12 -0
  226. data/spec/dummy/db/migrate/20140810091231_add_checkout_icalendar_token_to_profile.rb +6 -0
  227. data/spec/dummy/db/migrate/20140810091417_add_save_checkout_history_to_profile.rb +5 -0
  228. data/spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb +5 -0
  229. data/spec/dummy/db/migrate/20140812093836_add_share_bookmarks_to_profile.rb +5 -0
  230. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
  231. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  232. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
  233. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
  234. data/spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb +5 -0
  235. data/spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb +9 -0
  236. data/spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  237. data/spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  238. data/spec/dummy/db/migrate/20150117111136_add_foreign_key_to_items_referencing_manifestations.rb +5 -0
  239. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +5 -0
  240. data/spec/dummy/db/migrate/20150421023923_create_identities.rb +15 -0
  241. data/spec/dummy/db/migrate/20150506105356_add_error_message_to_user_import_result.rb +5 -0
  242. data/spec/dummy/db/migrate/20150923173139_add_url_to_classification.rb +5 -0
  243. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
  244. data/spec/dummy/db/migrate/20150925092505_add_label_to_classification.rb +5 -0
  245. data/spec/dummy/db/schema.rb +1451 -0
  246. data/spec/dummy/public/404.html +26 -0
  247. data/spec/dummy/public/422.html +26 -0
  248. data/spec/dummy/public/500.html +25 -0
  249. data/spec/dummy/public/favicon.ico +0 -0
  250. data/spec/dummy/script/rails +6 -0
  251. data/spec/factories/agent.rb +13 -0
  252. data/spec/factories/agent_relationship.rb +6 -0
  253. data/spec/factories/agent_relationship_type.rb +5 -0
  254. data/spec/factories/agent_type.rb +5 -0
  255. data/spec/factories/basket.rb +5 -0
  256. data/spec/factories/carrier_type.rb +5 -0
  257. data/spec/factories/content_type.rb +5 -0
  258. data/spec/factories/country.rb +8 -0
  259. data/spec/factories/create.rb +6 -0
  260. data/spec/factories/create_types.rb +9 -0
  261. data/spec/factories/donate.rb +6 -0
  262. data/spec/factories/exemplify.rb +6 -0
  263. data/spec/factories/extent.rb +5 -0
  264. data/spec/factories/form_of_work.rb +5 -0
  265. data/spec/factories/frequency.rb +5 -0
  266. data/spec/factories/import_request.rb +5 -0
  267. data/spec/factories/item.rb +7 -0
  268. data/spec/factories/language.rb +8 -0
  269. data/spec/factories/library.rb +13 -0
  270. data/spec/factories/license.rb +5 -0
  271. data/spec/factories/manifestation.rb +6 -0
  272. data/spec/factories/manifestation_relationship.rb +6 -0
  273. data/spec/factories/manifestation_relationship_type.rb +5 -0
  274. data/spec/factories/medium_of_performance.rb +5 -0
  275. data/spec/factories/own.rb +6 -0
  276. data/spec/factories/produce.rb +6 -0
  277. data/spec/factories/produce_types.rb +9 -0
  278. data/spec/factories/profile.rb +10 -0
  279. data/spec/factories/realize.rb +6 -0
  280. data/spec/factories/realize_types.rb +9 -0
  281. data/spec/factories/series_has_manifestation.rb +6 -0
  282. data/spec/factories/series_statement.rb +5 -0
  283. data/spec/factories/series_statement_relationship.rb +8 -0
  284. data/spec/factories/user.rb +46 -0
  285. data/spec/fixtures/agent_relationship_types.yml +34 -0
  286. data/spec/fixtures/agent_relationships.yml +25 -0
  287. data/spec/fixtures/agent_types.yml +35 -0
  288. data/spec/fixtures/agents.yml +327 -0
  289. data/spec/fixtures/baskets.yml +80 -0
  290. data/spec/fixtures/bookstores.yml +107 -0
  291. data/spec/fixtures/budget_types.yml +29 -0
  292. data/spec/fixtures/carrier_types.yml +51 -0
  293. data/spec/fixtures/content_types.yml +36 -0
  294. data/spec/fixtures/countries.yml +2059 -0
  295. data/spec/fixtures/create_types.yml +47 -0
  296. data/spec/fixtures/creates.yml +64 -0
  297. data/spec/fixtures/donates.yml +31 -0
  298. data/spec/fixtures/exemplifies.yml +160 -0
  299. data/spec/fixtures/form_of_works.yml +39 -0
  300. data/spec/fixtures/frequencies.yml +85 -0
  301. data/spec/fixtures/identifier_types.yml +36 -0
  302. data/spec/fixtures/identifiers.yml +113 -0
  303. data/spec/fixtures/import_requests.yml +24 -0
  304. data/spec/fixtures/items.yml +283 -0
  305. data/spec/fixtures/languages.yml +1901 -0
  306. data/spec/fixtures/libraries.yml +102 -0
  307. data/spec/fixtures/library_groups.yml +31 -0
  308. data/spec/fixtures/licenses.yml +29 -0
  309. data/spec/fixtures/manifestation_relationship_types.yml +29 -0
  310. data/spec/fixtures/manifestation_relationships.yml +30 -0
  311. data/spec/fixtures/manifestations.yml +1881 -0
  312. data/spec/fixtures/medium_of_performances.yml +29 -0
  313. data/spec/fixtures/owns.yml +26 -0
  314. data/spec/fixtures/picture_files.yml +63 -0
  315. data/spec/fixtures/produce_types.yml +31 -0
  316. data/spec/fixtures/produces.yml +148 -0
  317. data/spec/fixtures/profiles.yml +98 -0
  318. data/spec/fixtures/realize_types.yml +39 -0
  319. data/spec/fixtures/realizes.yml +85 -0
  320. data/spec/fixtures/request_status_types.yml +63 -0
  321. data/spec/fixtures/request_types.yml +55 -0
  322. data/spec/fixtures/reserve_transitions.yml +88 -0
  323. data/spec/fixtures/resource_import_files.yml +43 -0
  324. data/spec/fixtures/resource_import_results.yml +29 -0
  325. data/spec/fixtures/roles.yml +21 -0
  326. data/spec/fixtures/series_statements.yml +56 -0
  327. data/spec/fixtures/shelves.yml +47 -0
  328. data/spec/fixtures/user_groups.yml +51 -0
  329. data/spec/fixtures/user_has_roles.yml +41 -0
  330. data/spec/fixtures/users.yml +51 -0
  331. data/spec/spec_helper.rb +51 -0
  332. data/spec/support/controller_macros.rb +46 -0
  333. data/spec/support/devise.rb +4 -0
  334. data/spec/views/manifestations/index.html.erb_spec.rb +34 -0
  335. data/spec/views/manifestations/show.html.erb_spec.rb +18 -0
  336. data/vendor/assets/stylesheets/images/ajax-loader.gif +0 -0
  337. data/vendor/assets/stylesheets/images/icons-18-black.png +0 -0
  338. data/vendor/assets/stylesheets/images/icons-18-white.png +0 -0
  339. data/vendor/assets/stylesheets/images/icons-36-black.png +0 -0
  340. data/vendor/assets/stylesheets/images/icons-36-white.png +0 -0
  341. metadata +873 -0
@@ -0,0 +1,207 @@
1
+ # Use this hook to configure devise mailer, warden hooks and so forth.
2
+ # Many of these configuration options can be set straight in your model.
3
+ Devise.setup do |config|
4
+ config.secret_key = 'b8ea232c09a0e131f5b694670553c81f379dde14a1234ff7f53b9d971dc5148fe318066f3d4f5e0d92ebfb100d756d3dfde6ca68a404296a81b621edc7f5d732'
5
+
6
+ # ==> Mailer Configuration
7
+ # Configure the e-mail address which will be shown in Devise::Mailer,
8
+ # note that it will be overwritten if you use your own mailer class with default "from" parameter.
9
+ config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
10
+
11
+ # Configure the class responsible to send e-mails.
12
+ # config.mailer = "Devise::Mailer"
13
+
14
+ # ==> ORM configuration
15
+ # Load and configure the ORM. Supports :active_record (default) and
16
+ # :mongoid (bson_ext recommended) by default. Other ORMs may be
17
+ # available as additional gems.
18
+ require 'devise/orm/active_record'
19
+
20
+ # ==> Configuration for any authentication mechanism
21
+ # Configure which keys are used when authenticating a user. The default is
22
+ # just :email. You can configure it to use [:username, :subdomain], so for
23
+ # authenticating a user, both parameters are required. Remember that those
24
+ # parameters are used only when authenticating and not when retrieving from
25
+ # session. If you need permissions, you should implement that in a before filter.
26
+ # You can also supply a hash where the value is a boolean determining whether
27
+ # or not authentication should be aborted when the value is not present.
28
+ # config.authentication_keys = [ :email ]
29
+
30
+ # Configure parameters from the request object used for authentication. Each entry
31
+ # given should be a request method and it will automatically be passed to the
32
+ # find_for_authentication method and considered in your model lookup. For instance,
33
+ # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
34
+ # The same considerations mentioned for authentication_keys also apply to request_keys.
35
+ # config.request_keys = []
36
+
37
+ # Configure which authentication keys should be case-insensitive.
38
+ # These keys will be downcased upon creating or modifying a user and when used
39
+ # to authenticate or find a user. Default is :email.
40
+ config.case_insensitive_keys = [ :email ]
41
+
42
+ # Configure which authentication keys should have whitespace stripped.
43
+ # These keys will have whitespace before and after removed upon creating or
44
+ # modifying a user and when used to authenticate or find a user. Default is :email.
45
+ config.strip_whitespace_keys = [ :email ]
46
+
47
+ # Tell if authentication through request.params is enabled. True by default.
48
+ # config.params_authenticatable = true
49
+
50
+ # Tell if authentication through HTTP Basic Auth is enabled. False by default.
51
+ # config.http_authenticatable = false
52
+
53
+ # If http headers should be returned for AJAX requests. True by default.
54
+ # config.http_authenticatable_on_xhr = true
55
+
56
+ # The realm used in Http Basic Authentication. "Application" by default.
57
+ # config.http_authentication_realm = "Application"
58
+
59
+ # It will change confirmation, password recovery and other workflows
60
+ # to behave the same regardless if the e-mail provided was right or wrong.
61
+ # Does not affect registerable.
62
+ # config.paranoid = true
63
+
64
+ # ==> Configuration for :database_authenticatable
65
+ # For bcrypt, this is the cost for hashing the password and defaults to 10. If
66
+ # using other encryptors, it sets how many times you want the password re-encrypted.
67
+ #
68
+ # Limiting the stretches to just one in testing will increase the performance of
69
+ # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
70
+ # a value less than 10 in other environments.
71
+ config.stretches = Rails.env.test? ? 1 : 10
72
+
73
+ # Setup a pepper to generate the encrypted password.
74
+ # config.pepper = "9c3e60feae3030ec50d52f408005d7083c980b028e24e96536c60829394fd7cf5e26fdfed03e48b756b8bbf16177d73cca8cc6d036b2e916c953faf8d2c0238c"
75
+
76
+ # ==> Configuration for :confirmable
77
+ # A period that the user is allowed to access the website even without
78
+ # confirming his account. For instance, if set to 2.days, the user will be
79
+ # able to access the website for two days without confirming his account,
80
+ # access will be blocked just in the third day. Default is 0.days, meaning
81
+ # the user cannot access the website without confirming his account.
82
+ # config.confirm_within = 2.days
83
+
84
+ # Defines which key will be used when confirming an account
85
+ # config.confirmation_keys = [ :email ]
86
+
87
+ # ==> Configuration for :rememberable
88
+ # The time the user will be remembered without asking for credentials again.
89
+ # config.remember_for = 2.weeks
90
+
91
+ # If true, a valid remember token can be re-used between multiple browsers.
92
+ # config.remember_across_browsers = true
93
+
94
+ # If true, extends the user's remember period when remembered via cookie.
95
+ # config.extend_remember_period = false
96
+
97
+ # Options to be passed to the created cookie. For instance, you can set
98
+ # :secure => true in order to force SSL only cookies.
99
+ # config.cookie_options = {}
100
+
101
+ # ==> Configuration for :validatable
102
+ # Range for password length. Default is 6..128.
103
+ # config.password_length = 6..128
104
+
105
+ # Email regex used to validate email formats. It simply asserts that
106
+ # an one (and only one) @ exists in the given string. This is mainly
107
+ # to give user feedback and not to assert the e-mail validity.
108
+ # config.email_regexp = /\A[^@]+@[^@]+\z/
109
+
110
+ # ==> Configuration for :timeoutable
111
+ # The time you want to timeout the user session without activity. After this
112
+ # time the user will be asked for credentials again. Default is 30 minutes.
113
+ # config.timeout_in = 30.minutes
114
+
115
+ # ==> Configuration for :lockable
116
+ # Defines which strategy will be used to lock an account.
117
+ # :failed_attempts = Locks an account after a number of failed attempts to sign in.
118
+ # :none = No lock strategy. You should handle locking by yourself.
119
+ # config.lock_strategy = :failed_attempts
120
+
121
+ # Defines which key will be used when locking and unlocking an account
122
+ # config.unlock_keys = [ :email ]
123
+
124
+ # Defines which strategy will be used to unlock an account.
125
+ # :email = Sends an unlock link to the user email
126
+ # :time = Re-enables login after a certain amount of time (see :unlock_in below)
127
+ # :both = Enables both strategies
128
+ # :none = No unlock strategy. You should handle unlocking by yourself.
129
+ # config.unlock_strategy = :both
130
+
131
+ # Number of authentication tries before locking an account if lock_strategy
132
+ # is failed attempts.
133
+ # config.maximum_attempts = 20
134
+
135
+ # Time interval to unlock the account if :time is enabled as unlock_strategy.
136
+ # config.unlock_in = 1.hour
137
+
138
+ # ==> Configuration for :recoverable
139
+ #
140
+ # Defines which key will be used when recovering the password for an account
141
+ # config.reset_password_keys = [ :email ]
142
+
143
+ # Time interval you can reset your password with a reset password key.
144
+ # Don't put a too small interval or your users won't have the time to
145
+ # change their passwords.
146
+ config.reset_password_within = 2.hours
147
+
148
+ # ==> Configuration for :encryptable
149
+ # Allow you to use another encryption algorithm besides bcrypt (default). You can use
150
+ # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
151
+ # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
152
+ # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
153
+ # REST_AUTH_SITE_KEY to pepper)
154
+ # config.encryptor = :sha512
155
+
156
+ # ==> Configuration for :token_authenticatable
157
+ # Defines name of the authentication token params key
158
+ # config.token_authentication_key = :auth_token
159
+
160
+ # If true, authentication through token does not store user in session and needs
161
+ # to be supplied on each request. Useful if you are using the token as API token.
162
+ # config.stateless_token = false
163
+
164
+ # ==> Scopes configuration
165
+ # Turn scoped views on. Before rendering "sessions/new", it will first check for
166
+ # "users/sessions/new". It's turned off by default because it's slower if you
167
+ # are using only default views.
168
+ # config.scoped_views = false
169
+
170
+ # Configure the default scope given to Warden. By default it's the first
171
+ # devise role declared in your routes (usually :user).
172
+ # config.default_scope = :user
173
+
174
+ # Configure sign_out behavior.
175
+ # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
176
+ # The default is true, which means any logout action will sign out all active scopes.
177
+ # config.sign_out_all_scopes = true
178
+
179
+ # ==> Navigation configuration
180
+ # Lists the formats that should be treated as navigational. Formats like
181
+ # :html, should redirect to the sign in page when the user does not have
182
+ # access, but formats like :xml or :json, should return 401.
183
+ #
184
+ # If you have any extra navigational formats, like :iphone or :mobile, you
185
+ # should add them to the navigational formats lists.
186
+ #
187
+ # The :"*/*" and "*/*" formats below is required to match Internet
188
+ # Explorer requests.
189
+ # config.navigational_formats = [:"*/*", "*/*", :html]
190
+
191
+ # The default HTTP method used to sign out a resource. Default is :delete.
192
+ config.sign_out_via = :delete
193
+
194
+ # ==> OmniAuth
195
+ # Add a new OmniAuth provider. Check the wiki for more information on setting
196
+ # up on your models and hooks.
197
+ # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
198
+
199
+ # ==> Warden configuration
200
+ # If you want to use other strategies, that are not supported by Devise, or
201
+ # change the failure app, you can configure them inside the config.warden block.
202
+ #
203
+ # config.warden do |manager|
204
+ # manager.intercept_401 = false
205
+ # manager.default_strategies(:scope => :user).unshift :some_external_strategy
206
+ # end
207
+ end
@@ -0,0 +1,18 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format
4
+ # (all these examples are active by default):
5
+ # ActiveSupport::Inflector.inflections do |inflect|
6
+ # inflect.plural /^(ox)$/i, '\1en'
7
+ # inflect.singular /^(ox)en/i, '\1'
8
+ # inflect.irregular 'person', 'people'
9
+ # inflect.uncountable %w( fish sheep )
10
+ # end
11
+ #
12
+ # These inflection rules are supported but not enabled by default:
13
+ # ActiveSupport::Inflector.inflections do |inflect|
14
+ # inflect.acronym 'RESTful'
15
+ # end
16
+ ActiveSupport::Inflector.inflections do |inflect|
17
+ inflect.irregular 'reserve', 'reserves'
18
+ end
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,7 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying the integrity of signed cookies.
4
+ # If you change this key, all old signed cookies will become invalid!
5
+ # Make sure the secret is at least 30 characters and all random,
6
+ # no regular words or you'll be exposed to dictionary attacks.
7
+ Dummy::Application.config.secret_token = '6274a5b5d450efe1ddb3cd99a3da0534e9e7138daaf830f7e8a35822cbf8fa4397ce1a2f3e03823a3338175acda9172c26007f423f3d05db83b19d24197118b6'
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
4
+
5
+ # Use the database for sessions instead of the cookie-based default,
6
+ # which shouldn't be used to store highly confidential information
7
+ # (create the session table with "rails generate session_migration")
8
+ # Dummy::Application.config.session_store :active_record_store
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+ #
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # Disable root element in JSON by default.
12
+ ActiveSupport.on_load(:active_record) do
13
+ self.include_root_in_json = false
14
+ end
@@ -0,0 +1,5 @@
1
+ # Sample localization file for English. Add more files in this directory for other locales.
2
+ # See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
3
+
4
+ en:
5
+ hello: "Hello world"
@@ -0,0 +1,60 @@
1
+ Dummy::Application.routes.draw do
2
+ devise_for :users
3
+
4
+ # The priority is based upon order of creation:
5
+ # first created -> highest priority.
6
+
7
+ # Sample of regular route:
8
+ # match 'products/:id' => 'catalog#view'
9
+ # Keep in mind you can assign values other than :controller and :action
10
+
11
+ # Sample of named route:
12
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
13
+ # This route can be invoked with purchase_url(:id => product.id)
14
+
15
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
16
+ # resources :products
17
+
18
+ # Sample resource route with options:
19
+ # resources :products do
20
+ # member do
21
+ # get 'short'
22
+ # post 'toggle'
23
+ # end
24
+ #
25
+ # collection do
26
+ # get 'sold'
27
+ # end
28
+ # end
29
+
30
+ # Sample resource route with sub-resources:
31
+ # resources :products do
32
+ # resources :comments, :sales
33
+ # resource :seller
34
+ # end
35
+
36
+ # Sample resource route with more complex sub-resources
37
+ # resources :products do
38
+ # resources :comments
39
+ # resources :sales do
40
+ # get 'recent', :on => :collection
41
+ # end
42
+ # end
43
+
44
+ # Sample resource route within a namespace:
45
+ # namespace :admin do
46
+ # # Directs /admin/products/* to Admin::ProductsController
47
+ # # (app/controllers/admin/products_controller.rb)
48
+ # resources :products
49
+ # end
50
+
51
+ # You can have the root of your site routed with "root"
52
+ # just remember to delete public/index.html.
53
+ # root :to => 'welcome#index'
54
+
55
+ # See how all your routes lay out with "rake routes"
56
+
57
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
58
+ # Note: This route will make all actions in every controller accessible via GET requests.
59
+ # match ':controller(/:action(/:id))(.:format)'
60
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,50 @@
1
+ class CreateAgents < ActiveRecord::Migration
2
+ def change
3
+ create_table :agents do |t|
4
+ t.string :last_name
5
+ t.string :middle_name
6
+ t.string :first_name
7
+ t.string :last_name_transcription
8
+ t.string :middle_name_transcription
9
+ t.string :first_name_transcription
10
+ t.string :corporate_name
11
+ t.string :corporate_name_transcription
12
+ t.string :full_name
13
+ t.text :full_name_transcription
14
+ t.text :full_name_alternative
15
+ t.timestamps
16
+ t.datetime :deleted_at
17
+ t.string :zip_code_1
18
+ t.string :zip_code_2
19
+ t.text :address_1
20
+ t.text :address_2
21
+ t.text :address_1_note
22
+ t.text :address_2_note
23
+ t.string :telephone_number_1
24
+ t.string :telephone_number_2
25
+ t.string :fax_number_1
26
+ t.string :fax_number_2
27
+ t.text :other_designation
28
+ t.text :place
29
+ t.string :postal_code
30
+ t.text :street
31
+ t.text :locality
32
+ t.text :region
33
+ t.datetime :date_of_birth
34
+ t.datetime :date_of_death
35
+ t.integer :language_id, :default => 1, :null => false
36
+ t.integer :country_id, :default => 1, :null => false
37
+ t.integer :agent_type_id, :default => 1, :null => false
38
+ t.integer :lock_version, :default => 0, :null => false
39
+ t.text :note
40
+ t.integer :required_role_id, :default => 1, :null => false
41
+ t.integer :required_score, :default => 0, :null => false
42
+ t.text :email
43
+ t.text :url
44
+ end
45
+ add_index :agents, :language_id
46
+ add_index :agents, :country_id
47
+ add_index :agents, :required_role_id
48
+ add_index :agents, :full_name
49
+ end
50
+ end
@@ -0,0 +1,46 @@
1
+ class DeviseCreateUsers < ActiveRecord::Migration
2
+ def change
3
+ create_table(:users) do |t|
4
+ ## Database authenticatable
5
+ t.string :email, :null => false, :default => ""
6
+ t.string :encrypted_password, :null => false, :default => ""
7
+
8
+ ## Recoverable
9
+ t.string :reset_password_token
10
+ t.datetime :reset_password_sent_at
11
+
12
+ ## Rememberable
13
+ t.datetime :remember_created_at
14
+
15
+ ## Trackable
16
+ t.integer :sign_in_count, :default => 0
17
+ t.datetime :current_sign_in_at
18
+ t.datetime :last_sign_in_at
19
+ t.string :current_sign_in_ip
20
+ t.string :last_sign_in_ip
21
+
22
+ ## Confirmable
23
+ # t.string :confirmation_token
24
+ # t.datetime :confirmed_at
25
+ # t.datetime :confirmation_sent_at
26
+ # t.string :unconfirmed_email # Only if using reconfirmable
27
+
28
+ ## Lockable
29
+ # t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
30
+ # t.string :unlock_token # Only if unlock strategy is :email or :both
31
+ # t.datetime :locked_at
32
+
33
+ ## Token authenticatable
34
+ # t.string :authentication_token
35
+
36
+
37
+ t.timestamps
38
+ end
39
+
40
+ add_index :users, :email, :unique => true
41
+ add_index :users, :reset_password_token, :unique => true
42
+ # add_index :users, :confirmation_token, :unique => true
43
+ # add_index :users, :unlock_token, :unique => true
44
+ # add_index :users, :authentication_token, :unique => true
45
+ end
46
+ end
@@ -0,0 +1,43 @@
1
+ class CreateManifestations < ActiveRecord::Migration
2
+ def change
3
+ create_table :manifestations do |t|
4
+ t.text :original_title, :null => false
5
+ t.text :title_alternative
6
+ t.text :title_transcription
7
+ t.string :classification_number
8
+ t.string :manifestation_identifier
9
+ t.datetime :date_of_publication
10
+ t.datetime :copyright_date
11
+ t.timestamps
12
+ t.datetime :deleted_at
13
+ t.string :access_address
14
+ t.integer :language_id, :default => 1, :null => false
15
+ t.integer :carrier_type_id, :default => 1, :null => false
16
+ t.integer :start_page
17
+ t.integer :end_page
18
+ t.integer :height
19
+ t.integer :width
20
+ t.integer :depth
21
+ t.integer :price # TODO: 通貨単位
22
+ t.text :fulltext
23
+ t.string :volume_number_string
24
+ t.string :issue_number_string
25
+ t.string :serial_number_string
26
+ t.integer :edition
27
+ t.text :note
28
+ t.boolean :repository_content, :default => false, :null => false
29
+ t.integer :lock_version, :default => 0, :null => false
30
+ t.integer :required_role_id, :default => 1, :null => false
31
+ t.integer :required_score, :default => 0, :null => false
32
+ t.integer :frequency_id, :default => 1, :null => false
33
+ t.boolean :subscription_master, :default => false, :null => false
34
+ end
35
+ #add_index :manifestations, :carrier_type_id
36
+ #add_index :manifestations, :required_role_id
37
+ add_index :manifestations, :access_address
38
+ #add_index :manifestations, :frequency_id
39
+ add_index :manifestations, :manifestation_identifier
40
+ add_index :manifestations, :updated_at
41
+ add_index :manifestations, :date_of_publication
42
+ end
43
+ end
@@ -0,0 +1,21 @@
1
+ class CreateItems < ActiveRecord::Migration
2
+ def change
3
+ create_table :items do |t|
4
+ t.string :call_number
5
+ t.string :item_identifier
6
+ t.timestamps
7
+ t.datetime :deleted_at
8
+ t.integer :shelf_id, :default => 1, :null => false
9
+ t.boolean :include_supplements, :default => false, :null => false
10
+ t.text :note
11
+ t.string :url
12
+ t.integer :price
13
+ t.integer :lock_version, :default => 0, :null => false
14
+ t.integer :required_role_id, :default => 1, :null => false
15
+ t.integer :required_score, :default => 0, :null => false
16
+ end
17
+ add_index :items, :shelf_id
18
+ add_index :items, :item_identifier
19
+ add_index :items, :required_role_id
20
+ end
21
+ end
@@ -0,0 +1,12 @@
1
+ class CreateOwns < ActiveRecord::Migration
2
+ def change
3
+ create_table :owns do |t|
4
+ t.references :agent, :null => false
5
+ t.references :item, :null => false
6
+ t.integer :position
7
+ t.timestamps
8
+ end
9
+ add_index :owns, :agent_id
10
+ add_index :owns, :item_id
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ class CreateCreates < ActiveRecord::Migration
2
+ def change
3
+ create_table :creates do |t|
4
+ t.references :agent, :null => false
5
+ t.references :work, :null => false
6
+ t.integer :position
7
+ t.timestamps
8
+ end
9
+ add_index :creates, :agent_id
10
+ add_index :creates, :work_id
11
+ end
12
+ end
@@ -0,0 +1,27 @@
1
+ class CreateSubjects < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :subjects do |t|
4
+ t.integer :parent_id
5
+ t.integer :use_term_id
6
+ t.string :term
7
+ t.text :term_transcription
8
+ t.integer :subject_type_id, :null => false
9
+ t.text :scope_note
10
+ t.text :note
11
+ t.integer :required_role_id, :default => 1, :null => false
12
+ t.integer :lock_version, :default => 0, :null => false
13
+ t.datetime :created_at
14
+ t.datetime :updated_at
15
+ t.datetime :deleted_at
16
+ end
17
+ add_index :subjects, :term
18
+ add_index :subjects, :parent_id
19
+ add_index :subjects, :use_term_id
20
+ add_index :subjects, :subject_type_id
21
+ add_index :subjects, :required_role_id
22
+ end
23
+
24
+ def self.down
25
+ drop_table :subjects
26
+ end
27
+ end
@@ -0,0 +1,17 @@
1
+ class CreateCheckins < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :checkins do |t|
4
+ t.integer :item_id, :null => false
5
+ t.integer :librarian_id
6
+ t.integer :basket_id
7
+ t.timestamps
8
+ end
9
+ add_index :checkins, :item_id
10
+ add_index :checkins, :librarian_id
11
+ add_index :checkins, :basket_id
12
+ end
13
+
14
+ def self.down
15
+ drop_table :checkins
16
+ end
17
+ end
@@ -0,0 +1,25 @@
1
+ class CreateCheckouts < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :checkouts do |t|
4
+ t.integer :user_id
5
+ t.integer :item_id, :null => false
6
+ t.integer :checkin_id
7
+ t.integer :librarian_id
8
+ t.integer :basket_id
9
+ t.datetime :due_date
10
+ t.integer :checkout_renewal_count, :default => 0, :null => false
11
+ t.integer :lock_version, :default => 0, :null => false
12
+ t.timestamps
13
+ end
14
+ add_index :checkouts, :user_id
15
+ add_index :checkouts, :item_id
16
+ add_index :checkouts, :basket_id
17
+ add_index :checkouts, [:item_id, :basket_id], :unique => true
18
+ add_index :checkouts, :librarian_id
19
+ add_index :checkouts, :checkin_id
20
+ end
21
+
22
+ def self.down
23
+ drop_table :checkouts
24
+ end
25
+ end
@@ -0,0 +1,26 @@
1
+ class CreateReserves < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :reserves do |t|
4
+ t.integer :user_id, :null => false
5
+ t.integer :manifestation_id, :null => false
6
+ t.integer :item_id
7
+ t.integer :request_status_type_id, :null => false
8
+ t.datetime :checked_out_at
9
+ t.timestamps
10
+ t.datetime :canceled_at
11
+ t.datetime :expired_at
12
+ t.datetime :deleted_at
13
+ t.boolean :expiration_notice_to_patron, :default => false
14
+ t.boolean :expiration_notice_to_library, :default => false
15
+ end
16
+
17
+ add_index :reserves, :user_id
18
+ add_index :reserves, :manifestation_id
19
+ add_index :reserves, :item_id
20
+ add_index :reserves, :request_status_type_id
21
+ end
22
+
23
+ def self.down
24
+ drop_table :reserves
25
+ end
26
+ end
@@ -0,0 +1,13 @@
1
+ class CreateRoles < ActiveRecord::Migration
2
+ def change
3
+ create_table "roles" do |t|
4
+ t.column :name, :string, :null => false
5
+ t.column :display_name, :string
6
+ t.column :note, :text
7
+ t.column :created_at, :datetime
8
+ t.column :updated_at, :datetime
9
+ t.integer :score, :default => 0, :null => false
10
+ t.integer :position
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ class CreateProduces < ActiveRecord::Migration
2
+ def change
3
+ create_table :produces do |t|
4
+ t.references :agent, :null => false
5
+ t.references :manifestation, :null => false
6
+ t.integer :position
7
+ t.timestamps
8
+ end
9
+ add_index :produces, :agent_id
10
+ add_index :produces, :manifestation_id
11
+ end
12
+ end