sufia 6.0.0 → 6.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (290) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -5
  3. data/CONTRIBUTING.md +4 -4
  4. data/Gemfile +2 -1
  5. data/History.md +69 -0
  6. data/README.md +84 -4
  7. data/SUFIA_VERSION +1 -1
  8. data/app/assets/images/zotero.png +0 -0
  9. data/app/assets/javascripts/sufia/featured_works.js +20 -3
  10. data/app/assets/stylesheets/generic_files.css.erb +2 -2
  11. data/app/assets/stylesheets/sufia.css.scss +2 -2
  12. data/app/assets/stylesheets/sufia/_buttons.scss +2 -2
  13. data/app/assets/stylesheets/sufia/_collections.scss +4 -4
  14. data/app/assets/stylesheets/sufia/_dashboard.scss +1 -1
  15. data/app/assets/stylesheets/sufia/_file-listing.scss +3 -0
  16. data/app/assets/stylesheets/sufia/_modal.scss +4 -0
  17. data/app/assets/stylesheets/sufia/_settings.scss +4 -3
  18. data/app/assets/stylesheets/sufia/_styles.scss +4 -0
  19. data/app/controllers/admin/stats_controller.rb +68 -0
  20. data/app/controllers/api/items_controller.rb +78 -0
  21. data/app/controllers/api/zotero_controller.rb +70 -0
  22. data/app/controllers/authorities_controller.rb +6 -5
  23. data/app/controllers/concerns/sufia/batch_edits_controller_behavior.rb +2 -1
  24. data/app/controllers/concerns/sufia/breadcrumbs.rb +1 -1
  25. data/app/controllers/concerns/sufia/depositors_controller_behavior.rb +11 -0
  26. data/app/controllers/concerns/sufia/files_controller/browse_everything.rb +1 -1
  27. data/app/controllers/concerns/sufia/files_controller/local_ingest_behavior.rb +1 -1
  28. data/app/controllers/concerns/sufia/files_controller_behavior.rb +23 -11
  29. data/app/controllers/concerns/sufia/my_controller_behavior.rb +1 -7
  30. data/app/controllers/concerns/sufia/users_controller_behavior.rb +1 -2
  31. data/app/controllers/my/collections_controller.rb +1 -0
  32. data/app/controllers/my/files_controller.rb +1 -1
  33. data/app/helpers/sufia/sufia_helper_behavior.rb +28 -16
  34. data/app/models/my_search_builder.rb +4 -0
  35. data/app/search_builders/sufia/my_search_builder_behavior.rb +20 -0
  36. data/app/search_builders/sufia/search_builder.rb +1 -1
  37. data/app/views/admin/stats/index.html.erb +68 -0
  38. data/app/views/collections/_action_menu.html.erb +22 -20
  39. data/app/views/collections/_collection.html.erb +1 -1
  40. data/app/views/collections/_form_for_select_collection.html.erb +5 -3
  41. data/app/views/generic_files/_show_actions.html.erb +4 -2
  42. data/app/views/generic_files/show.html.erb +1 -1
  43. data/app/views/layouts/sufia-dashboard.html.erb +5 -4
  44. data/app/views/layouts/sufia-one-column.html.erb +2 -0
  45. data/app/views/layouts/sufia-two-column.html.erb +6 -4
  46. data/app/views/my/_facet_layout.html.erb +2 -2
  47. data/app/views/my/_facets.html.erb +4 -6
  48. data/app/views/my/index.html.erb +4 -3
  49. data/app/views/users/_edit_primary.html.erb +18 -17
  50. data/app/views/users/_follower_modal.html.erb +5 -1
  51. data/app/views/users/_following_modal.html.erb +5 -1
  52. data/app/views/users/_user_info.html.erb +6 -1
  53. data/app/views/users/_zotero.html.erb +12 -0
  54. data/config/locales/sufia.en.yml +10 -1
  55. data/config/routes.rb +23 -1
  56. data/lib/generators/sufia/admin_stat_generator.rb +17 -0
  57. data/lib/generators/sufia/install_generator.rb +8 -3
  58. data/{sufia-models/lib/generators/sufia/models/templates/config/resque_admin.rb → lib/generators/sufia/templates/sufia/stats_admin.rb} +3 -3
  59. data/lib/generators/sufia/upgrade400_generator.rb +2 -2
  60. data/lib/sufia.rb +3 -0
  61. data/lib/sufia/arkivo.rb +11 -0
  62. data/lib/sufia/arkivo/actor.rb +95 -0
  63. data/lib/sufia/arkivo/config.rb +11 -0
  64. data/lib/sufia/arkivo/create_subscription_job.rb +67 -0
  65. data/lib/sufia/arkivo/metadata_munger.rb +51 -0
  66. data/lib/sufia/arkivo/schema_validator.rb +55 -0
  67. data/lib/sufia/form_builder.rb +1 -1
  68. data/lib/sufia/inflections.rb +3 -0
  69. data/lib/sufia/version.rb +1 -1
  70. data/lib/sufia/zotero.rb +6 -0
  71. data/lib/sufia/zotero/config.rb +15 -0
  72. data/solr_conf/conf/solrconfig.xml +11 -0
  73. data/spec/controllers/admin_stats_controller_spec.rb +73 -0
  74. data/spec/controllers/api/items_controller_spec.rb +476 -0
  75. data/spec/controllers/api/zotero_controller_spec.rb +178 -0
  76. data/spec/controllers/batch_edits_controller_spec.rb +7 -0
  77. data/spec/controllers/collections_controller_spec.rb +1 -1
  78. data/spec/controllers/dashboard_controller_spec.rb +1 -1
  79. data/spec/controllers/depositors_controller_spec.rb +9 -5
  80. data/spec/controllers/generic_files_controller_spec.rb +5 -4
  81. data/spec/controllers/mailbox_controller_spec.rb +2 -2
  82. data/spec/controllers/my/collections_controller_spec.rb +1 -2
  83. data/spec/controllers/my/files_controller_spec.rb +5 -5
  84. data/spec/controllers/my/shares_controller_spec.rb +15 -3
  85. data/spec/controllers/pages_controller_spec.rb +1 -1
  86. data/spec/controllers/users_controller_spec.rb +10 -9
  87. data/spec/factories/api_items.rb +91 -0
  88. data/spec/factories/generic_files.rb +4 -0
  89. data/spec/factories/users.rb +4 -4
  90. data/spec/features/featured_item_spec.rb +26 -0
  91. data/spec/features/ingest_upload_files_spec.rb +2 -3
  92. data/spec/features/proxy_spec.rb +0 -1
  93. data/spec/helpers/permissions_helper_spec.rb +2 -2
  94. data/spec/helpers/sufia_helper_spec.rb +11 -5
  95. data/spec/inputs/select_with_help_input_spec.rb +2 -2
  96. data/spec/javascripts/helpers/.gitkeep +0 -0
  97. data/spec/javascripts/helpers/jasmine-jquery.js +832 -0
  98. data/spec/javascripts/jasmine_spec.rb +31 -0
  99. data/spec/javascripts/notify_update_link_spec.js +8 -0
  100. data/spec/javascripts/single_use_link_spec.js.coffee +23 -0
  101. data/spec/javascripts/support/jasmine.yml +124 -0
  102. data/spec/javascripts/support/jasmine_helper.rb +15 -0
  103. data/spec/javascripts/terms_of_service_spec.js.coffee +32 -0
  104. data/spec/javascripts/toggle_icon_spec.js +11 -0
  105. data/spec/jobs/active_fedora_id_based_job_spec.rb +3 -3
  106. data/spec/jobs/import_url_job_spec.rb +0 -2
  107. data/spec/lib/sufia/arkivo/actor_spec.rb +139 -0
  108. data/spec/lib/sufia/arkivo/create_subscription_job_spec.rb +54 -0
  109. data/spec/lib/sufia/arkivo/metadata_munger_spec.rb +48 -0
  110. data/spec/lib/sufia/arkivo/schema_validator_spec.rb +65 -0
  111. data/spec/lib/sufia/upload_complete_behavior_spec.rb +1 -1
  112. data/spec/lib/sufia/user_stat_importer_spec.rb +60 -0
  113. data/spec/lib/sufia/zotero/config_spec.rb +30 -0
  114. data/spec/models/collection_spec.rb +36 -7
  115. data/spec/models/file_download_stat_spec.rb +5 -5
  116. data/spec/models/file_usage_spec.rb +23 -0
  117. data/spec/models/file_view_stat_spec.rb +6 -6
  118. data/spec/models/fits_datastream_spec.rb +0 -5
  119. data/spec/models/generic_file_spec.rb +49 -14
  120. data/spec/models/local_authority_spec.rb +1 -1
  121. data/spec/models/proxy_deposit_request_spec.rb +1 -1
  122. data/spec/models/trophy_spec.rb +8 -8
  123. data/spec/models/user_spec.rb +33 -0
  124. data/spec/presenters/sufia/collection_presenter_spec.rb +1 -1
  125. data/spec/routing/api_route_spec.rb +91 -0
  126. data/spec/routing/route_spec.rb +1 -1
  127. data/spec/services/generic_file_audit_service_spec.rb +44 -8
  128. data/spec/spec_helper.rb +18 -3
  129. data/spec/support/features.rb +0 -2
  130. data/spec/support/locations.rb +0 -21
  131. data/spec/support/rake.rb +41 -0
  132. data/spec/support/selectors.rb +0 -50
  133. data/spec/tasks/rake_spec.rb +33 -12
  134. data/spec/test_app_templates/lib/generators/test_app_generator.rb +12 -0
  135. data/spec/views/admin/stats/index.html.erb_spec.rb +45 -0
  136. data/spec/views/catalog/sort_and_per_page.html.erb_spec.rb +0 -1
  137. data/spec/views/dashboard/index_spec.rb +1 -1
  138. data/spec/views/generic_file/edit.html.erb_spec.rb +1 -1
  139. data/spec/views/generic_file/show.html.erb_spec.rb +1 -3
  140. data/spec/views/users/_follower_modal.html.erb_spec.rb +44 -7
  141. data/spec/views/users/_following_modal.html.erb_spec.rb +49 -7
  142. data/spec/views/users/edit.html.erb_spec.rb +72 -0
  143. data/spec/views/users/show.html.erb_spec.rb +1 -1
  144. data/sufia.gemspec +6 -2
  145. data/tasks/sufia-user.rake +14 -0
  146. metadata +130 -156
  147. data/spec/lib/sufia/id_service_spec.rb +0 -32
  148. data/spec/services/noid_spec.rb +0 -9
  149. data/spec/support/poltergeist.rb +0 -11
  150. data/spec/support/rake_output.rb +0 -20
  151. data/sufia-models/.gitignore +0 -17
  152. data/sufia-models/Gemfile +0 -4
  153. data/sufia-models/LICENSE.md +0 -177
  154. data/sufia-models/README.md +0 -39
  155. data/sufia-models/Rakefile +0 -1
  156. data/sufia-models/app/actors/sufia/generic_file/actor.rb +0 -137
  157. data/sufia-models/app/jobs/active_fedora_id_based_job.rb +0 -22
  158. data/sufia-models/app/jobs/active_fedora_pid_based_job.rb +0 -7
  159. data/sufia-models/app/jobs/audit_job.rb +0 -62
  160. data/sufia-models/app/jobs/batch_update_job.rb +0 -72
  161. data/sufia-models/app/jobs/characterize_job.rb +0 -10
  162. data/sufia-models/app/jobs/create_derivatives_job.rb +0 -14
  163. data/sufia-models/app/jobs/import_url_job.rb +0 -52
  164. data/sufia-models/app/jobs/ingest_local_file_job.rb +0 -46
  165. data/sufia-models/app/jobs/resolrize_job.rb +0 -9
  166. data/sufia-models/app/models/batch.rb +0 -36
  167. data/sufia-models/app/models/checksum_audit_log.rb +0 -21
  168. data/sufia-models/app/models/concerns/sufia/ability.rb +0 -61
  169. data/sufia-models/app/models/concerns/sufia/collection_behavior.rb +0 -24
  170. data/sufia-models/app/models/concerns/sufia/file_stat_utils.rb +0 -35
  171. data/sufia-models/app/models/concerns/sufia/generic_file.rb +0 -25
  172. data/sufia-models/app/models/concerns/sufia/generic_file/batches.rb +0 -28
  173. data/sufia-models/app/models/concerns/sufia/generic_file/characterization.rb +0 -89
  174. data/sufia-models/app/models/concerns/sufia/generic_file/content.rb +0 -13
  175. data/sufia-models/app/models/concerns/sufia/generic_file/derivatives.rb +0 -26
  176. data/sufia-models/app/models/concerns/sufia/generic_file/export.rb +0 -343
  177. data/sufia-models/app/models/concerns/sufia/generic_file/featured.rb +0 -11
  178. data/sufia-models/app/models/concerns/sufia/generic_file/full_text_indexing.rb +0 -43
  179. data/sufia-models/app/models/concerns/sufia/generic_file/indexing.rb +0 -14
  180. data/sufia-models/app/models/concerns/sufia/generic_file/metadata.rb +0 -98
  181. data/sufia-models/app/models/concerns/sufia/generic_file/mime_types.rb +0 -69
  182. data/sufia-models/app/models/concerns/sufia/generic_file/permissions.rb +0 -11
  183. data/sufia-models/app/models/concerns/sufia/generic_file/proxy_deposit.rb +0 -31
  184. data/sufia-models/app/models/concerns/sufia/generic_file/trophies.rb +0 -14
  185. data/sufia-models/app/models/concerns/sufia/generic_file/versions.rb +0 -16
  186. data/sufia-models/app/models/concerns/sufia/generic_file/virus_check.rb +0 -37
  187. data/sufia-models/app/models/concerns/sufia/model_methods.rb +0 -20
  188. data/sufia-models/app/models/concerns/sufia/user.rb +0 -137
  189. data/sufia-models/app/models/concerns/sufia/user_usage_stats.rb +0 -15
  190. data/sufia-models/app/models/datastreams/file_content_datastream.rb +0 -4
  191. data/sufia-models/app/models/datastreams/fits_datastream.rb +0 -152
  192. data/sufia-models/app/models/domain_term.rb +0 -5
  193. data/sufia-models/app/models/featured_work.rb +0 -22
  194. data/sufia-models/app/models/file_download_stat.rb +0 -18
  195. data/sufia-models/app/models/file_usage.rb +0 -34
  196. data/sufia-models/app/models/file_view_stat.rb +0 -18
  197. data/sufia-models/app/models/follow.rb +0 -12
  198. data/sufia-models/app/models/generic_file.rb +0 -3
  199. data/sufia-models/app/models/geo_names_resource.rb +0 -18
  200. data/sufia-models/app/models/group.rb +0 -8
  201. data/sufia-models/app/models/local_authority.rb +0 -86
  202. data/sufia-models/app/models/local_authority_entry.rb +0 -3
  203. data/sufia-models/app/models/proxy_deposit_request.rb +0 -85
  204. data/sufia-models/app/models/proxy_deposit_rights.rb +0 -4
  205. data/sufia-models/app/models/single_use_link.rb +0 -42
  206. data/sufia-models/app/models/subject_local_authority_entry.rb +0 -2
  207. data/sufia-models/app/models/sufia/avatar_uploader.rb +0 -20
  208. data/sufia-models/app/models/sufia/avatar_validator.rb +0 -8
  209. data/sufia-models/app/models/sufia/collection.rb +0 -5
  210. data/sufia-models/app/models/sufia/download.rb +0 -9
  211. data/sufia-models/app/models/sufia/orcid_validator.rb +0 -12
  212. data/sufia-models/app/models/sufia/pageview.rb +0 -9
  213. data/sufia-models/app/models/trophy.rb +0 -10
  214. data/sufia-models/app/models/user_stat.rb +0 -2
  215. data/sufia-models/app/models/version_committer.rb +0 -2
  216. data/sufia-models/app/services/sufia/analytics.rb +0 -50
  217. data/sufia-models/app/services/sufia/generic_file_audit_service.rb +0 -83
  218. data/sufia-models/app/services/sufia/generic_file_indexing_service.rb +0 -12
  219. data/sufia-models/app/services/sufia/id_service.rb +0 -45
  220. data/sufia-models/app/services/sufia/noid.rb +0 -22
  221. data/sufia-models/app/services/sufia/repository_audit_service.rb +0 -9
  222. data/sufia-models/config/locales/sufia.en.yml +0 -6
  223. data/sufia-models/lib/generators/sufia/models/abstract_migration_generator.rb +0 -30
  224. data/sufia-models/lib/generators/sufia/models/cached_stats_generator.rb +0 -24
  225. data/sufia-models/lib/generators/sufia/models/fulltext_generator.rb +0 -27
  226. data/sufia-models/lib/generators/sufia/models/install_generator.rb +0 -106
  227. data/sufia-models/lib/generators/sufia/models/orcid_field_generator.rb +0 -19
  228. data/sufia-models/lib/generators/sufia/models/proxies_generator.rb +0 -24
  229. data/sufia-models/lib/generators/sufia/models/templates/app/models/collection.rb +0 -2
  230. data/sufia-models/lib/generators/sufia/models/templates/config/analytics.yml +0 -9
  231. data/sufia-models/lib/generators/sufia/models/templates/config/clamav.rb +0 -1
  232. data/sufia-models/lib/generators/sufia/models/templates/config/mailboxer.rb +0 -17
  233. data/sufia-models/lib/generators/sufia/models/templates/config/mime_types.rb +0 -6
  234. data/sufia-models/lib/generators/sufia/models/templates/config/redis.yml +0 -9
  235. data/sufia-models/lib/generators/sufia/models/templates/config/redis_config.rb +0 -32
  236. data/sufia-models/lib/generators/sufia/models/templates/config/resque-pool.yml +0 -1
  237. data/sufia-models/lib/generators/sufia/models/templates/config/resque_config.rb +0 -5
  238. data/sufia-models/lib/generators/sufia/models/templates/config/setup_mail.rb +0 -3
  239. data/sufia-models/lib/generators/sufia/models/templates/config/solrconfig.xml +0 -223
  240. data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +0 -144
  241. data/sufia-models/lib/generators/sufia/models/templates/migrations/acts_as_follower_migration.rb +0 -17
  242. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_avatars_to_users.rb +0 -15
  243. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_external_key_to_content_blocks.rb +0 -6
  244. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_groups_to_users.rb +0 -11
  245. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_ldap_attrs_to_user.rb +0 -27
  246. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_linkedin_to_users.rb +0 -5
  247. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_orcid_to_users.rb +0 -5
  248. data/sufia-models/lib/generators/sufia/models/templates/migrations/add_social_to_users.rb +0 -13
  249. data/sufia-models/lib/generators/sufia/models/templates/migrations/change_audit_log_pid_to_generic_file_id.rb +0 -5
  250. data/sufia-models/lib/generators/sufia/models/templates/migrations/change_proxy_deposit_request_pid_to_generic_file_id.rb +0 -5
  251. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_checksum_audit_logs.rb +0 -19
  252. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_content_blocks.rb +0 -10
  253. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_featured_works.rb +0 -12
  254. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_file_download_stats.rb +0 -12
  255. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_file_view_stats.rb +0 -12
  256. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_local_authorities.rb +0 -50
  257. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_proxy_deposit_requests.rb +0 -16
  258. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_proxy_deposit_rights.rb +0 -11
  259. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_single_use_links.rb +0 -12
  260. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_tinymce_assets.rb +0 -8
  261. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_trophies.rb +0 -10
  262. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_user_stats.rb +0 -19
  263. data/sufia-models/lib/generators/sufia/models/templates/migrations/create_version_committers.rb +0 -15
  264. data/sufia-models/lib/generators/sufia/models/update_content_blocks_generator.rb +0 -18
  265. data/sufia-models/lib/generators/sufia/models/upgrade400_generator.rb +0 -54
  266. data/sufia-models/lib/generators/sufia/models/upgrade600_generator.rb +0 -21
  267. data/sufia-models/lib/generators/sufia/models/usagestats_generator.rb +0 -19
  268. data/sufia-models/lib/generators/sufia/models/user_stats_generator.rb +0 -31
  269. data/sufia-models/lib/sufia/messages.rb +0 -66
  270. data/sufia-models/lib/sufia/models.rb +0 -34
  271. data/sufia-models/lib/sufia/models/active_fedora/redis.rb +0 -43
  272. data/sufia-models/lib/sufia/models/active_record/redis.rb +0 -56
  273. data/sufia-models/lib/sufia/models/engine.rb +0 -79
  274. data/sufia-models/lib/sufia/models/file_content.rb +0 -6
  275. data/sufia-models/lib/sufia/models/file_content/versions.rb +0 -21
  276. data/sufia-models/lib/sufia/models/resque.rb +0 -36
  277. data/sufia-models/lib/sufia/models/stats/user_stat_importer.rb +0 -108
  278. data/sufia-models/lib/sufia/models/user_local_directory_behavior.rb +0 -29
  279. data/sufia-models/lib/sufia/models/utils.rb +0 -22
  280. data/sufia-models/lib/sufia/models/version.rb +0 -5
  281. data/sufia-models/lib/sufia/models/virus_found_error.rb +0 -4
  282. data/sufia-models/lib/sufia/permissions.rb +0 -9
  283. data/sufia-models/lib/sufia/permissions/readable.rb +0 -20
  284. data/sufia-models/lib/sufia/permissions/writable.rb +0 -74
  285. data/sufia-models/lib/tasks/batch_cleanup.rake +0 -19
  286. data/sufia-models/lib/tasks/migrate.rake +0 -21
  287. data/sufia-models/lib/tasks/resque.rake +0 -13
  288. data/sufia-models/lib/tasks/stats_tasks.rake +0 -12
  289. data/sufia-models/lib/tasks/sufia-models_tasks.rake +0 -80
  290. data/sufia-models/sufia-models.gemspec +0 -52
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2796b98ae30851164de5f1e0c2e39dcc91dda839
4
- data.tar.gz: f4e1fa1b7eebf06bfca330f1f08373cd2931142b
3
+ metadata.gz: afe7739c6421450db9e6d2f9651152c8d4ff0624
4
+ data.tar.gz: 08b718c691ae8e6813f928d57efaeb3d2265151b
5
5
  SHA512:
6
- metadata.gz: 2e10c49d8a7e0b075abdff71ca943189497c6c7dce4746dfc418604777405dd78d56e4142c0de6e261e2997c98e94630ca246d59ae2b5af8331ec15eea216d02
7
- data.tar.gz: b135eb633c321d549b2b510e66a68cc814a45ff5d3ed19b6b3f7f0b216ebd7c95dded451bdb4728ab35309bf1afc5da46f374302501917792529e3c75eed6d79
6
+ metadata.gz: a5e5252d70908e42cdd09137947531a696f05bc4b7ab23989cf47774e25597415566c649333efdbb1e65d9f981f08206cb9a1ce68ca7c2199754cf7e910ef78f
7
+ data.tar.gz: ba76310232b867f0e7bc6bba3dcc16ec1282b7d912b940e2f206cac7b068a38a43b4c8d8b1008aa6639e7a3dff86b3e757bf2be1f1fe0e37f385c9f1fb327701
@@ -6,15 +6,12 @@ rvm:
6
6
  matrix:
7
7
  include:
8
8
  - rvm: 2.1
9
- env: "RAILS_VERSION=4.1.8"
9
+ env: "RAILS_VERSION=4.2.1"
10
10
  env:
11
11
  global:
12
12
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
13
-
14
13
  matrix:
15
- - "RAILS_VERSION=4.1.8"
16
- - "RAILS_VERSION=4.2.1"
17
-
14
+ - "RAILS_VERSION=4.2.2"
18
15
  notifications:
19
16
  email:
20
17
  recipients:
@@ -81,16 +81,16 @@ You should also add yourself to the `CONTRIBUTORS.md` file in the root of the pr
81
81
  [Detailed Walkthrough of One Pull Request per Commit](http://ndlib.github.io/practices/one-commit-per-pull-request/)
82
82
 
83
83
  * Read the article ["Using Pull Requests"](https://help.github.com/articles/using-pull-requests) on GitHub.
84
+ * Squash the commits for your branch into one commit
85
+ * `git rebase --interactive HEAD~<number-of-commits>` ([See Github help](https://help.github.com/articles/interactive-rebase))
86
+ * To determine the number of commits on your branch: `git log master..<your-branch> --oneline | wc -l`
87
+ * Squashing your branch's changes into one commit is "good form" and helps the person merging your request to see everything that is going on.
84
88
  * Make sure your branch is up to date with its parent branch (i.e. master)
85
89
  * `git checkout master`
86
90
  * `git pull --rebase`
87
91
  * `git checkout <your-branch>`
88
92
  * `git rebase master`
89
93
  * It is likely a good idea to run your tests again.
90
- * Squash the commits for your branch into one commit
91
- * `git rebase --interactive HEAD~<number-of-commits>` ([See Github help](https://help.github.com/articles/interactive-rebase))
92
- * To determine the number of commits on your branch: `git log master..<your-branch> --oneline | wc -l`
93
- * Squashing your branch's changes into one commit is "good form" and helps the person merging your request to see everything that is going on.
94
94
  * Push your changes to a topic branch in your fork of the repository.
95
95
  * Submit a pull request from your fork to the project.
96
96
 
data/Gemfile CHANGED
@@ -6,11 +6,12 @@ gemspec
6
6
  # Required for doing pagination inside an engine. See https://github.com/amatsuda/kaminari/pull/322
7
7
  gem 'kaminari', github: 'jcoyne/kaminari', branch: 'sufia'
8
8
  gem 'sufia-models', path: './sufia-models'
9
- gem 'slop', '~> 3.6.0' # This just helps us generate a valid Gemfile.lock when Rails 4.2 is installed (which requires byebug which has a dependency on slop)
9
+ gem 'slop', '~> 4.2' # This just helps us generate a valid Gemfile.lock when Rails 4.2 is installed (which requires byebug which has a dependency on slop)
10
10
 
11
11
  group :development, :test do
12
12
  gem "simplecov", require: false
13
13
  gem 'byebug' unless ENV['CI']
14
+ gem 'coveralls', require: false
14
15
  end
15
16
 
16
17
  file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path("../spec/internal", __FILE__))
data/History.md CHANGED
@@ -1,5 +1,74 @@
1
1
  # History of Sufia releases
2
2
 
3
+ ## 6.1.0
4
+
5
+ * Making the image thumbnail alt tag empty for better accessibility, since there is more information about title and description in the result. [Michael Tribone]
6
+ * Changing to make sure we have a current_user before comparing the id [Carolyn Cole]
7
+ * Update outdated dependencies to make Gemnasium green. [Michael J. Giarlo]
8
+ * checking for members and saved before querying solr. fixes #1216 [Carolyn Cole]
9
+ * Remove has_many_versions because it doesn't have any effect [Justin Coyne]
10
+ * Fixes accessibility issues with labels and form elements in add to collection modal [Michael Tribone]
11
+ * Fixes HTML source order, adds ARIA roles, and skip to content link for better accessibility. [Michael Tribone]
12
+ * Removes old icon and replaces it with SVG when searching in collections [mtribone]
13
+ * Fixes vertical overflow of popover helper and small height for files to be changed. [mtribone]
14
+ * Support collection size calculations using a Solr query instead of loading each file sequentially. This should greatly improve performance and has been tested on collections with thousands of GenericFiles effectively [Nathan Rogers]
15
+ * Enable coveralls and update badge per coveralls.io instructions [Michael J. Giarlo]
16
+ * Remove logic around user groups from ability methods. [Michael J. Giarlo]
17
+ * removing unecissary local variables identified by rubocop [Carolyn Cole]
18
+ * Remove unused test helpers [Justin Coyne]
19
+ * Handle unauthorized access to DepositorsController The test was expecting some kind of error and it was receiving ActionController::UrlGenerationError. This was caused by the default access denied error redirecting to the `show` action which doesn't exist for this particular controller. This commit overrides the default error handling code and updates the tests. [Justin Coyne]
20
+ * Remove duplicate poltergeist setup [Justin Coyne]
21
+ * Upgrade the tested versions of Rails to the latest [Justin Coyne]
22
+ * replaced Rspec.describe with describe in featured_item_spec [luisgreg99]
23
+ * Stop supporting Rails 4.1 [Justin Coyne]
24
+ * Update CONTRIBUTING.md [Michael J. Giarlo]
25
+ * added narrower selector for show actions partial [luisgreg99]
26
+ * Fix up JS a little. [Trey Terrell]
27
+ * updated featured_works and featured_works_controller [luisgreg99]
28
+ * Aligning the end of a block with the beginning of the block as pointed out by rubocop [Carolyn Cole]
29
+ * Fixes contrast issues with font color and badge color in the statistics [mtribone]
30
+ * Refactors CSS to use label-default link and improves text/label visibility [mtribone]
31
+ * Surrounding regular expressions being passed to a method by parens to distiguish them from division [Carolyn Cole]
32
+ * removing useless assignemnt to sanatize_text varriable [Carolyn Cole]
33
+ * Removing space after let before the paren: 'let(' instead of 'let (' [Carolyn Cole]
34
+ * Removing unused mailboxer init. refs #1174 [Carolyn Cole]
35
+ * Adding admin stats to sufia by copying them from ScholarSphere [Carolyn Cole]
36
+ * Adding user email list rake task. fixes #1060 [Carolyn Cole]
37
+ * Refactors CSS to keep defaults intact and more specifically target .remove [mtribone]
38
+ * Adding clamav generator to master install and as a separate action. refs #1174 [Carolyn Cole]
39
+ * Making the user stats reporter more robust to the intermittent errors returned by google analytics [Carolyn Cole]
40
+ * Fixes background color of facet X when filtering. Collision with .remove class #136 [mtribone]
41
+ * Allow the GenericFile show page to be loaded exclusively from solr [Carolyn Cole]
42
+ * Adding a coffescript test for testing the terms of service javascript and single use link javascript Updated the spec runner to not fail on multiples of 10 and to output the number of jasmine tests run on passing to make it more transparant how many jasmine tests are running. [Carolyn Cole]
43
+ * Adding a configurable sleep to retry unless. default is set to zero or no sleep to not change the original behavior. fixes #1059 [Carolyn Cole]
44
+ * Moving where the edit permissions are so that the my controller will filter for only items I have edit access to. fixes #1061 [Carolyn Cole]
45
+ * Integrating jasmine with rspec and adding simple jasmine tests [Carolyn Cole]
46
+ * Adding in jasmine and it's generated files, and jasmine-jquery [Carolyn Cole]
47
+ * Resque jobs should be namespaced appropriately under Passenger. Fixes #1131 [Michael J. Giarlo]
48
+ * Add Zotero integration [Michael J. Giarlo]
49
+ * Remove hash trackers in addressbar. Fixes #1051. [Anna Headley]
50
+ * Fix terms of service feature test. [Anna Headley]
51
+ * Uses correct file date when collecting analytics [Hector Correa]
52
+ * Add spec to show how to override validations. [Trey Terrell]
53
+ * Use an overridable method instead of a constant. [Trey Terrell]
54
+ * Get rid of deprecation warnings on ActiveFedora 9.1 [Justin Coyne]
55
+ * Update follower and following message [Adam Wead]
56
+ * Update the test matrix to the latest versions of rails. [Justin Coyne]
57
+ * Upgrade to AF 9.1 and prevent deprecations [Justin Coyne]
58
+ * Sufia shouln't have its own copy of sufia-models. Fixes #1035 [Justin Coyne]
59
+ * update toc with Admin Users change [E. Lynette Rayle]
60
+ * add instructions for creating an admin user [E. Lynette Rayle]
61
+ * Fix alignment of dropdown menu [Adam Wead]
62
+ * Prevent user profile page from crashing if a file listed as a trophy does not exist in Fedora. We log the error instead. [Hector Correa]
63
+ * Use binary mode when downloading jars from maven [Chris Beer]
64
+ * Fixes bug in batch edit when users only changes the permissions of the files. [Hector Correa]
65
+ * Fix typo in README [Michael J. Giarlo]
66
+ * fixes #1023 faulty test for showing the correct collection [Tricia Jenkins]
67
+ * Download full-text jars via HTTPS, else the task winds up downloading a bunch of 161-byte HTML files with 302 FOUND in them [Michael J. Giarlo]
68
+ * Noid service extracted out into its own gem [Michael J. Giarlo]
69
+ * Correct version of Sufia in README [Michael J. Giarlo]
70
+
71
+
3
72
  ## 6.0.0
4
73
 
5
74
  * Replace pid with id in config [Adam Wead]
data/README.md CHANGED
@@ -1,4 +1,3 @@
1
- [![Stories in Ready](https://badge.waffle.io/projecthydra/sufia.png?label=ready&title=Ready)](https://waffle.io/projecthydra/sufia)
2
1
  # Sufia
3
2
 
4
3
  [![Version](https://badge.fury.io/rb/sufia.png)](http://badge.fury.io/rb/sufia)
@@ -7,7 +6,8 @@
7
6
  [![API Docs](http://img.shields.io/badge/API-docs-blue.svg)](http://rubydoc.info/gems/sufia)
8
7
  [![Build Status](https://travis-ci.org/projecthydra/sufia.png?branch=master)](https://travis-ci.org/projecthydra/sufia)
9
8
  [![Dependency Status](https://gemnasium.com/projecthydra/sufia.png)](https://gemnasium.com/projecthydra/sufia)
10
- [![Coverage Status](https://img.shields.io/coveralls/projecthydra/sufia.svg)](https://coveralls.io/r/projecthydra/sufia?branch=master)
9
+ [![Coverage Status](https://coveralls.io/repos/projecthydra/sufia/badge.svg)](https://coveralls.io/r/projecthydra/sufia)
10
+ [![Stories in Ready](https://badge.waffle.io/projecthydra/sufia.png?label=ready&title=Ready)](https://waffle.io/projecthydra/sufia)
11
11
 
12
12
  # Table of Contents
13
13
 
@@ -31,9 +31,13 @@
31
31
  * [Analytics and usage statistics](#analytics-and-usage-statistics)
32
32
  * [Capturing usage](#capturing-usage)
33
33
  * [Displaying usage in the UI](#displaying-usage-in-the-ui)
34
+ * [Zotero integration](#zotero-integration)
34
35
  * [Tag Cloud](#tag-cloud)
35
36
  * [Customizing metadata](#customizing-metadata)
36
37
  * [Proxies and Transfers (Sufia 4.x only)](#proxies-and-transfers-sufia-4x-only)
38
+ * [Admin Users](#admin-users)
39
+ * [One time setup for first admin](#one-time-setup-for-first-admin)
40
+ * [Adding an admin user](#adding-an-admin-user)
37
41
  * [License](#license)
38
42
  * [Contributing](#contributing)
39
43
  * [Development](#development)
@@ -75,6 +79,7 @@ Sufia has the following features:
75
79
  * Responsive, fluid, Bootstrap 3-based UI
76
80
  * Dynamically configurable featured works and researchers on homepage
77
81
  * Proxy deposit and transfers of ownership
82
+ * Integration with Zotero for automatic population of user content
78
83
 
79
84
  # Help
80
85
 
@@ -128,7 +133,7 @@ rails new my_app
128
133
  Add the following lines to your application's Gemfile.
129
134
 
130
135
  ```
131
- gem 'sufia', '6.0.0.rc4'
136
+ gem 'sufia', '6.0.0'
132
137
  gem 'kaminari', github: 'jcoyne/kaminari', branch: 'sufia' # required to handle pagination properly in dashboard. See https://github.com/amatsuda/kaminari/pull/322
133
138
  ```
134
139
 
@@ -270,6 +275,36 @@ Lastly, you will need to set `config.analytics = true` and `config.analytic_star
270
275
  has the proper access within your Google Analyics account. To do so, go to the _Admin_ tab for your Google Analytics account.
271
276
  Click on _User Management_, in the _Account_ column, and add "Read & Analyze" permissions for the OAuth client email address.
272
277
 
278
+ ## Zotero integration
279
+
280
+ Integration with Zotero-managed publications is possible using [Arkivo](https://github.com/inukshuk/arkivo). Arkivo is a Node-based Zotero subscription service that monitors Zotero for changes and will feed those changes to your Sufia-based app. [Read more about this work.](https://www.zotero.org/blog/feeds-and-institutional-repositories-coming-to-zotero/)
281
+
282
+ To enable Zotero integration, first [register an OAuth client with Zotero](https://www.zotero.org/oauth/apps), then [install and start Arkivo-Sufia](https://github.com/inukshuk/arkivo-sufia) and then generate the Arkivo API in your Sufia-based application:
283
+
284
+ ```
285
+ rails g sufia:models:arkivo_api
286
+ ```
287
+
288
+ The generator does the following:
289
+
290
+ * Enables the API in the Sufia initializer
291
+ * Adds a database migration
292
+ * Creates a routing constraint that allows you to control what clients can access the API
293
+ * Copies a config file that allows you to specify the host and port Arkivo is running on
294
+ * Copies a config file for your Zotero OAuth client credentials
295
+
296
+ Update your database schema with `rake db:migrate`.
297
+
298
+ Add unique Arkivo tokens for each of your existing user accounts with `rake sufia:user:tokens`. (New users will have tokens created as part of the account creation process.)
299
+
300
+ Edit the routing constraint in `config/initializers/arkivo_constraint.rb` so that your Sufia-based app will allow connections from Arkivo. **Make sure this is restrictive as you are allowing access to an API that allows creates, updates and deletes.**
301
+
302
+ Tweak `config/arkivo.yml` to point at the host and port your instance of Arkivo is running on.
303
+
304
+ Tweak `config/zotero.yml` to hold your Zotero OAuth client key and secret. Alternatively, if you'd rather not paste these into a file, you may use the environment variables `ZOTERO_CLIENT_KEY` and `ZOTERO_CLIENT_SECRET`.
305
+
306
+ Restart your app and it should now be able to pull in Zotero-managed publications on behalf of your users. Each user will need to link their Sufia app account with their Zotero accounts, which can be done in the "Edit Profile" page. After the accounts are linked, Arkivo will create a subscription to that user's Zotero-hosted "My Publications" collection. When users add items to their "My Publications" collection via the Zotero client, they will automatically be pushed into the Sufia-based repository application. Updates to these items will trigger updates to item metadata in your app, and deletes will delete the files from your app.
307
+
273
308
  ## Tag Cloud
274
309
 
275
310
  Sufia provides a tag cloud on the home page. To change which field is displayed in that cloud, change the value of `config.tag_cloud_field_name` in the `blacklight_config` section of your CatalogController. For example:
@@ -296,6 +331,51 @@ Chances are you will want to customize the default metadata provided by Sufia.
296
331
 
297
332
  To add proxies and transfers to your **Sufia 4**-based app, run the 'sufia:models:proxies' generator and then run 'rake db:migrate'. If you're already running Sufia 5 or 6, this is already added and you may skip this step.
298
333
 
334
+ ## Admin Users
335
+
336
+ ### One time setup for first admin
337
+
338
+ Follow the directions for installing hydra-role-management.
339
+
340
+ Add the following gem to Sufia installed app's Gemfile
341
+ ```
342
+ gem "hydra-role-management"
343
+ ```
344
+
345
+ ### Adding an admin user
346
+
347
+ In rails console, run the following commands to create the admin role.
348
+ ```
349
+ r = Role.create name: "admin"
350
+ ```
351
+
352
+ Add a user as the admin.
353
+ ```
354
+ r.users << User.find_by_user_key( "your_admin_users_email@fake.email.org" )
355
+ r.save
356
+ ```
357
+
358
+ Confirm user was made an admin.
359
+ ```
360
+ u = User.find_by_user_key( "your_admin_users_email@fake.email.org" )
361
+ u.admin?
362
+ # shows SELECT statment
363
+ => true
364
+
365
+ if u.admin? == true then SUCCESS
366
+ ```
367
+
368
+ Confirm in browser
369
+
370
+ * go to your Sufia install
371
+ * login as the admin user
372
+ * add /roles to the end of the main URL
373
+
374
+ SUCCESS will look like...
375
+
376
+ * you don't get an error on the /roles page
377
+ * you see a button labeled "Create a new role"
378
+
299
379
  # License
300
380
 
301
381
  Sufia is available under [the Apache 2.0 license](LICENSE.md).
@@ -312,7 +392,7 @@ This information is for people who want to modify the engine itself, not an appl
312
392
 
313
393
  [Install the gh-md-toc tool](https://github.com/ekalinin/github-markdown-toc/blob/master/README.md#installation), then ensure your README changes are up on GitHub, and then run:
314
394
 
315
- `gh-md-toc https://github.com/USERNAME/sufia/blog/BRANCH/README.md`
395
+ `gh-md-toc https://github.com/USERNAME/sufia/blob/BRANCH/README.md`
316
396
 
317
397
  That will print to stdout the new TOC, which you can copy into `README.md`, commit, and push.
318
398
 
@@ -1 +1 @@
1
- 6.0.0
1
+ 6.1.0
@@ -31,20 +31,37 @@ function dragAndDrop(selector) {
31
31
  }
32
32
 
33
33
  Blacklight.onLoad(function() {
34
- $('a[data-behavior="feature"]').on('click', function(evt) {
34
+ $('#show_actions').on('click', 'a[data-behavior="feature"]', function(evt) {
35
35
  evt.preventDefault();
36
+ evt.stopPropagation();
36
37
  anchor = $(this);
37
38
  $.ajax({
38
39
  url: anchor.attr('href'),
39
40
  type: "post",
40
41
  success: function(data) {
41
- anchor.before("Featured");
42
+ anchor.before('<a data-method="post" data-behavior="unfeature-page" href="'+anchor.attr('href')+'">Unfeature</a>');
42
43
  anchor.remove();
43
44
  }
44
45
  });
45
46
  });
46
47
 
47
- $('a[data-behavior="unfeature"]').on('click', function(evt) {
48
+ $('#show_actions').on('click', 'a[data-behavior="unfeature-page"]', function(evt) {
49
+ evt.preventDefault();
50
+ evt.stopPropagation();
51
+ anchor = $(this);
52
+ $.ajax({
53
+ url: anchor.attr('href'),
54
+ type: "post",
55
+ data: {"_method":"delete"},
56
+ success: function(data) {
57
+ anchor.before('<a data-method="post" data-behavior="feature" href="'+anchor.attr('href')+'">Feature</a>');
58
+ anchor.remove();
59
+ }
60
+ });
61
+ });
62
+
63
+
64
+ $('#featured_works').on('click', 'a[data-behavior="unfeature"]', function(evt) {
48
65
  evt.preventDefault();
49
66
  anchor = $(this);
50
67
  $.ajax({
@@ -20,7 +20,7 @@ label.error { float: left; color: red; padding-left: .5em; vertical-align: top;
20
20
  #upload_tooltip { background: #ff0; padding: 5px; border: 1px solid #ddd; position: absolute; }
21
21
 
22
22
  .fileHeight {
23
- max-height: 50px
23
+ max-height: 8em;
24
24
  }
25
25
 
26
26
  .scrollx {
@@ -28,7 +28,7 @@ label.error { float: left; color: red; padding-left: .5em; vertical-align: top;
28
28
  }
29
29
 
30
30
  .scrolly {
31
- overflow-y: auto;
31
+ overflow-y: visible;
32
32
  }
33
33
 
34
34
  h2 small {
@@ -18,7 +18,7 @@
18
18
  @import 'sufia/settings', 'sufia/header', 'sufia/styles', 'sufia/file-listing',
19
19
  'sufia/collections', 'sufia/batch-edit', 'sufia/dashboard', 'sufia/home-page',
20
20
  'sufia/featured', 'sufia/tagcloud', 'sufia/usage-stats', 'sufia/catalog', 'sufia/buttons',
21
- 'sufia/tinymce', 'sufia/proxy-rights', 'sufia/file-show';
21
+ 'sufia/tinymce', 'sufia/proxy-rights', 'sufia/file-show', 'sufia/modal';
22
22
  @import 'hydra-editor/multi_value_fields';
23
23
 
24
24
  #browse-everything {
@@ -38,7 +38,7 @@
38
38
  padding-top: 10px;
39
39
  }
40
40
 
41
- .profile img.orcid {
41
+ .profile img.profile {
42
42
  float: left;
43
43
  margin-right: 2px;
44
44
  }
@@ -35,12 +35,12 @@ ul.listing .add, ul.listing .remove {
35
35
  }
36
36
  }
37
37
 
38
- .remove, .btn-danger {
38
+ span.appliedFilter .remove, .btn-danger {
39
39
  background-color: $remove-background-color;
40
40
  border-color: $remove-border-color;
41
41
  color: $remove-text-color;
42
42
  }
43
- .remove:hover, .remove:focus,
43
+ span.appliedFilter .remove:hover, span.appliedFilter .remove:focus,
44
44
  .btn-danger:hover, .btn-danger:focus {
45
45
  background-color: $remove-background-hover;
46
46
  border-color: $remove-border-color;
@@ -39,7 +39,7 @@
39
39
  }
40
40
 
41
41
  .collection-icon-search {
42
- padding: 15px 0 0 10px;
42
+ padding: 0;
43
43
  }
44
44
 
45
45
  .collection-icon-small {
@@ -56,9 +56,9 @@
56
56
  margin: 1em 0 0 1em;
57
57
  }
58
58
 
59
- .actions-controls-collections a:link,
60
- .actions-controls-collections a:visited,
61
- .actions-controls-collections a:hover {
59
+ .label-default a:link,
60
+ .label-default a:visited,
61
+ .label-default a:hover {
62
62
  color: #FFF;
63
63
  text-align: center;
64
64
  }
@@ -21,7 +21,7 @@
21
21
  .badge-optional {
22
22
  background-color: $badge-optional-background-color;
23
23
  border-radius: 2px;
24
- color: $badge-font-color;
24
+ color: $badge-optional-font-color;
25
25
  padding: 0 .25em;
26
26
  }
27
27
  .views-downloads-dashboard {
@@ -1,3 +1,6 @@
1
+ div.facets h3 {
2
+ font-size: 1.4em;
3
+ }
1
4
  h4 .small {
2
5
  color: $navbar-default-toggle-icon-bar-bg;
3
6
  }
@@ -0,0 +1,4 @@
1
+ div.collection-list legend {
2
+ font-size: 1.4em;
3
+ border: none;
4
+ }
@@ -16,7 +16,7 @@ $brown-light: #D2B48C;
16
16
  $classic-white: #FFF;
17
17
  $cream-light: #FCFBF7;
18
18
  $gray-dark: #333;
19
- $gray-med-dark: #888;
19
+ $gray-med-dark: #666;
20
20
  $gray-medium: #CECDCD;
21
21
  $gray-light: #DDD;
22
22
  $gray-lighter: #E1E1E1;
@@ -29,8 +29,9 @@ $red-orange: #D6562B;
29
29
 
30
30
  // Dashboard
31
31
  $badge-background-color: $highlight-yellow;
32
- $badge-optional-background-color: $gray-medium;
33
- $badge-font-color: $classic-white;
32
+ $badge-optional-background-color: $gray-med-dark;
33
+ $badge-font-color: $basic-black;
34
+ $badge-optional-font-color: $classic-white;
34
35
 
35
36
  $content-wrapper-background-color: $cream-light;
36
37