enju_leaf 1.1.0.rc15 → 1.1.0.rc16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +2 -2
  3. data/app/assets/javascripts/mobile.js +1 -1
  4. data/app/assets/stylesheets/mobile.css +1 -1
  5. data/app/controllers/my_accounts_controller.rb +5 -5
  6. data/app/controllers/page_controller.rb +10 -2
  7. data/app/models/profile.rb +15 -5
  8. data/app/models/user_export_file.rb +1 -1
  9. data/app/models/user_import_file.rb +2 -2
  10. data/app/views/my_accounts/_edit_credential.html.erb +10 -0
  11. data/app/views/my_accounts/edit.html.erb +2 -4
  12. data/app/views/page/_header.html.erb +3 -3
  13. data/app/views/page/_menu.html.erb +3 -0
  14. data/app/views/page/configuration.html.erb +3 -0
  15. data/app/views/page/opensearch.xml.builder +1 -1
  16. data/app/views/page/system_information.html.erb +23 -0
  17. data/app/views/profiles/_edit_credential.html.erb +10 -0
  18. data/app/views/profiles/edit.html.erb +3 -4
  19. data/app/views/profiles/index.html.erb +4 -4
  20. data/app/views/profiles/new.html.erb +10 -0
  21. data/config/locales/translation_en.yml +3 -0
  22. data/config/locales/translation_ja.yml +3 -0
  23. data/config/routes.rb +1 -0
  24. data/db/migrate/20140524074813_create_user_import_file_transitions.rb +5 -1
  25. data/db/migrate/20140709113905_create_user_export_file_transitions.rb +5 -1
  26. data/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb +5 -0
  27. data/db/migrate/20141003182825_add_date_of_birth_to_profile.rb +5 -0
  28. data/lib/enju_leaf/controller.rb +4 -4
  29. data/lib/enju_leaf/helper.rb +7 -0
  30. data/lib/enju_leaf/version.rb +1 -1
  31. data/lib/enju_leaf.rb +0 -48
  32. data/lib/generators/enju_leaf/quick_install/quick_install_generator.rb +1 -1
  33. data/lib/generators/enju_leaf/setup/setup_generator.rb +9 -0
  34. data/lib/generators/enju_leaf/setup/templates/Procfile +1 -1
  35. data/lib/tasks/enju_leaf_tasks.rake +6 -0
  36. data/lib/tasks/profile.rb +1 -1
  37. data/spec/controllers/page_controller_spec.rb +15 -0
  38. data/spec/dummy/config/database.yml +23 -18
  39. data/spec/dummy/db/migrate/001_create_agents.rb +0 -2
  40. data/spec/dummy/db/migrate/005_create_manifestations.rb +1 -2
  41. data/spec/dummy/db/migrate/006_create_items.rb +0 -2
  42. data/spec/dummy/db/migrate/035_create_reserves.rb +0 -1
  43. data/spec/dummy/db/migrate/133_create_agent_merges.rb +15 -0
  44. data/spec/dummy/db/migrate/134_create_agent_merge_lists.rb +13 -0
  45. data/spec/dummy/db/migrate/20081212080038_create_manifestation_checkout_stats.rb +0 -1
  46. data/spec/dummy/db/migrate/20081212151614_create_bookmark_stats.rb +0 -3
  47. data/spec/dummy/db/migrate/20081215094302_create_user_checkout_stats.rb +0 -1
  48. data/spec/dummy/db/migrate/20081216190724_create_manifestation_reserve_stats.rb +0 -1
  49. data/spec/dummy/db/migrate/20081220023628_create_user_reserve_stats.rb +0 -1
  50. data/spec/dummy/db/migrate/20090321130448_add_completed_at_to_user_checkout_stat.rb +0 -4
  51. data/spec/dummy/db/migrate/20100925074559_create_agent_import_results.rb +0 -1
  52. data/spec/dummy/db/migrate/20140518050147_create_reserve_transitions.rb +5 -1
  53. data/spec/dummy/db/migrate/20140518111006_create_message_transitions.rb +5 -1
  54. data/spec/dummy/db/migrate/20140518135713_create_message_request_transitions.rb +5 -1
  55. data/spec/dummy/db/migrate/20140519170214_create_resource_import_file_transitions.rb +5 -1
  56. data/spec/dummy/db/migrate/20140519171220_create_import_request_transitions.rb +5 -1
  57. data/spec/dummy/db/migrate/20140524020735_create_agent_import_file_transitions.rb +5 -1
  58. data/spec/dummy/db/migrate/20140524135607_create_bookmark_stat_transitions.rb +5 -1
  59. data/spec/dummy/db/migrate/20140528045518_create_user_checkout_stat_transitions.rb +5 -1
  60. data/spec/dummy/db/migrate/20140528045539_create_user_reserve_stat_transitions.rb +5 -1
  61. data/spec/dummy/db/migrate/20140528045600_create_manifestation_checkout_stat_transitions.rb +5 -1
  62. data/spec/dummy/db/migrate/20140528045617_create_manifestation_reserve_stat_transitions.rb +5 -1
  63. data/spec/dummy/db/migrate/20140529014410_create_item_transitions.rb +5 -1
  64. data/spec/dummy/db/migrate/20140614141500_create_resource_export_file_transitions.rb +5 -1
  65. data/spec/dummy/db/migrate/20140720140916_add_binding_item_identifier_to_item.rb +8 -0
  66. data/spec/dummy/db/migrate/20140721151416_add_default_shelf_id_to_resource_import_file.rb +5 -0
  67. data/spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb +6 -0
  68. data/spec/dummy/db/migrate/{20140810061942_add_user_id_to_stat.rb → 20140810061942_add_user_id_to_user_checkout_stat.rb} +1 -1
  69. data/spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb +5 -0
  70. data/spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb +5 -0
  71. data/spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb +5 -0
  72. data/spec/dummy/db/migrate/20141014065831_add_shelf_id_to_checkout.rb +6 -0
  73. data/spec/dummy/db/schema.rb +674 -663
  74. data/spec/fixtures/agent_import_results.yml +0 -3
  75. data/spec/fixtures/agents.yml +0 -12
  76. data/spec/fixtures/checked_items.yml +4 -4
  77. data/spec/fixtures/checkouts.yml +12 -12
  78. data/spec/fixtures/manifestation_checkout_stats.yml +0 -3
  79. data/spec/fixtures/manifestation_reserve_stats.yml +0 -3
  80. data/spec/fixtures/manifestations.yml +114 -114
  81. data/spec/fixtures/reserves.yml +17 -17
  82. data/spec/fixtures/user_checkout_stats.yml +0 -3
  83. data/spec/fixtures/user_reserve_stats.yml +0 -3
  84. data/spec/fixtures/users.yml +1 -1
  85. data/spec/spec_helper.rb +2 -0
  86. data/vendor/assets/javascripts/{jquery.mobile-1.4.3.js → jquery.mobile-1.4.4.js} +191 -116
  87. data/vendor/assets/stylesheets/{jquery.mobile-1.4.3.css → jquery.mobile-1.4.4.css} +10 -2
  88. metadata +79 -264
  89. data/app/models/local_patron.rb +0 -27
  90. data/lib/enju_leaf/bookmark_url.rb +0 -45
  91. data/spec/dummy/db/development.sqlite3 +0 -0
  92. data/spec/dummy/db/migrate/20111020063828_remove_dsbl_from_library_group.rb +0 -11
  93. data/spec/dummy/db/migrate/20130303104849_add_state_index_to_reserve.rb +0 -5
  94. data/spec/dummy/db/test.sqlite3 +0 -0
  95. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_delete_file.tsv +0 -4
  96. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_import_file_sample.tsv +0 -7
  97. data/spec/dummy/private/system/user_import_files/user_imports/980/190/963/original/user_update_file.tsv +0 -4
  98. data/spec/dummy/private/system/user_import_files/user_imports/980/190/964/original/user_delete_file.tsv +0 -4
  99. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-3963-1s1td26.txt +0 -8
  100. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140815-69229-i0rcty.txt +0 -8
  101. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140816-21120-1w731r8.txt +0 -8
  102. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-59118-14fm7df.txt +0 -8
  103. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-59989-vmovk5.txt +0 -8
  104. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75062-kpzjyb.txt +0 -8
  105. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75773-1lhgyub.txt +0 -8
  106. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140818-75927-j8wteq.txt +0 -8
  107. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140820-9103-mfcugd.txt +0 -8
  108. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140822-13160-wz7o56.txt +0 -8
  109. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140824-39018-fw3fdj.txt +0 -8
  110. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140828-69043-tbwoqv.txt +0 -8
  111. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-22971-1jmyywh.txt +0 -8
  112. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-23153-j4x3ru.txt +0 -8
  113. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140915-67244-1uo8pkb.txt +0 -8
  114. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80298-14af9pc.txt +0 -8
  115. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80450-1qhv5cf.txt +0 -8
  116. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80529-1hahtrn.txt +0 -8
  117. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-80725-tqmhnv.txt +0 -8
  118. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81018-wl1hgj.txt +0 -8
  119. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81246-wll5s.txt +0 -8
  120. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-81371-8uz50r.txt +0 -8
  121. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140922-84122-1u96hw6.txt +0 -8
  122. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20140926-7716-bbs13d.txt +0 -8
  123. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57000-yu6qop.txt +0 -8
  124. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57206-2j8sg2.txt +0 -8
  125. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57328-p8lryh.txt +0 -8
  126. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141002-57609-1j3dd67.txt +0 -8
  127. data/spec/dummy/public/system/user_export_files/user_exports/000/000/003/original/user_export_file_20141003-78097-dw5i2k.txt +0 -8
  128. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-28652-1dj3e98.txt +0 -148
  129. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140711-29117-13jb6ol.txt +0 -148
  130. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140721-65743-1tnagd4.txt +0 -8
  131. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-3963-1kk8o87.txt +0 -8
  132. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140815-69229-188nwub.txt +0 -8
  133. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140816-21120-twzfb6.txt +0 -8
  134. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-59118-1lhrtka.txt +0 -8
  135. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-59989-1prz707.txt +0 -8
  136. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75062-10bxh78.txt +0 -8
  137. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75773-ekgeho.txt +0 -8
  138. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140818-75927-uay97k.txt +0 -8
  139. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140820-9103-tuuox.txt +0 -8
  140. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140822-13160-17b5dbh.txt +0 -8
  141. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140824-39018-o12xa4.txt +0 -8
  142. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-22971-d4ul8o.txt +0 -8
  143. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-23153-1qmzqi6.txt +0 -8
  144. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140915-67244-1ps1qsi.txt +0 -8
  145. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80298-121rh7h.txt +0 -8
  146. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80450-wdetsg.txt +0 -8
  147. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80529-lmet02.txt +0 -8
  148. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-80725-1l6tliy.txt +0 -8
  149. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81018-azm74f.txt +0 -8
  150. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81246-1rjpksn.txt +0 -8
  151. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-81371-aroaof.txt +0 -8
  152. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140922-84122-7d6kls.txt +0 -8
  153. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20140926-7716-1nap0l.txt +0 -8
  154. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57000-3nb1bj.txt +0 -8
  155. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57206-197ca0p.txt +0 -8
  156. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57328-1kra77f.txt +0 -8
  157. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141002-57609-iymry0.txt +0 -8
  158. data/spec/dummy/public/system/user_export_files/user_exports/000/000/004/original/user_export_file_20141003-78097-1ocngi2.txt +0 -8
  159. data/spec/dummy/solr/conf/admin-extra.html +0 -31
  160. data/spec/dummy/solr/conf/elevate.xml +0 -36
  161. data/spec/dummy/solr/conf/mapping-ISOLatin1Accent.txt +0 -246
  162. data/spec/dummy/solr/conf/protwords.txt +0 -21
  163. data/spec/dummy/solr/conf/schema.xml +0 -255
  164. data/spec/dummy/solr/conf/scripts.conf +0 -24
  165. data/spec/dummy/solr/conf/solrconfig.xml +0 -667
  166. data/spec/dummy/solr/conf/spellings.txt +0 -2
  167. data/spec/dummy/solr/conf/stopwords.txt +0 -58
  168. data/spec/dummy/solr/conf/synonyms.txt +0 -31
  169. data/spec/dummy/solr/default/data/index/_7b.fdt +0 -0
  170. data/spec/dummy/solr/default/data/index/_7b.fdx +0 -0
  171. data/spec/dummy/solr/default/data/index/_7b.fnm +0 -0
  172. data/spec/dummy/solr/default/data/index/_7b.nvd +0 -0
  173. data/spec/dummy/solr/default/data/index/_7b.nvm +0 -0
  174. data/spec/dummy/solr/default/data/index/_7b.si +0 -0
  175. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.doc +0 -0
  176. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.pos +0 -0
  177. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.tim +0 -0
  178. data/spec/dummy/solr/default/data/index/_7b_Lucene41_0.tip +0 -0
  179. data/spec/dummy/solr/default/data/index/segments.gen +0 -0
  180. data/spec/dummy/solr/default/data/index/segments_ev +0 -0
  181. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000524 +0 -0
  182. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000525 +0 -0
  183. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000526 +0 -0
  184. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000527 +0 -0
  185. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000528 +0 -0
  186. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000529 +0 -0
  187. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000530 +0 -0
  188. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000531 +0 -0
  189. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000532 +0 -0
  190. data/spec/dummy/solr/default/data/tlog/tlog.0000000000000000533 +0 -0
  191. data/spec/dummy/solr/development/data/index/segments.gen +0 -0
  192. data/spec/dummy/solr/development/data/index/segments_1 +0 -0
  193. data/spec/dummy/solr/solr.xml +0 -8
  194. data/spec/dummy/solr/test/data/index/segments.gen +0 -0
  195. data/spec/dummy/solr/test/data/index/segments_1 +0 -0
  196. data/spec/dummy/tmp/cache/4F7/F90/default_role +0 -0
  197. data/spec/dummy/tmp/cache/ACB/B20/manifestation_search_total +0 -0
  198. data/spec/dummy/tmp/cache/assets/test/sprockets/13fe41fee1fe35b49d145bcc06610705 +0 -0
  199. data/spec/dummy/tmp/cache/assets/test/sprockets/154f7b83f2da0e86effbe25f32135177 +0 -0
  200. data/spec/dummy/tmp/cache/assets/test/sprockets/1b984bdbd3204a51a82d0e01a1569e2d +0 -0
  201. data/spec/dummy/tmp/cache/assets/test/sprockets/2f5173deea6c795b8fdde723bb4b63af +0 -0
  202. data/spec/dummy/tmp/cache/assets/test/sprockets/3054c50144654f9c7e57bb0639a276e9 +0 -0
  203. data/spec/dummy/tmp/cache/assets/test/sprockets/357970feca3ac29060c1e3861e2c0953 +0 -0
  204. data/spec/dummy/tmp/cache/assets/test/sprockets/3bd7a263237ba366f64d938fe5303757 +0 -0
  205. data/spec/dummy/tmp/cache/assets/test/sprockets/62899096da1a3e67660f3b88068be8c9 +0 -0
  206. data/spec/dummy/tmp/cache/assets/test/sprockets/65b2e4f67eab21b30217e29075f433b2 +0 -0
  207. data/spec/dummy/tmp/cache/assets/test/sprockets/87d24a3f43f175d4d17babe9203c79a7 +0 -0
  208. data/spec/dummy/tmp/cache/assets/test/sprockets/cffd775d018f68ce5dba1ee0d951a994 +0 -0
  209. data/spec/dummy/tmp/cache/assets/test/sprockets/d38d8658b30de1d068603968227680d4 +0 -0
  210. data/spec/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6 +0 -0
  211. data/spec/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655 +0 -0
  212. data/spec/dummy/tmp/cache/stdout +0 -1653
  213. data/spec/dummy/tmp/pids/redis-test.pid +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e2c36786a4d1988f1d7e97b655ee4a1a8b691ed
4
- data.tar.gz: 7b96331440eff81045e4d5ca5c2d1513b0a08439
3
+ metadata.gz: 39450aed8ab4e4e97cf12f78408cbda1141aa118
4
+ data.tar.gz: f5b50dc4938bb00e16a9e998e0d58c387984f34b
5
5
  SHA512:
6
- metadata.gz: a623d4c880c5c7e65bb302bdf2073aa1cffb5a7ade091b493aa134f85f0a00004dc1b6851987b7742b4e86cd75934c616d46dc50c30b3b59e2ef566917d5e9c8
7
- data.tar.gz: 19069d34b47a78767df3ab5cd0ccc082e3194654eced6ca385d37608ee33ed708cc952f514c1a339be7e3592db2498cbac227f67b97890eae8b4c830fb935aa3
6
+ metadata.gz: db43ab43a91a071fe6fc284e07878be2197ea5f629016c78eafc84d91d6b7b2bdf2197cfe0b6b0bb14f39ce2c07f4aac3f87d615cec7f48048c6f7b07cb7f9f8
7
+ data.tar.gz: d217264a96f8976dcb0c746b22d33f3e1d8054b82137a7a51afdb01662d6de8d67d1d02d593f4ff4c3571e37b7c3c05cd0b06beab0749da2c0a3215d9963c870
data/README.rdoc CHANGED
@@ -1,7 +1,7 @@
1
1
  = Next-L Enju Leaf
2
-
3
2
  {<img src="https://travis-ci.org/next-l/enju_leaf.png?branch=1.1" alt="Build Status" />}[https://travis-ci.org/next-l/enju_leaf]
4
- {<img src="https://gemnasium.com/next-l/enju_leaf.png" alt="Dependency Status" />}[https://gemnasium.com/next-l/enju_leaf]
3
+ {<img src="https://coveralls.io/repos/next-l/enju_leaf/badge.png?branch=1.1" alt="Coverage Status" />}[https://coveralls.io/r/next-l/enju_leaf?branch=1.1]
4
+ {<img src="https://hakiri.io/github/next-l/enju_leaf/1.1.svg" alt="security" />}[https://hakiri.io/github/next-l/enju_leaf/1.1]
5
5
 
6
6
  Next-L Enju Leaf は、{Project Next-L}[http://www.next-l.jp] で開発している図書館管理システムです。
7
7
 
@@ -1,4 +1,4 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
- //= require jquery.mobile-1.4.3
3
+ //= require jquery.mobile-1.4.4
4
4
  //= require jquery.colorbox
@@ -3,6 +3,6 @@
3
3
  * and any sub-directories. You're free to add application-wide styles to this file and they'll appear at
4
4
  * the top of the compiled file, but it's generally better to create a new file per style scope.
5
5
  *= require_self
6
- *= require jquery.mobile-1.4.3
6
+ *= require jquery.mobile-1.4.4
7
7
  *= require enju_mobile
8
8
  */
@@ -40,7 +40,7 @@ class MyAccountsController < ApplicationController
40
40
 
41
41
  if saved
42
42
  if @profile.save
43
- sign_in(current_user, :bypass => true)
43
+ sign_in(current_user, bypass: true)
44
44
  format.html { redirect_to my_account_url, notice: t('controller.successfully_updated', model: t('activerecord.models.user')) }
45
45
  format.json { head :no_content }
46
46
  else
@@ -69,10 +69,10 @@ class MyAccountsController < ApplicationController
69
69
 
70
70
  private
71
71
  def prepare_options
72
- @user_groups = UserGroup.all
73
- @roles = Role.all
74
- @libraries = Library.all_cache
75
- @languages = Language.all_cache
72
+ @user_groups = UserGroup.order(:position)
73
+ @roles = Role.order(:position)
74
+ @libraries = Library.order(:position)
75
+ @languages = Language.order(:position)
76
76
  if current_user.active_for_authentication?
77
77
  current_user.locked = '0'
78
78
  else
@@ -14,11 +14,15 @@ class PageController < ApplicationController
14
14
  if defined?(EnjuBookmark)
15
15
  @tags = current_user.bookmarks.tag_counts.sort{|a,b| a.count <=> b.count}.reverse
16
16
  end
17
- @manifestation = Manifestation.pickup(current_user.keyword_list.to_s.split.sort_by{rand}.first) rescue nil
17
+ if current_user.profile
18
+ @manifestation = Manifestation.pickup(current_user.profile.keyword_list.to_s.split.sort_by{rand}.first, current_user)
19
+ else
20
+ @manifestation = nil
21
+ end
18
22
  else
19
23
  if defined?(EnjuBookmark)
20
24
  # TODO: タグ下限の設定
21
- #@tags = Tag.all(:limit => 50, :order => 'taggings_count DESC')
25
+ #@tags = Tag.all(limit: 50, order: 'taggings_count DESC')
22
26
  @tags = Bookmark.tag_counts.sort{|a,b| a.count <=> b.count}.reverse[0..49]
23
27
  end
24
28
  @manifestation = Manifestation.pickup rescue nil
@@ -56,6 +60,10 @@ class PageController < ApplicationController
56
60
  @title = t('page.configuration')
57
61
  end
58
62
 
63
+ def system_information
64
+ @specs = Bundler.load.specs.sort
65
+ end
66
+
59
67
  def import
60
68
  @title = t('page.import')
61
69
  end
@@ -1,9 +1,10 @@
1
1
  class Profile < ActiveRecord::Base
2
- attr_accessible :full_name, :keyword_list, :locale
3
- attr_accessible :full_name, :user_number, :library_id, :keyword_list, :note,
2
+ attr_accessible :full_name, :full_name_transcription, :keyword_list, :locale
3
+ attr_accessible :full_name, :full_name_transcription, :user_number,
4
+ :library_id, :keyword_list, :note,
4
5
  :user_group_id, :user_id, :locale, :required_role_id, :expired_at,
5
6
  :user_attributes,
6
- :save_checkout_history,
7
+ :save_checkout_history, :birth_date,
7
8
  as: :admin
8
9
 
9
10
  enju_circulation_profile_model if defined?(EnjuCirculation)
@@ -20,9 +21,12 @@ class Profile < ActiveRecord::Base
20
21
  validates_associated :user
21
22
  validates_presence_of :user_group, :library, :locale #, :user_number
22
23
  validates :user_number, uniqueness: true, format: { with: /\A[0-9A-Za-z_]+\Z/ }, allow_blank: true
24
+ validates :birth_date, format: { with: /\A\d{4}-\d{1,2}-\d{1,2}\Z/ }, allow_blank: true
25
+
26
+ attr_accessor :birth_date
23
27
 
24
28
  searchable do
25
- text :user_number, :full_name, :note
29
+ text :user_number, :full_name, :full_name_transcription, :note
26
30
  string :user_number
27
31
  text :username do
28
32
  user.try(:username)
@@ -44,7 +48,7 @@ class Profile < ActiveRecord::Base
44
48
  end
45
49
 
46
50
  before_validation :set_role_and_agent, on: :create
47
- before_save :set_expired_at
51
+ before_save :set_expired_at, :set_date_of_birth
48
52
  accepts_nested_attributes_for :user
49
53
 
50
54
  def set_role_and_agent
@@ -59,6 +63,12 @@ class Profile < ActiveRecord::Base
59
63
  end
60
64
  end
61
65
  end
66
+
67
+ def set_date_of_birth
68
+ self.date_of_birth = Time.zone.parse(birth_date) if birth_date
69
+ rescue ArgumentError
70
+ nil
71
+ end
62
72
  end
63
73
 
64
74
  # == Schema Information
@@ -4,7 +4,7 @@ class UserExportFile < ActiveRecord::Base
4
4
  include ExportFile
5
5
  enju_export_file_model
6
6
  has_attached_file :user_export
7
- validates_attachment_content_type :user_export, :content_type => /\Atext\/plain\Z/
7
+ validates_attachment_content_type :user_export, content_type: /\Atext\/plain\Z/
8
8
 
9
9
  has_many :user_export_file_transitions
10
10
 
@@ -42,7 +42,7 @@ class UserImportFile < ActiveRecord::Base
42
42
 
43
43
  def import
44
44
  transition_to!(:started)
45
- num = {:user_imported => 0, :user_found => 0, :failed => 0}
45
+ num = { user_imported: 0, user_found: 0, failed: 0 }
46
46
  rows = open_import_file(create_import_temp_file(user_import))
47
47
  row_num = 1
48
48
 
@@ -110,7 +110,7 @@ class UserImportFile < ActiveRecord::Base
110
110
 
111
111
  def modify
112
112
  transition_to!(:started)
113
- num = {:user_updated => 0, :user_not_found => 0, :failed => 0}
113
+ num = { user_updated: 0, user_not_found: 0, failed: 0 }
114
114
  rows = open_import_file(create_import_temp_file(user_import))
115
115
  row_num = 1
116
116
 
@@ -60,6 +60,16 @@
60
60
  </div>
61
61
 
62
62
  <div id="right_pane_detail">
63
+ <div class="field">
64
+ <%= f.label :full_name -%><br />
65
+ <%= f.text_field :full_name -%>
66
+ </div>
67
+
68
+ <div class="field">
69
+ <%= f.label :full_name_transcription -%><br />
70
+ <%= f.text_field :full_name_transcription -%>
71
+ </div>
72
+
63
73
  <%- if current_user.has_role?('Librarian') -%>
64
74
  <div class="field">
65
75
  <%= f.label t('activerecord.models.user_group') -%><br />
@@ -7,18 +7,16 @@
7
7
 
8
8
  <%= render partial: 'edit_credential', locals: {f: f, profile: @profile} -%>
9
9
 
10
- <div class="actions">
10
+ <div class="actions" style="clear: both">
11
11
  <%= f.submit %>
12
12
  </div>
13
- <div style="clear: both">
14
13
  <div class="field">
15
14
  <%= f.label :keyword_list -%><br />
16
15
  <%= f.text_area :keyword_list, class: 'resource_textarea' -%>
17
16
  </div>
18
17
 
19
18
  <%= render partial: 'profiles/edit_profile', locals: {f: f, profile: @profile} -%>
20
- </div>
21
- <%- end -%>
19
+ <%- end -%>
22
20
 
23
21
  </div>
24
22
  </div>
@@ -14,10 +14,10 @@
14
14
  <br />
15
15
  <% if defined?(EnjuMessage) %>
16
16
  <%= link_to image_tag('icons/email.png', size: '16x16', alt: t('activerecord.models.message')), messages_path %>
17
- <% if current_user.received_messages.unread.size > 0 %>
18
- <%= link_to "(#{h(current_user.received_messages.unread.size)})", messages_path %>
17
+ <% if messages_count(current_user) > 0 %>
18
+ <%= link_to "(#{messages_count(current_user)})", messages_path %>
19
19
  <% else %>
20
- (<%= current_user.received_messages.unread.size %>)
20
+ (<%= messages_count(current_user) %>)
21
21
  <% end %>
22
22
  <% end %>
23
23
  <%= link_to t('page.account'), my_account_path -%>
@@ -40,6 +40,9 @@
40
40
  <% if defined?(EnjuNdl) %>
41
41
  <li><%= link_to t('enju_ndl.import_from_ndl_search'), ndl_books_path -%></li>
42
42
  <% end %>
43
+ <% if defined?(EnjuNii) %>
44
+ <li><%= link_to t('enju_nii.import_from_cinii_books'), cinii_books_path -%></li>
45
+ <% end %>
43
46
  <% if defined?(EnjuLoc) %>
44
47
  <li><%= link_to t('enju_loc.import_from_loc_search'), loc_search_index_path -%></li>
45
48
  <% end %>
@@ -99,7 +99,9 @@
99
99
  <h2 class="title"><%= t('page.form') -%></h2>
100
100
  <div class="config_box">
101
101
  <ul>
102
+ <!--
102
103
  <li><%= link_to t('activerecord.models.form_of_work'), form_of_works_path -%></li>
104
+ -->
103
105
  <li><%= link_to t('activerecord.models.carrier_type'), carrier_types_path -%></li>
104
106
  <li><%= link_to t('activerecord.models.content_type'), content_types_path -%></li>
105
107
  <% if defined?(EnjuCirculation) %>
@@ -128,6 +130,7 @@
128
130
  <ul>
129
131
  <% if current_user.has_role?('Administrator') %>
130
132
  <li><%= link_to 'Resque', resque_path %></li>
133
+ <li><%= link_to t('page.system_information'), page_system_information_path %></li>
131
134
  <% end %>
132
135
  </ul>
133
136
  </div>
@@ -8,7 +8,7 @@ xml.OpenSearchDescription(
8
8
  xml.Contact @library_group.user.email
9
9
  xml.Url type: 'text/html', template: "#{manifestations_url}?query={searchTerms}"
10
10
  xml.Url type: 'application/rss+xml', template: "#{manifestations_url(format: :rss)}?query={searchTerms}"
11
- xml.Query :role => 'example', :searchTerms => 'enju'
11
+ xml.Query role: 'example', searchTerms: 'enju'
12
12
  xml.Language @locale.to_s
13
13
  xml.OutputEncoding 'UTF-8'
14
14
  xml.InputEncoding 'UTF-8'
@@ -0,0 +1,23 @@
1
+ <div id="content_detail" class="ui-corner-all ui-widget-content">
2
+ <h1 class="title"><%= t('page.system_information') %></h1>
3
+ <div id="content_list">
4
+
5
+ <ul>
6
+ <li>Environment: <%= Rails.env %></li>
7
+ <li>Gems:
8
+ <ul>
9
+ <% @specs.each do |spec| %>
10
+ <li><%= spec.name %>: <%= spec.version.to_s %></li>
11
+ <% end %>
12
+ </ul>
13
+ </li>
14
+ </ul>
15
+
16
+ </div>
17
+ </div>
18
+
19
+ <div id="submenu" class="ui-corner-all ui-widget-content">
20
+ <ul>
21
+ <li><%= link_to t('page.configuration'), page_configuration_path %></li>
22
+ </ul>
23
+ </div>
@@ -43,6 +43,16 @@
43
43
  </div>
44
44
 
45
45
  <div id="right_pane_detail">
46
+ <div class="field">
47
+ <%= f.label :full_name -%><br />
48
+ <%= f.text_field :full_name -%>
49
+ </div>
50
+
51
+ <div class="field">
52
+ <%= f.label :full_name_transcription -%><br />
53
+ <%= f.text_field :full_name_transcription -%>
54
+ </div>
55
+
46
56
  <%- if current_user.has_role?('Librarian') -%>
47
57
  <div class="field">
48
58
  <%= f.label t('activerecord.models.user_group') -%><br />
@@ -7,18 +7,17 @@
7
7
 
8
8
  <%= render partial: 'profiles/edit_credential', locals: {f: f, profile: @profile} -%>
9
9
 
10
- <div class="actions">
10
+ <div class="actions" style="clear: both">
11
11
  <%= f.submit %>
12
12
  </div>
13
- <div style="clear: both">
13
+
14
14
  <div class="field">
15
15
  <%= f.label :keyword_list -%><br />
16
16
  <%= f.text_area :keyword_list, class: 'resource_textarea' -%>
17
17
  </div>
18
18
 
19
19
  <%= render partial: 'profiles/edit_profile', locals: {f: f, profile: @profile} -%>
20
- </div>
21
- <%- end -%>
20
+ <%- end -%>
22
21
 
23
22
  </div>
24
23
  </div>
@@ -14,11 +14,11 @@
14
14
 
15
15
  <table class="table table-striped index">
16
16
  <tr>
17
+ <th><%= t('activerecord.attributes.profile.user_number') -%></th>
17
18
  <th><%= t('activerecord.attributes.user.username') -%>
18
19
  <%= link_to image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), url_for(params.merge(sort_by: 'username', order: 'asc', only_path: true)) -%>
19
20
  <%= link_to image_tag('icons/arrow_down.png', size: '16x16', alt: t('page.desc')), url_for(params.merge(sort_by: 'username', order: 'desc', only_path: true)) -%>
20
21
  </th>
21
- <th><%= t('activerecord.attributes.profile.user_number') -%></th>
22
22
  <th>
23
23
  <%= t('page.created_at') -%>
24
24
  <%= link_to image_tag('icons/arrow_up.png', size: '16x16', alt: t('page.asc')), url_for(params.merge(sort_by: 'created_at', order: 'asc', only_path: true)) -%>
@@ -29,9 +29,6 @@
29
29
 
30
30
  <%- @profiles.each_with_index do |profile, i| -%>
31
31
  <tr class="line<%= cycle("0", "1") -%>">
32
- <td>
33
- <%= profile.user.try(:username) -%>
34
- </td>
35
32
  <td>
36
33
  <% if profile.user_number %>
37
34
  <%= link_to profile.user_number, profile -%>
@@ -39,6 +36,9 @@
39
36
  <%= link_to t('profile.no_number'), profile -%>
40
37
  <% end %>
41
38
  </td>
39
+ <td>
40
+ <%= profile.user.try(:username) -%>
41
+ </td>
42
42
  <td><%= l(profile.created_at) -%></td>
43
43
  <td>
44
44
  <%= link_to t('page.show'), profile -%>
@@ -27,6 +27,16 @@
27
27
  <%= f.text_field :expired_at, class: 'date_text_field', placeholder: "#{t('page.example')}: 2011-04-12"-%>
28
28
  </div>
29
29
 
30
+ <div class="field">
31
+ <%= f.label :full_name -%><br />
32
+ <%= f.text_field :full_name -%>
33
+ </div>
34
+
35
+ <div class="field">
36
+ <%= f.label :full_name_transcription -%><br />
37
+ <%= f.text_field :full_name_transcription -%>
38
+ </div>
39
+
30
40
  <div class="field">
31
41
  <%= f.label :user_group_id -%>
32
42
  <%= f.select(:user_group_id, @user_groups.collect{|u| [u.display_name.localize, u.id]}) -%>
@@ -90,6 +90,8 @@ en:
90
90
  full_name: Full name
91
91
  user_number: User number
92
92
  expired_at: Expired at
93
+ full_name_transcription: Full name transcription
94
+ date_of_birth: Date of birth
93
95
 
94
96
  page:
95
97
  user_title: "Welcome %{login_name}"
@@ -283,6 +285,7 @@ en:
283
285
  manual: Manual
284
286
  cannot_parse_yaml_header: "has an invalid YAML header. You must add a space after the header's colon."
285
287
  notice: Notice
288
+ system_information: System information
286
289
  title:
287
290
  index: "index"
288
291
  show: "show"
@@ -90,6 +90,8 @@ ja:
90
90
  full_name: フルネーム
91
91
  user_number: 利用者番号
92
92
  expired_at: 有効期限
93
+ full_name_transcription: フルネーム(ヨミ)
94
+ date_of_birth: 生年月日
93
95
 
94
96
  page:
95
97
  user_title: "ようこそ %{login_name} さん"
@@ -268,6 +270,7 @@ ja:
268
270
  manual: マニュアル
269
271
  cannot_parse_yaml_header: "のYAMLヘッダを読み込めません。ヘッダのコロンの後には、半角スペースを含める必要があります。"
270
272
  notice: 注意
273
+ system_information: システムの基本的な情報の表示
271
274
  title:
272
275
  index: "一覧"
273
276
  show: "表示"
data/config/routes.rb CHANGED
@@ -36,5 +36,6 @@ Rails.application.routes.draw do
36
36
  get '/page/msie_acceralator' => 'page#msie_acceralator'
37
37
  get '/page/opensearch' => 'page#opensearch'
38
38
  get '/page/statistics' => 'page#statistics'
39
+ get '/page/system_information' => 'page#system_information'
39
40
  get '/page/routing_error' => 'page#routing_error'
40
41
  end
@@ -2,7 +2,11 @@ class CreateUserImportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_import_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_import_file_id
8
12
  t.timestamps
@@ -2,7 +2,11 @@ class CreateUserExportFileTransitions < ActiveRecord::Migration
2
2
  def change
3
3
  create_table :user_export_file_transitions do |t|
4
4
  t.string :to_state
5
- t.text :metadata, default: "{}"
5
+ if ActiveRecord::Base.configurations[Rails.env]["adapter"].try(:match, /mysql/)
6
+ t.text :metadata
7
+ else
8
+ t.text :metadata, default: "{}"
9
+ end
6
10
  t.integer :sort_key
7
11
  t.integer :user_export_file_id
8
12
  t.timestamps
@@ -0,0 +1,5 @@
1
+ class AddFullNameTranscriptionToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :full_name_transcription, :text
4
+ end
5
+ end
@@ -0,0 +1,5 @@
1
+ class AddDateOfBirthToProfile < ActiveRecord::Migration
2
+ def change
3
+ add_column :profiles, :date_of_birth, :datetime
4
+ end
5
+ end
@@ -8,10 +8,10 @@ module EnjuLeaf
8
8
 
9
9
  private
10
10
  def set_error_template
11
- rescue_from CanCan::AccessDenied, :with => :render_403
12
- #rescue_from ActiveRecord::RecordNotFound, :with => :render_404
13
- rescue_from Errno::ECONNREFUSED, :with => :render_500
14
- #rescue_from ActionView::MissingTemplate, :with => :render_404_invalid_format
11
+ rescue_from CanCan::AccessDenied, with: :render_403
12
+ #rescue_from ActiveRecord::RecordNotFound, with: :render_404
13
+ rescue_from Errno::ECONNREFUSED, with: :render_500
14
+ #rescue_from ActionView::MissingTemplate, with: :render_404_invalid_format
15
15
  end
16
16
  end
17
17
 
@@ -112,5 +112,12 @@ module EnjuLeaf
112
112
  markdown.render(string.to_s).html_safe
113
113
  end
114
114
  end
115
+
116
+ def messages_count(user)
117
+ Message.search do
118
+ with(:receiver_id).equal_to user.id
119
+ with(:is_read).equal_to false
120
+ end.hits.total_entries
121
+ end
115
122
  end
116
123
  end
@@ -1,3 +1,3 @@
1
1
  module EnjuLeaf
2
- VERSION = "1.1.0.rc15"
2
+ VERSION = "1.1.0.rc16"
3
3
  end
data/lib/enju_leaf.rb CHANGED
@@ -4,7 +4,6 @@ require "enju_leaf/controller"
4
4
  require "enju_leaf/user"
5
5
  require "enju_leaf/helper"
6
6
  require "enju_leaf/calculate_stat"
7
- require "enju_leaf/bookmark_url"
8
7
  require "enju_leaf/calculate_stat"
9
8
  require "enju_leaf/import_file"
10
9
  require "enju_leaf/export_file"
@@ -172,53 +171,6 @@ module EnjuLeaf
172
171
  end
173
172
  end
174
173
 
175
- def make_internal_query(search)
176
- # 内部的なクエリ
177
- set_role_query(current_user, search)
178
-
179
- unless params[:mode] == "add"
180
- expression = @expression
181
- agent = @agent
182
- manifestation = @manifestation
183
- reservable = @reservable
184
- carrier_type = params[:carrier_type]
185
- library = params[:library]
186
- language = params[:language]
187
- if defined?(EnjuSubject)
188
- subject = params[:subject]
189
- subject_by_term = Subject.where(term: params[:subject]).first
190
- @subject_by_term = subject_by_term
191
- end
192
-
193
- search.build do
194
- with(:publisher_ids).equal_to agent.id if agent
195
- with(:original_manifestation_ids).equal_to manifestation.id if manifestation
196
- with(:reservable).equal_to reservable unless reservable.nil?
197
- unless carrier_type.blank?
198
- with(:carrier_type).equal_to carrier_type
199
- end
200
- unless library.blank?
201
- library_list = library.split.uniq
202
- library_list.each do |library|
203
- with(:library).equal_to library
204
- end
205
- end
206
- unless language.blank?
207
- language_list = language.split.uniq
208
- language_list.each do |language|
209
- with(:language).equal_to language
210
- end
211
- end
212
- if defined?(EnjuSubject)
213
- unless subject.blank?
214
- with(:subject).equal_to subject_by_term.term
215
- end
216
- end
217
- end
218
- end
219
- return search
220
- end
221
-
222
174
  def solr_commit
223
175
  Sunspot.commit
224
176
  end
@@ -30,7 +30,7 @@ class EnjuLeaf::QuickInstallGenerator < Rails::Generators::Base
30
30
  else
31
31
  rake("sunspot:solr:start", env: environment)
32
32
  sleep 5
33
- rake("environment sunspot:reindex", env: environment)
33
+ rake("environment enju_leaf:reindex", env: environment)
34
34
  rake("sunspot:solr:stop", env: environment)
35
35
  end
36
36
  end
@@ -49,6 +49,9 @@ EOS
49
49
  gsub_file 'config/initializers/devise.rb', '# config.email_regexp = /\A[^@]+@[^@]+\z/', 'config.email_regexp = /\A([\w\.%\+\-]+)@([\w\-]+\.)+([\w]{2,})\Z/i'
50
50
  gsub_file 'config/initializers/devise.rb', '# config.authentication_keys = [ :email ]', 'config.authentication_keys = [ :username ]'
51
51
  gsub_file 'config/initializers/devise.rb', '# config.secret_key', 'config.secret_key'
52
+ gsub_file 'config/initializers/devise.rb',
53
+ "# config.navigational_formats = ['*/*', :html]",
54
+ "config.navigational_formats = ['*/*', :html, :mobile]"
52
55
  gsub_file 'app/models/user.rb', /, :registerable,$/, ', #:registerable,'
53
56
  gsub_file 'app/models/user.rb', /, :trackable, :validatable$/, <<EOS
54
57
  , :trackable, #:validatable,
@@ -101,6 +104,12 @@ EOS
101
104
  gsub_file 'config/initializers/kaminari_config.rb',
102
105
  /# config.default_per_page = 25$/,
103
106
  "config.default_per_page = 10"
107
+ create_file 'config/initializers/mobile.rb' do <<"EOS"
108
+ ActionController::Responder.class_eval do
109
+ alias :to_mobile :to_html
110
+ end
111
+ EOS
112
+ end
104
113
  remove_file "public/index.html"
105
114
  remove_file "app/views/layouts/application.html.erb"
106
115
  end
@@ -1,3 +1,3 @@
1
1
  solr: bundle exec rake sunspot:solr:run
2
- resque: bundle exec rake environment resque:work QUEUE=*
2
+ resque: bundle exec rake environment resque:work QUEUE=* TERM_CHILD=1
3
3
  web: bundle exec rails s
@@ -31,4 +31,10 @@ namespace :enju_leaf do
31
31
  end
32
32
  puts 'enju_leaf: The upgrade completed successfully.'
33
33
  end
34
+
35
+ desc "reindex all models"
36
+ task :reindex, [:batch_size, :models, :silence] => :environment do |t, args|
37
+ Rails::Engine.subclasses.each{|engine| engine.instance.eager_load!}
38
+ Rake::Task['sunspot:reindex'].execute(args)
39
+ end
34
40
  end
data/lib/tasks/profile.rb CHANGED
@@ -10,6 +10,6 @@ def update_profile
10
10
  profile.keyword_list = user.keyword_list
11
11
  profile.locale = user.locale
12
12
  profile.note = user.note
13
- profile.save
13
+ profile.save!
14
14
  end
15
15
  end