curation_concerns 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +62 -35
  3. data/app/actors/curation_concerns/actors/add_to_collection_actor.rb +1 -2
  4. data/app/actors/curation_concerns/actors/apply_order_actor.rb +16 -0
  5. data/app/controllers/concerns/curation_concerns/application_controller_behavior.rb +20 -10
  6. data/app/controllers/concerns/curation_concerns/download_behavior.rb +5 -4
  7. data/app/helpers/curation_concerns/blacklight_overrides_helper.rb +11 -0
  8. data/app/helpers/curation_concerns/main_app_helpers.rb +1 -0
  9. data/app/indexers/curation_concerns/file_set_indexer.rb +1 -1
  10. data/app/jobs/create_derivatives_job.rb +3 -1
  11. data/app/models/concerns/curation_concerns/file_set_behavior.rb +0 -1
  12. data/app/services/curation_concerns/derivative_path.rb +48 -30
  13. data/app/views/collections/_form_permission.html.erb +3 -15
  14. data/app/views/curation_concerns/base/_form_permission.html.erb +1 -6
  15. data/app/views/layouts/boilerplate.html.erb +0 -1
  16. data/app/views/layouts/error.html.erb +0 -2
  17. data/config/locales/curation_concerns.en.yml +3 -4
  18. data/curation_concerns.gemspec +5 -5
  19. data/lib/curation_concerns/version.rb +1 -1
  20. data/lib/generators/curation_concerns/templates/config/curation_concerns.rb +0 -3
  21. data/spec/actors/curation_concerns/apply_order_actor_spec.rb +60 -0
  22. data/spec/controllers/downloads_controller_spec.rb +10 -0
  23. data/spec/factories/generic_works.rb +13 -0
  24. data/spec/indexers/file_set_indexer_spec.rb +7 -3
  25. data/spec/jobs/create_derivatives_job_spec.rb +71 -37
  26. data/spec/services/derivative_path_spec.rb +35 -14
  27. data/spec/views/catalog/index.html.erb_spec.rb +1 -0
  28. metadata +30 -21
  29. data/app/models/concerns/curation_concerns/file_set/full_text_indexing.rb +0 -11
  30. data/app/views/curation_concerns/base/_form_permission_note.html.erb +0 -15
  31. data/app/views/curation_concerns/base/_visibility.html.erb +0 -17
  32. data/app/views/shared/_ga.html.erb +0 -6
  33. data/spec/views/curation_concerns/base/_form_permission.html.erb_spec.rb +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7eb8f7385740c5fbbc0735eba71e83175368a313
4
- data.tar.gz: d0715c82e683b32154dba32111d02b31e9101af6
3
+ metadata.gz: 91dd51748b5be3e045374bdf92ab07b0378f67f9
4
+ data.tar.gz: 92e499a69aa59d9bfce9f6b9adb654301fa86bde
5
5
  SHA512:
6
- metadata.gz: 25e1d462f3f5db545779bd0a03a458ae4ad1f7b961163bb50d55a8a7537e70cbc343db5b9a26ea4c17dcaa8937266e41fc094b48b6fe7f7885b406db540e1e9b
7
- data.tar.gz: 82f824c0adddcb8f722eb41a85876fea18c5e0b3045c1282ebd73eb176776303b1f7ce37fa59c1d4727ab7d9e152db3beb8df5d889503aa89e139a2c5bcc5856
6
+ metadata.gz: d99de5a52ae7f2dc56f2499243f858e5d5c29a2a540a2c2972235441f20e7b91286806c846d89ac9bd0f9da49f912d52e6fbc9a8c2e129e04542bab801f55737
7
+ data.tar.gz: 239ff60e74ce548ef485a4eb7de1c83803c931b9d254d8cbe50d3404a1fea434a0e5394e8c736252982f0946e89b721c3eb20d2682516d1489617260151b5b09
data/README.md CHANGED
@@ -1,13 +1,17 @@
1
1
  # CurationConcerns
2
2
 
3
- [![Version](https://badge.fury.io/rb/curation_concerns.png)](http://badge.fury.io/rb/curation_concerns)
3
+ Code: [![Version](https://badge.fury.io/rb/curation_concerns.png)](http://badge.fury.io/rb/curation_concerns)
4
4
  [![Build Status](https://travis-ci.org/projecthydra/curation_concerns.svg?branch=master)](https://travis-ci.org/projecthydra/curation_concerns)
5
5
  [![Coverage Status](https://coveralls.io/repos/projecthydra/curation_concerns/badge.svg?branch=master)](https://coveralls.io/r/projecthydra/curation_concerns?branch=master)
6
6
  [![Code Climate](https://codeclimate.com/github/projecthydra/curation_concerns/badges/gpa.svg)](https://codeclimate.com/github/projecthydra/curation_concerns)
7
- [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE.txt)
7
+
8
+ Docs: [![Apache 2.0 License](http://img.shields.io/badge/APACHE2-license-blue.svg)](./LICENSE.txt)
8
9
  [![Contribution Guidelines](http://img.shields.io/badge/CONTRIBUTING-Guidelines-blue.svg)](./CONTRIBUTING.md)
9
10
  [![API Docs](http://img.shields.io/badge/API-docs-blue.svg)](http://rubydoc.info/gems/curation_concerns)
10
11
 
12
+ Join in: [![Slack Status](http://slack.projecthydra.org/badge.svg)](http://slack.projecthydra.org/) [![Ready](https://badge.waffle.io/projecthydra/curation_concerns.svg?label=ready&title=Ready)](http://waffle.io/projecthydra/curation_concerns)
13
+
14
+
11
15
  A Hydra-based Rails Engine that extends an application, adding the ability to Create, Read, Update and Destroy (CRUD) objects (based on [Hydra::Works](http://github.com/projecthydra/hydra-works)) and providing a generator for defining object types with custom workflows, views, access controls, etc.
12
16
 
13
17
  ## Prerequisites
@@ -16,40 +20,55 @@ Curation Concerns requires the following software to work:
16
20
 
17
21
  1. Solr
18
22
  1. [Fedora Commons](http://www.fedora-commons.org/) digital repository
19
- 1. A SQL RDBMS (MySQL, PostgreSQL), though **note** that SQLite will be used by default if you're looking to get up and running quickly
20
- 1. [Redis](http://redis.io/), a key-value store
21
- 1. [ImageMagick](http://www.imagemagick.org/) with JPEG-2000 support
22
- 1. [FITS](#characterization) version 0.6.x
23
- 1. [LibreOffice](#derivatives)
23
+ 1. A SQL RDBMS (MySQL, PostgreSQL), though **note** that SQLite will be used by default if you're looking to get up and running quickly.
24
+ 1. [Redis](http://redis.io/), a key-value store. The `redlock` gem requires Redis >= 2.6.
25
+ 1. [ImageMagick](http://www.imagemagick.org/) with JPEG-2000 support.
26
+ 1. [LibreOffice](https://www.libreoffice.org/download/libreoffice-fresh/)
27
+ 1. [FITS](#fits) version 0.8.5.
28
+ 1. [FFMPEG](#ffmpeg)
24
29
 
25
30
  ## Installation
26
31
 
27
32
  Add this line to your application's Gemfile:
28
33
 
29
- gem 'curation_concerns'
34
+ ```ruby
35
+ gem 'curation_concerns'
36
+ ```
30
37
 
31
- And then execute:
38
+ Then execute:
32
39
 
33
- $ bundle install
40
+ ```bash
41
+ bundle install
42
+ ```
34
43
 
35
44
  Then run the install generator. You will be prompted if you want to overwrite the default `app/controllers/catalog_controller.rb`, to which you should type `Y` (yes). If you don't want to be prompted on overwrite, you may run the generator with the `-f` (force) option.
36
45
 
37
- $ rails generate curation_concerns:install
38
- $ rake db:migrate
46
+ ```bash
47
+ rails generate curation_concerns:install
48
+ rake db:migrate
49
+ ```
39
50
 
40
- ### FITS 0.8.5
51
+ ### FITS
41
52
 
42
- To install FITS:
43
- * Go to http://projects.iq.harvard.edu/fits/downloads, download __fits-0.8.5.zip__, and unpack it somewhere on your machine. You can also install FITS on OSX with homebrew: `brew install fits` (you may also have to create a symlink from fits.sh -> fits in the next step).
44
- * Mark fits.sh as executable (chmod a+x fits.sh)
45
- * Run "fits.sh -h" from the command line and see a help message to ensure FITS is properly installed
53
+ To install FITS 0.8.5:
54
+ * Download [fits-0.8.5.zip](http://projects.iq.harvard.edu/files/fits/files/fits-0.8.5.zip) or possibly newer from the [project page](http://projects.iq.harvard.edu/fits/downloads). Unpack it somewhere on your machine. Alternatively, use homebrew on OSX: `brew install fits` (you may also have to create a symlink from fits.sh -> fits in the next step).
55
+ * Mark fits.sh as executable (`chmod a+x fits.sh`)
56
+ * Run `fits.sh -h` from the command line and see a help message to ensure FITS is properly installed
46
57
  * Give your app access to FITS by:
47
- * Adding the full fits.sh path to your PATH (e.g., in your .bash_profile), OR
48
- * Changing config/initializers/sufia.rb to point to your FITS location: config.fits_path = "/<your full path>/fits.sh"
58
+ * Adding the full **fits.sh** path to your PATH (e.g., in your **.bash_profile**), OR
59
+ * Changing **config/initializers/sufia.rb** to point to your FITS location: `config.fits_path = "/<your full path>/fits.sh"`
60
+
61
+ ## FFMPEG
62
+
63
+ Curation Concerns includes support for transcoding audio and video files with ffmpeg > 1.0 installed.
49
64
 
50
- ### Redis 2.6
65
+ On OSX, you can use homebrew:
51
66
 
52
- The redlock gem requires Redis >= 2.6.
67
+ ```bash
68
+ brew install ffmpeg --with-fdk-aac --with-libvpx --with-libvorbis
69
+ ```
70
+
71
+ Otherwise, to compile ffmpeg yourself, see the [CompilationGuide](https://trac.ffmpeg.org/wiki/CompilationGuide).
53
72
 
54
73
  ## Usage
55
74
 
@@ -57,31 +76,39 @@ The redlock gem requires Redis >= 2.6.
57
76
 
58
77
  To generate a new object type, use the `curation_concerns:work` Rails generator. Follow the usage instructions provided on the command line when you run:
59
78
 
60
- $ rails generate curation_concerns:work
79
+ ```bash
80
+ rails generate curation_concerns:work
81
+ ```
61
82
 
62
83
  ### Virus Detection
63
84
 
64
- To turn on virus detection, install clamav on your system and add the `clamav` gem to your Gemfile
85
+ To turn on virus detection, install clamav on your system and add the `clamav` gem to your Gemfile:
65
86
 
66
- gem 'clamav'
87
+ ```ruby
88
+ gem 'clamav'
89
+ ```
67
90
 
68
91
  ## Testing
69
92
 
70
93
  If you are modifying the curation_concerns gem and want to run the test suite, follow these steps to set up the test environment.
71
94
 
72
- $ rake ci
73
-
95
+ ```bash
96
+ rake ci
97
+ ```
98
+
74
99
  Or you can do all the steps manually:
75
100
 
76
- $ solr_wrapper -p 8985 -d solr/config/ --collection_name hydra-test
77
-
78
- # in another window
79
- $ fcrepo_wrapper -p 8986 --no-jms
80
-
81
- # in another window
82
- $ rake engine_cart:generate
83
- $ rake curation_concerns:spec
101
+ ```bash
102
+ solr_wrapper -p 8985 -d solr/config/ --collection_name hydra-test
103
+
104
+ # in another window
105
+ fcrepo_wrapper -p 8986 --no-jms
106
+
107
+ # in another window
108
+ rake engine_cart:generate
109
+ rake curation_concerns:spec
110
+ ```
84
111
 
85
112
  ## Help
86
113
 
87
- If you have questions or need help, please email [the Hydra community tech list](mailto:hydra-tech@googlegroups.com) or stop by [the Hydra community IRC channel](irc://irc.freenode.net/projecthydra).
114
+ If you have questions or need help, please email the [Hydra community tech list](mailto:hydra-tech@googlegroups.com) or stop by the [Hydra community IRC channel](irc://irc.freenode.net/projecthydra).
@@ -20,8 +20,7 @@ module CurationConcerns
20
20
  def add_to_collections(new_collection_ids)
21
21
  return true unless new_collection_ids
22
22
  # remove from old collections
23
- # TODO: Implement in_collection_ids https://github.com/projecthydra-labs/hydra-pcdm/issues/157
24
- (curation_concern.in_collections.map(&:id) - new_collection_ids).each do |old_id|
23
+ (curation_concern.in_collection_ids - new_collection_ids).each do |old_id|
25
24
  collection = ::Collection.find(old_id)
26
25
  collection.members.delete(curation_concern)
27
26
  collection.save
@@ -3,11 +3,27 @@ module CurationConcerns
3
3
  class ApplyOrderActor < AbstractActor
4
4
  def update(attributes)
5
5
  ordered_member_ids = attributes.delete(:ordered_member_ids)
6
+ sync_members(ordered_member_ids)
6
7
  apply_order(ordered_member_ids) && next_actor.update(attributes)
7
8
  end
8
9
 
9
10
  private
10
11
 
12
+ def sync_members(ordered_member_ids)
13
+ return true if ordered_member_ids.nil?
14
+ existing_members_ids = curation_concern.member_ids
15
+ (existing_members_ids - ordered_member_ids).each do |old_id|
16
+ work = ::ActiveFedora::Base.find(old_id)
17
+ curation_concern.ordered_members.delete(work)
18
+ end
19
+
20
+ (ordered_member_ids - existing_members_ids).each do |work_id|
21
+ work = ::ActiveFedora::Base.find(work_id)
22
+ curation_concern.ordered_members << work
23
+ end
24
+ true
25
+ end
26
+
11
27
  def apply_order(new_order)
12
28
  return true unless new_order
13
29
  curation_concern.ordered_member_proxies.each_with_index do |proxy, index|
@@ -7,16 +7,12 @@ module CurationConcerns
7
7
  included do
8
8
  helper CurationConcerns::MainAppHelpers
9
9
 
10
- rescue_from ActiveFedora::ObjectNotFoundError do |_exception|
11
- respond_to do |wants|
12
- wants.json { render_json_response(response_type: :not_found) }
13
- # default to HTML response, even for other non-HTML formats we don't
14
- # neccesarily know about, seems to be consistent with what Rails4 does
15
- # by default with uncaught ActiveRecord::RecordNotFound in production
16
- wants.any do
17
- render_404
18
- end
19
- end
10
+ rescue_from ActiveFedora::ObjectNotFoundError do |exception|
11
+ not_found_response(exception)
12
+ end
13
+
14
+ rescue_from Blacklight::Exceptions::InvalidSolrID do |exception|
15
+ not_found_response(exception)
20
16
  end
21
17
  end
22
18
 
@@ -60,5 +56,19 @@ module CurationConcerns
60
56
  json_body = CurationConcerns::API.generate_response_body(response_type: response_type, message: message, options: options)
61
57
  render json: json_body, status: response_type
62
58
  end
59
+
60
+ private
61
+
62
+ def not_found_response(_exception)
63
+ respond_to do |wants|
64
+ wants.json { render_json_response(response_type: :not_found) }
65
+ # default to HTML response, even for other non-HTML formats we don't
66
+ # neccesarily know about, seems to be consistent with what Rails4 does
67
+ # by default with uncaught ActiveRecord::RecordNotFound in production
68
+ wants.any do
69
+ render_404
70
+ end
71
+ end
72
+ end
63
73
  end
64
74
  end
@@ -35,10 +35,11 @@ module CurationConcerns
35
35
  { type: mime_type_for(file), disposition: 'inline' }
36
36
  end
37
37
 
38
- # Customize the :download ability in your Ability class, or override this method
38
+ # Customize the :read ability in your Ability class, or override this method.
39
+ # Hydra::Ability#download_permissions can't be used in this case because it assumes
40
+ # that files are in a LDP basic container, and thus, included in the asset's uri.
39
41
  def authorize_download!
40
- # authorize! :download, file # can't use this because Hydra::Ability#download_permissions assumes that files are in Basic Container (and thus include the asset's uri)
41
- authorize! :read, asset
42
+ authorize! :read, params[asset_param_key]
42
43
  end
43
44
 
44
45
  # Overrides Hydra::Controller::DownloadBehavior#load_file, which is hard-coded to assume files are in BasicContainer.
@@ -51,7 +52,7 @@ module CurationConcerns
51
52
  file_reference = params[:file]
52
53
  return default_file unless file_reference
53
54
 
54
- file_path = CurationConcerns::DerivativePath.derivative_path_for_reference(asset, file_reference)
55
+ file_path = CurationConcerns::DerivativePath.derivative_path_for_reference(params[asset_param_key], file_reference)
55
56
  File.exist?(file_path) ? file_path : nil
56
57
  end
57
58
 
@@ -0,0 +1,11 @@
1
+ module CurationConcerns::BlacklightOverridesHelper
2
+ # Overrides Blacklight::BlacklightHelperBehavior
3
+ def presenter(document)
4
+ case action_name
5
+ when 'edit', 'update'
6
+ show_presenter(document)
7
+ else
8
+ super(document)
9
+ end
10
+ end
11
+ end
@@ -10,4 +10,5 @@ module CurationConcerns::MainAppHelpers
10
10
  include CurationConcerns::CollectionsHelper
11
11
  include CurationConcerns::PermissionsHelper
12
12
  include CurationConcerns::RightsHelper
13
+ include CurationConcerns::BlacklightOverridesHelper
13
14
  end
@@ -13,7 +13,7 @@ module CurationConcerns
13
13
  solr_doc[Solrizer.solr_name('file_format')] = file_format
14
14
  solr_doc[Solrizer.solr_name('file_format', :facetable)] = file_format
15
15
  solr_doc[Solrizer.solr_name(:file_size, STORED_INTEGER)] = object.file_size[0]
16
- solr_doc['all_text_timv'] = object.full_text.content
16
+ solr_doc['all_text_timv'] = object.extracted_text.content if object.extracted_text.present?
17
17
  solr_doc['height_is'] = Integer(object.height.first) if object.height.present?
18
18
  solr_doc['width_is'] = Integer(object.width.first) if object.width.present?
19
19
  solr_doc[Solrizer.solr_name('mime_type', :stored_sortable)] = object.mime_type
@@ -8,7 +8,9 @@ class CreateDerivativesJob < ActiveJob::Base
8
8
  filename = CurationConcerns::WorkingDirectory.find_or_retrieve(file_id, file_set.id)
9
9
 
10
10
  file_set.create_derivatives(filename)
11
- # The thumbnail is indexed in the solr document, so reindex
11
+
12
+ # Reload from Fedora and reindex for thumbnail and extracted text
13
+ file_set.reload
12
14
  file_set.update_index
13
15
  file_set.parent.update_index if parent_needs_reindex?(file_set)
14
16
  end
@@ -11,7 +11,6 @@ module CurationConcerns
11
11
  include CurationConcerns::Noid
12
12
  include CurationConcerns::FileSet::Derivatives
13
13
  include CurationConcerns::Permissions
14
- include CurationConcerns::FileSet::FullTextIndexing
15
14
  include CurationConcerns::FileSet::Indexing
16
15
  include CurationConcerns::FileSet::BelongsToWorks
17
16
  include CurationConcerns::FileSet::Querying
@@ -1,49 +1,67 @@
1
1
  module CurationConcerns
2
2
  class DerivativePath
3
+ attr_reader :id, :destination_name
4
+
3
5
  class << self
4
6
  # Path on file system where derivative file is stored
7
+ # @param [ActiveFedora::Base or String] object either the AF object or its id
8
+ # @param [String] destintation_name
5
9
  def derivative_path_for_reference(object, destination_name)
6
- destination_name = destination_name.gsub(/^original_file_/, '')
7
- derivative_path(object, extension_for(destination_name), destination_name)
10
+ new(object, destination_name).derivative_path
8
11
  end
9
12
 
13
+ # @param [ActiveFedora::Base or String] object either the AF object or its id
10
14
  # @return [Array<String>] Array of paths to derivatives for this object.
11
15
  def derivatives_for_reference(object)
12
- Dir.glob(root_path(object).join("*")).select do |path|
13
- path.start_with?(path_prefix(object).to_s)
14
- end
16
+ new(object).all_paths
15
17
  end
18
+ end
16
19
 
17
- private
20
+ # @param [ActiveFedora::Base, String] object either the AF object or its id
21
+ # @param [String] destination_name
22
+ def initialize(object, destination_name = nil)
23
+ @id = object.is_a?(String) ? object : object.id
24
+ @destination_name = destination_name.gsub(/^original_file_/, '') if destination_name
25
+ end
18
26
 
19
- # @param [#id] object Object whose ID is used to generate root path
20
- # @return [String] Returns the root path where derivatives will be generated into.
21
- def root_path(object)
22
- Pathname.new(derivative_path(object, "", "")).dirname
23
- end
27
+ def derivative_path
28
+ "#{path_prefix}-#{file_name}"
29
+ end
24
30
 
25
- # @return <Pathname> Full prefix of the path for object.
26
- def path_prefix(object)
27
- Pathname.new(CurationConcerns.config.derivatives_path).join(pair_path(object.id))
28
- end
31
+ def all_paths
32
+ Dir.glob(root_path.join("*")).select do |path|
33
+ path.start_with?(path_prefix.to_s)
34
+ end
35
+ end
29
36
 
30
- def derivative_path(object, extension, destination_name)
31
- file_name = destination_name + extension
32
- "#{path_prefix(object)}-#{file_name}"
33
- end
37
+ private
34
38
 
35
- def pair_path(id)
36
- id.split('').each_slice(2).map(&:join).join('/')
37
- end
39
+ # @return [String] Returns the root path where derivatives will be generated into.
40
+ def root_path
41
+ Pathname.new(derivative_path).dirname
42
+ end
43
+
44
+ # @return <Pathname> Full prefix of the path for object.
45
+ def path_prefix
46
+ Pathname.new(CurationConcerns.config.derivatives_path).join(pair_path)
47
+ end
48
+
49
+ def pair_path
50
+ id.split('').each_slice(2).map(&:join).join('/')
51
+ end
52
+
53
+ def file_name
54
+ return unless destination_name
55
+ destination_name + extension
56
+ end
38
57
 
39
- def extension_for(destination_name)
40
- case destination_name
41
- when 'thumbnail'
42
- ".#{MIME::Types.type_for('jpg').first.extensions.first}"
43
- else
44
- ".#{destination_name}"
45
- end
58
+ def extension
59
+ case destination_name
60
+ when 'thumbnail'
61
+ ".#{MIME::Types.type_for('jpg').first.extensions.first}"
62
+ else
63
+ ".#{destination_name}"
46
64
  end
47
- end
65
+ end
48
66
  end
49
67
  end
@@ -5,30 +5,18 @@
5
5
  <small>Who should be able to view your collection?</small>
6
6
  </legend>
7
7
 
8
- <section class="help-block">
9
- <p>
10
- <strong>Please note</strong>, making something visible to the world (i.e.
11
- marking this as <span class="label label-success">Open Access</span>) may be
12
- viewed as publishing which could impact your ability to:
13
- </p>
14
- <ul>
15
- <li>patent your work</li>
16
- <li>publish your work in a journal</li>
17
- </ul>
18
- </section>
19
-
20
8
  <div class="form-group">
21
9
  <label class="radio">
22
10
  <input type="radio" id="visibility_open" name="<%= f.object_name %>[visibility]" value="<%= Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC %>" <% if @collection.open_access? %> checked="true"<% end %>/>
23
- <span class="label label-success">Open Access</span> Visible to the world.
11
+ <%= t('curation_concerns.visibility.open.label_html', type: 'content') %>
24
12
  </label>
25
13
  <label class="radio">
26
14
  <input type="radio" id="visibility_registered" name="<%= f.object_name %>[visibility]" value="<%= Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED %>" <% if @collection.authenticated_only_access? %> checked="true"<% end %> />
27
- <span class="label label-info"><%=t('curation_concerns.institution_name') %></span> Visible to all <%=t('curation_concerns.institution_name') %> users.
15
+ <%= t('curation_concerns.visibility.authenticated.label_html', institution: t('curation_concerns.institution.name')) %>
28
16
  </label>
29
17
  <label class="radio">
30
18
  <input type="radio" id="visibility_restricted" name="<%= f.object_name %>[visibility]" value="<%= Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE%>" <% if @collection.private_access? %> checked="true"<% end %>/>
31
- <span class="label label-danger">Private</span> Only visible to you and your delegates.
19
+ <%= t('curation_concerns.visibility.private.label_html') %>
32
20
  </label>
33
21
  </div>
34
22
 
@@ -8,17 +8,12 @@
8
8
  <legend>
9
9
  Visibility
10
10
  <small>Who should be able to view or download this content?</small>
11
- <span id="visibility_tooltip" class="h5">
12
- <%= help_text 'visibility' %>
13
- </span>
14
11
  </legend>
15
12
 
16
- <%= render "form_permission_note" %>
17
-
18
13
  <div class="form-group">
19
14
  <label class="radio">
20
15
  <%= f.radio_button :visibility, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC %>
21
- <%= t('curation_concerns.visibility.open.label_html') %>
16
+ <%= t('curation_concerns.visibility.open.label_html', type: 'work') %>
22
17
  </label>
23
18
  <label class="radio">
24
19
  <%= f.radio_button :visibility, Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED %>
@@ -11,7 +11,6 @@
11
11
  <%= csrf_meta_tag %>
12
12
  <%= stylesheet_link_tag 'application' %>
13
13
  <%= javascript_include_tag 'application' %>
14
- <%= render partial: 'shared/ga', formats: [:html] %>
15
14
  </head>
16
15
  <body>
17
16
 
@@ -9,8 +9,6 @@
9
9
 
10
10
  <!-- application js -->
11
11
  <%= javascript_include_tag 'application' %>
12
-
13
- <%= render partial: 'shared/ga', formats: [:html] %>
14
12
  </head>
15
13
 
16
14
  <body>
@@ -10,7 +10,6 @@ en:
10
10
  name: "Your Division at Institution"
11
11
  homepage_url: "#"
12
12
  document_language: "en"
13
- google_analytics_id: ""
14
13
  institution:
15
14
  name: "Your Institution"
16
15
  homepage_url: "#"
@@ -95,11 +94,11 @@ en:
95
94
  open:
96
95
  text: "Open Access"
97
96
  class: "label-success"
98
- label_html: <span class="label label-success">Open Access</span> Visible to the world.
97
+ label_html: <span class="label label-success">Open Access</span> Everyone. Check out <a href="">SHERPA/RoMEO</a> for specific publishers' copyright policies if you plan to patent and/or publish your %{type} in a journal.
99
98
  authenticated:
100
99
  text: *INSTITUTION_NAME
101
100
  class: "label-info"
102
- label_html: "<span class=\"label label-info\">%{institution}</span> Visible to all %{institution} users."
101
+ label_html: "<span class=\"label label-info\">%{institution}</span> Only users who are logged in through %{institution}."
103
102
  embargo:
104
103
  text: "Embargo"
105
104
  class: "label-warning"
@@ -109,7 +108,7 @@ en:
109
108
  class: "label-warning"
110
109
  label_html: <span class="label label-warning">Lease</span>
111
110
  private:
112
- label_html: <span class="label label-danger">Private</span> Only visible to you and your delegates.
111
+ label_html: <span class="label label-danger">Private</span> Only users and/or groups that have been given specific access in the "Share With" section.
113
112
  restricted:
114
113
  text: "Private"
115
114
  class: "label-danger"
@@ -19,18 +19,18 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency 'hydra-head', '>= 10.0.0', '< 11'
22
- spec.add_dependency 'blacklight', '~> 6.1'
22
+ spec.add_dependency 'blacklight', '~> 6.3'
23
23
  spec.add_dependency "breadcrumbs_on_rails", "~> 2.3"
24
24
  spec.add_dependency "jquery-ui-rails"
25
25
  spec.add_dependency "simple_form", '~> 3.1'
26
- spec.add_dependency 'hydra-editor', '~> 2.0'
26
+ spec.add_dependency 'hydra-editor', '>= 2', '< 4'
27
27
  spec.add_dependency 'blacklight_advanced_search', '~> 6.0'
28
28
  spec.add_dependency 'rails_autolink'
29
29
  spec.add_dependency 'sprockets-es6'
30
30
  spec.add_dependency 'kaminari_route_prefix', '~> 0.0.1'
31
31
  spec.add_dependency 'active_attr'
32
32
  spec.add_dependency 'hydra-works', '>= 0.12.0'
33
- spec.add_dependency 'active_fedora-noid', '~> 1.0'
33
+ spec.add_dependency 'active_fedora-noid', '~> 2.0.0.beta1'
34
34
  spec.add_dependency 'qa', '~> 0.5'
35
35
  spec.add_dependency 'redlock', '~> 0.1.2'
36
36
  spec.add_dependency 'solrizer', '~> 3.4'
@@ -40,12 +40,12 @@ Gem::Specification.new do |spec|
40
40
  spec.add_dependency 'awesome_nested_set', '~> 3.0'
41
41
  spec.add_dependency 'browse-everything', '~> 0.10'
42
42
 
43
- spec.add_development_dependency 'solr_wrapper', '~> 0.4'
43
+ spec.add_development_dependency 'solr_wrapper', '~> 0.13', '>= 0.13.1'
44
44
  spec.add_development_dependency 'fcrepo_wrapper', '~> 0.1'
45
45
  spec.add_development_dependency "devise", "~> 3.0"
46
46
  spec.add_development_dependency "bundler", "~> 1.6"
47
47
  spec.add_development_dependency "rake"
48
- spec.add_development_dependency "engine_cart", "~> 0.8"
48
+ spec.add_development_dependency "engine_cart", "~> 0.9"
49
49
  spec.add_development_dependency "sqlite3"
50
50
  spec.add_development_dependency "rspec-its"
51
51
  spec.add_development_dependency "rspec-rails"
@@ -1,3 +1,3 @@
1
1
  module CurationConcerns
2
- VERSION = "1.0.0".freeze
2
+ VERSION = "1.1.0".freeze
3
3
  end
@@ -14,9 +14,6 @@ CurationConcerns.configure do |config|
14
14
  # Requires a Google Analytics id and OAuth2 keyfile. See README for more info
15
15
  # config.analytics = false
16
16
 
17
- # Specify a Google Analytics tracking ID to gather usage statistics
18
- # config.google_analytics_id = 'UA-99999999-1'
19
-
20
17
  # Specify a date you wish to start collecting Google Analytic statistics for.
21
18
  # config.analytic_start_date = DateTime.new(2014,9,10)
22
19
 
@@ -0,0 +1,60 @@
1
+ require 'spec_helper'
2
+
3
+ describe CurationConcerns::Actors::ApplyOrderActor do
4
+ describe '#update' do
5
+ let(:curation_concern) { create(:work_with_two_children, user: user) }
6
+
7
+ let(:user) { create(:admin) }
8
+
9
+ subject do
10
+ CurationConcerns::Actors::ActorStack.new(curation_concern,
11
+ user,
12
+ [described_class,
13
+ CurationConcerns::Actors::GenericWorkActor])
14
+ end
15
+
16
+ context 'with ordered_member_ids that are already associated with the parent' do
17
+ let(:attributes) { { ordered_member_ids: ["Blah"] } }
18
+ let(:root_actor) { double }
19
+ before do
20
+ allow(CurationConcerns::Actors::RootActor).to receive(:new).and_return(root_actor)
21
+ allow(root_actor).to receive(:update).with({}).and_return(true)
22
+ curation_concern.apply_depositor_metadata(user.user_key)
23
+ curation_concern.save!
24
+ end
25
+ it "attaches the parent" do
26
+ expect(subject.update(attributes)).to be true
27
+ end
28
+ end
29
+ end
30
+
31
+ describe '#update' do
32
+ let(:user) { create(:admin) }
33
+ let(:curation_concern) { create(:work_with_one_child, user: user) }
34
+ let(:child) { GenericWork.new("Blah3") }
35
+
36
+ subject do
37
+ CurationConcerns::Actors::ActorStack.new(curation_concern,
38
+ user,
39
+ [described_class,
40
+ CurationConcerns::Actors::GenericWorkActor])
41
+ end
42
+
43
+ context 'with ordered_members_ids that arent associated with the curation concern yet.' do
44
+ let(:attributes) { { ordered_member_ids: ["Blah3"] } }
45
+ let(:root_actor) { double }
46
+ before do
47
+ allow(CurationConcerns::Actors::RootActor).to receive(:new).and_return(root_actor)
48
+ allow(root_actor).to receive(:update).with({}).and_return(true)
49
+ child.title = ["Generic Title"]
50
+ child.apply_depositor_metadata(user.user_key)
51
+ child.save!
52
+ curation_concern.apply_depositor_metadata(user.user_key)
53
+ curation_concern.save!
54
+ end
55
+ it "attaches the parent" do
56
+ expect(subject.update(attributes)).to be true
57
+ end
58
+ end
59
+ end
60
+ end
@@ -29,6 +29,11 @@ describe DownloadsController do
29
29
  expect(response).to redirect_to new_user_session_path
30
30
  expect(flash['alert']).to eq 'You are not authorized to access this page.'
31
31
  end
32
+
33
+ it 'authorizes the resource using only the id' do
34
+ expect(controller).to receive(:authorize!).with(:read, file_set.id)
35
+ get :show, id: file_set.to_param
36
+ end
32
37
  end
33
38
 
34
39
  context "when the user has access" do
@@ -57,6 +62,11 @@ describe DownloadsController do
57
62
  expect(response.headers['Content-Length']).to eq "4218"
58
63
  expect(response.headers['Accept-Ranges']).to eq "bytes"
59
64
  end
65
+
66
+ it 'retrieves the thumbnail without contacting Fedora' do
67
+ expect(ActiveFedora::Base).not_to receive(:find).with(file_set.id)
68
+ get :show, id: file_set, file: 'thumbnail'
69
+ end
60
70
  end
61
71
 
62
72
  context "that isn't persisted" do
@@ -23,6 +23,19 @@ FactoryGirl.define do
23
23
  end
24
24
  end
25
25
 
26
+ factory :work_with_one_child do
27
+ before(:create) do |work, evaluator|
28
+ work.ordered_members << FactoryGirl.create(:generic_work, user: evaluator.user, title: ['A Contained Work'])
29
+ end
30
+ end
31
+
32
+ factory :work_with_two_children do
33
+ before(:create) do |work, evaluator|
34
+ work.ordered_members << FactoryGirl.create(:generic_work, user: evaluator.user, title: ['A Contained Work'], id: "Blah")
35
+ work.ordered_members << FactoryGirl.create(:generic_work, user: evaluator.user, title: ['Another Contained Work'], id: "Blah2")
36
+ end
37
+ end
38
+
26
39
  factory :work_with_representative_file do
27
40
  before(:create) do |work, evaluator|
28
41
  work.ordered_members << FactoryGirl.create(:file_set, user: evaluator.user, title: ['A Contained FileSet'])
@@ -21,9 +21,7 @@ describe CurationConcerns::FileSetIndexer do
21
21
  resource_type: ['Book'],
22
22
  identifier: ['urn:isbn:1234567890'],
23
23
  based_near: ['Medina, Saudi Arabia'],
24
- related_url: ['http://example.org/TheWork/']) do |gf|
25
- gf.full_text.content = 'abcxyz'
26
- end
24
+ related_url: ['http://example.org/TheWork/'])
27
25
  end
28
26
 
29
27
  let(:mock_file) do
@@ -37,6 +35,11 @@ describe CurationConcerns::FileSetIndexer do
37
35
  file_size: ['12']
38
36
  )
39
37
  end
38
+
39
+ let(:mock_text) do
40
+ mock_file_factory(content: "abcxyz")
41
+ end
42
+
40
43
  let(:indexer) { described_class.new(file_set) }
41
44
 
42
45
  describe '#generate_solr_document' do
@@ -44,6 +47,7 @@ describe CurationConcerns::FileSetIndexer do
44
47
  allow(file_set).to receive(:label).and_return('CastoriaAd.tiff')
45
48
  allow(CurationConcerns::ThumbnailPathService).to receive(:call).and_return('/downloads/foo123?file=thumbnail')
46
49
  allow(file_set).to receive(:original_file).and_return(mock_file)
50
+ allow(file_set).to receive(:extracted_text).and_return(mock_text)
47
51
  end
48
52
  subject { indexer.generate_solr_document }
49
53
 
@@ -1,61 +1,95 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe CreateDerivativesJob do
4
- let(:id) { '123' }
5
-
6
4
  before do
7
5
  @ffmpeg_enabled = CurationConcerns.config.enable_ffmpeg
8
6
  CurationConcerns.config.enable_ffmpeg = true
9
- allow(FileSet).to receive(:find).with(id).and_return(file_set)
10
- allow(file_set).to receive(:mime_type).and_return('audio/x-wav')
11
- allow(file_set).to receive(:id).and_return(id)
12
7
  end
13
8
 
14
- let(:file) do
15
- Hydra::PCDM::File.new.tap do |f|
16
- f.content = 'foo'
17
- f.original_name = 'picture.png'
18
- f.save!
19
- end
20
- end
9
+ after { CurationConcerns.config.enable_ffmpeg = @ffmpeg_enabled }
21
10
 
22
- let(:file_set) { FileSet.new }
11
+ context "with an audio file" do
12
+ let(:id) { '123' }
13
+ let(:file_set) { FileSet.new }
23
14
 
24
- after do
25
- CurationConcerns.config.enable_ffmpeg = @ffmpeg_enabled
26
- end
27
-
28
- context "with a file name" do
29
- it 'calls create_derivatives and save on a file set' do
30
- expect(Hydra::Derivatives::AudioDerivatives).to receive(:create)
31
- expect(file_set).to receive(:update_index)
32
- described_class.perform_now(file_set, file.id)
15
+ let(:file) do
16
+ Hydra::PCDM::File.new.tap do |f|
17
+ f.content = 'foo'
18
+ f.original_name = 'picture.png'
19
+ f.save!
20
+ end
33
21
  end
34
- end
35
22
 
36
- context 'with a parent object' do
37
23
  before do
38
- allow(file_set).to receive(:parent).and_return(parent)
39
- # Stub out the actual derivative creation
40
- expect(file_set).to receive(:create_derivatives)
24
+ allow(FileSet).to receive(:find).with(id).and_return(file_set)
25
+ allow(file_set).to receive(:id).and_return(id)
26
+ allow(file_set).to receive(:mime_type).and_return('audio/x-wav')
41
27
  end
42
28
 
43
- context 'when the file_set is the thumbnail of the parent' do
44
- let(:parent) { GenericWork.new(thumbnail_id: id) }
45
-
46
- it 'updates the index of the parent object' do
47
- expect(parent).to receive(:update_index)
29
+ context "with a file name" do
30
+ it 'calls create_derivatives and save on a file set' do
31
+ expect(Hydra::Derivatives::AudioDerivatives).to receive(:create)
32
+ expect(file_set).to receive(:reload)
33
+ expect(file_set).to receive(:update_index)
48
34
  described_class.perform_now(file_set, file.id)
49
35
  end
50
36
  end
51
37
 
52
- context "when the file_set isn't the parent's thumbnail" do
53
- let(:parent) { GenericWork.new }
38
+ context 'with a parent object' do
39
+ before do
40
+ allow(file_set).to receive(:parent).and_return(parent)
41
+ # Stub out the actual derivative creation
42
+ allow(file_set).to receive(:create_derivatives)
43
+ end
54
44
 
55
- it "doesn't update the parent's index" do
56
- expect(parent).to_not receive(:update_index)
57
- described_class.perform_now(file_set, file.id)
45
+ context 'when the file_set is the thumbnail of the parent' do
46
+ let(:parent) { GenericWork.new(thumbnail_id: id) }
47
+
48
+ it 'updates the index of the parent object' do
49
+ expect(file_set).to receive(:reload)
50
+ expect(parent).to receive(:update_index)
51
+ described_class.perform_now(file_set, file.id)
52
+ end
53
+ end
54
+
55
+ context "when the file_set isn't the parent's thumbnail" do
56
+ let(:parent) { GenericWork.new }
57
+
58
+ it "doesn't update the parent's index" do
59
+ expect(file_set).to receive(:reload)
60
+ expect(parent).to_not receive(:update_index)
61
+ described_class.perform_now(file_set, file.id)
62
+ end
58
63
  end
59
64
  end
60
65
  end
66
+
67
+ context "with a pdf file" do
68
+ let(:file_set) { create(:file_set) }
69
+ let(:params) { { qt: "search", q: "CutePDF", qf: "all_text_timv" } }
70
+
71
+ let(:file) do
72
+ Hydra::PCDM::File.new.tap do |f|
73
+ f.content = File.open(File.join(fixture_path, "test.pdf")).read
74
+ f.original_name = 'test.pdf'
75
+ f.save!
76
+ end
77
+ end
78
+
79
+ let(:search_response) do
80
+ Blacklight::Solr::Response.new(
81
+ Blacklight.default_index.connection.get("select", params: params),
82
+ params
83
+ )
84
+ end
85
+
86
+ before do
87
+ allow(file_set).to receive(:mime_type).and_return('application/pdf')
88
+ described_class.perform_now(file_set, file.id)
89
+ end
90
+
91
+ it "searches the extracted content" do
92
+ expect(search_response.documents.count).to eq(1)
93
+ end
94
+ end
61
95
  end
@@ -1,21 +1,33 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe CurationConcerns::DerivativePath do
4
- before do
5
- allow(CurationConcerns.config).to receive(:derivatives_path).and_return('tmp')
6
- end
4
+ let(:id) { '123' }
5
+ let(:object) { double(id: id) }
7
6
 
8
- describe '.derivative_path_for_reference' do
9
- subject { described_class.derivative_path_for_reference(object, destination_name) }
7
+ before { allow(CurationConcerns.config).to receive(:derivatives_path).and_return('tmp') }
10
8
 
11
- let(:object) { double(id: '123') }
9
+ context "for a single path" do
12
10
  let(:destination_name) { 'thumbnail' }
13
11
 
14
- it { is_expected.to eq 'tmp/12/3-thumbnail.jpeg' }
12
+ describe '.derivative_path_for_reference' do
13
+ subject { described_class.derivative_path_for_reference(object, destination_name) }
14
+ it { is_expected.to eq('tmp/12/3-thumbnail.jpeg') }
15
+ end
16
+
17
+ describe '#derivative_path' do
18
+ context "with an object" do
19
+ subject { described_class.new(object, destination_name).derivative_path }
20
+ it { is_expected.to eq('tmp/12/3-thumbnail.jpeg') }
21
+ end
22
+
23
+ context "with an id" do
24
+ subject { described_class.new(id, destination_name).derivative_path }
25
+ it { is_expected.to eq('tmp/12/3-thumbnail.jpeg') }
26
+ end
27
+ end
15
28
  end
16
29
 
17
- describe "#derivatives_for_reference" do
18
- subject { described_class.derivatives_for_reference(object) }
30
+ context "for multiple paths" do
19
31
  before do
20
32
  FileUtils.mkdir_p("tmp/12")
21
33
  File.open("tmp/12/3-thumbnail.jpeg", 'w') do |f|
@@ -29,12 +41,21 @@ describe CurationConcerns::DerivativePath do
29
41
  FileUtils.rm_rf("tmp/12")
30
42
  end
31
43
 
32
- let(:object) { double(id: '123') }
44
+ describe ".derivatives_for_reference" do
45
+ subject { described_class.derivatives_for_reference(object) }
46
+ it { is_expected.to eq(["tmp/12/3-thumbnail.jpeg"]) }
47
+ end
33
48
 
34
- it "lists all the paths to derivatives" do
35
- expect(subject).to eq [
36
- "tmp/12/3-thumbnail.jpeg"
37
- ]
49
+ describe "#all_paths" do
50
+ context "with an object" do
51
+ subject { described_class.new(object, nil).all_paths }
52
+ it { is_expected.to eq(["tmp/12/3-thumbnail.jpeg"]) }
53
+ end
54
+
55
+ context "with an id" do
56
+ subject { described_class.new(id, nil).all_paths }
57
+ it { is_expected.to eq(["tmp/12/3-thumbnail.jpeg"]) }
58
+ end
38
59
  end
39
60
  end
40
61
  end
@@ -12,6 +12,7 @@ describe 'catalog/index.html.erb' do
12
12
  view.extend CurationConcerns::CollectionsHelper
13
13
  view.extend CurationConcerns::CatalogHelper
14
14
 
15
+ allow(controller).to receive(:action_name).and_return('index')
15
16
  allow(view).to receive(:blacklight_config).and_return(CatalogController.blacklight_config)
16
17
  allow(view).to receive(:blacklight_configuration_context).and_return(blacklight_configuration_context)
17
18
  stub_template 'catalog/_search_sidebar.html.erb' => ''
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: curation_concerns
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Zumwalt
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-06-22 00:00:00.000000000 Z
13
+ date: 2016-07-05 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: hydra-head
@@ -38,14 +38,14 @@ dependencies:
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '6.1'
41
+ version: '6.3'
42
42
  type: :runtime
43
43
  prerelease: false
44
44
  version_requirements: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '6.1'
48
+ version: '6.3'
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: breadcrumbs_on_rails
51
51
  requirement: !ruby/object:Gem::Requirement
@@ -92,16 +92,22 @@ dependencies:
92
92
  name: hydra-editor
93
93
  requirement: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - "~>"
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: '2'
98
+ - - "<"
96
99
  - !ruby/object:Gem::Version
97
- version: '2.0'
100
+ version: '4'
98
101
  type: :runtime
99
102
  prerelease: false
100
103
  version_requirements: !ruby/object:Gem::Requirement
101
104
  requirements:
102
- - - "~>"
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '2'
108
+ - - "<"
103
109
  - !ruby/object:Gem::Version
104
- version: '2.0'
110
+ version: '4'
105
111
  - !ruby/object:Gem::Dependency
106
112
  name: blacklight_advanced_search
107
113
  requirement: !ruby/object:Gem::Requirement
@@ -192,14 +198,14 @@ dependencies:
192
198
  requirements:
193
199
  - - "~>"
194
200
  - !ruby/object:Gem::Version
195
- version: '1.0'
201
+ version: 2.0.0.beta1
196
202
  type: :runtime
197
203
  prerelease: false
198
204
  version_requirements: !ruby/object:Gem::Requirement
199
205
  requirements:
200
206
  - - "~>"
201
207
  - !ruby/object:Gem::Version
202
- version: '1.0'
208
+ version: 2.0.0.beta1
203
209
  - !ruby/object:Gem::Dependency
204
210
  name: qa
205
211
  requirement: !ruby/object:Gem::Requirement
@@ -318,14 +324,20 @@ dependencies:
318
324
  requirements:
319
325
  - - "~>"
320
326
  - !ruby/object:Gem::Version
321
- version: '0.4'
327
+ version: '0.13'
328
+ - - ">="
329
+ - !ruby/object:Gem::Version
330
+ version: 0.13.1
322
331
  type: :development
323
332
  prerelease: false
324
333
  version_requirements: !ruby/object:Gem::Requirement
325
334
  requirements:
326
335
  - - "~>"
327
336
  - !ruby/object:Gem::Version
328
- version: '0.4'
337
+ version: '0.13'
338
+ - - ">="
339
+ - !ruby/object:Gem::Version
340
+ version: 0.13.1
329
341
  - !ruby/object:Gem::Dependency
330
342
  name: fcrepo_wrapper
331
343
  requirement: !ruby/object:Gem::Requirement
@@ -388,14 +400,14 @@ dependencies:
388
400
  requirements:
389
401
  - - "~>"
390
402
  - !ruby/object:Gem::Version
391
- version: '0.8'
403
+ version: '0.9'
392
404
  type: :development
393
405
  prerelease: false
394
406
  version_requirements: !ruby/object:Gem::Requirement
395
407
  requirements:
396
408
  - - "~>"
397
409
  - !ruby/object:Gem::Version
398
- version: '0.8'
410
+ version: '0.9'
399
411
  - !ruby/object:Gem::Dependency
400
412
  name: sqlite3
401
413
  requirement: !ruby/object:Gem::Requirement
@@ -705,6 +717,7 @@ files:
705
717
  - app/helpers/batch_select_helper.rb
706
718
  - app/helpers/collections_helper.rb
707
719
  - app/helpers/curation_concerns/ability_helper.rb
720
+ - app/helpers/curation_concerns/blacklight_overrides_helper.rb
708
721
  - app/helpers/curation_concerns/catalog_helper.rb
709
722
  - app/helpers/curation_concerns/collections_helper.rb
710
723
  - app/helpers/curation_concerns/collections_helper_behavior.rb
@@ -740,7 +753,6 @@ files:
740
753
  - app/models/concerns/curation_concerns/file_set/belongs_to_works.rb
741
754
  - app/models/concerns/curation_concerns/file_set/characterization.rb
742
755
  - app/models/concerns/curation_concerns/file_set/derivatives.rb
743
- - app/models/concerns/curation_concerns/file_set/full_text_indexing.rb
744
756
  - app/models/concerns/curation_concerns/file_set/indexing.rb
745
757
  - app/models/concerns/curation_concerns/file_set/querying.rb
746
758
  - app/models/concerns/curation_concerns/file_set_behavior.rb
@@ -894,7 +906,6 @@ files:
894
906
  - app/views/curation_concerns/base/_form_permission.html.erb
895
907
  - app/views/curation_concerns/base/_form_permission_embargo.html.erb
896
908
  - app/views/curation_concerns/base/_form_permission_lease.html.erb
897
- - app/views/curation_concerns/base/_form_permission_note.html.erb
898
909
  - app/views/curation_concerns/base/_form_permission_under_embargo.html.erb
899
910
  - app/views/curation_concerns/base/_form_permission_under_lease.html.erb
900
911
  - app/views/curation_concerns/base/_form_representative.html.erb
@@ -909,7 +920,6 @@ files:
909
920
  - app/views/curation_concerns/base/_representative_media.html.erb
910
921
  - app/views/curation_concerns/base/_show_actions.html.erb
911
922
  - app/views/curation_concerns/base/_versioning.html.erb
912
- - app/views/curation_concerns/base/_visibility.html.erb
913
923
  - app/views/curation_concerns/base/edit.html.erb
914
924
  - app/views/curation_concerns/base/file_manager.html.erb
915
925
  - app/views/curation_concerns/base/new.html.erb
@@ -967,7 +977,6 @@ files:
967
977
  - app/views/shared/_brand_bar.html.erb
968
978
  - app/views/shared/_flash_message.html.erb
969
979
  - app/views/shared/_footer.html.erb
970
- - app/views/shared/_ga.html.erb
971
980
  - app/views/shared/_header.html.erb
972
981
  - app/views/shared/_my_actions.html.erb
973
982
  - app/views/shared/_site_actions.html.erb
@@ -1053,6 +1062,7 @@ files:
1053
1062
  - spec/abilities/generic_work_abilities_spec.rb
1054
1063
  - spec/abilities/operation_ability_spec.rb
1055
1064
  - spec/actors/curation_concerns/add_to_collections_actor_spec.rb
1065
+ - spec/actors/curation_concerns/apply_order_actor_spec.rb
1056
1066
  - spec/actors/curation_concerns/embargo_actor_spec.rb
1057
1067
  - spec/actors/curation_concerns/file_actor_spec.rb
1058
1068
  - spec/actors/curation_concerns/file_set_actor_spec.rb
@@ -1200,7 +1210,6 @@ files:
1200
1210
  - spec/views/catalog/index.html.erb_spec.rb
1201
1211
  - spec/views/collections/_sort_and_per_page.html.erb_spec.rb
1202
1212
  - spec/views/curation_concerns/base/_attributes.html.erb_spec.rb
1203
- - spec/views/curation_concerns/base/_form_permission.html.erb_spec.rb
1204
1213
  - spec/views/curation_concerns/base/_form_rights_spec.rb
1205
1214
  - spec/views/curation_concerns/base/_member.html.erb_spec.rb
1206
1215
  - spec/views/curation_concerns/base/_show_actions.html.erb_spec.rb
@@ -1246,7 +1255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1246
1255
  version: '0'
1247
1256
  requirements: []
1248
1257
  rubyforge_project:
1249
- rubygems_version: 2.5.1
1258
+ rubygems_version: 2.6.4
1250
1259
  signing_key:
1251
1260
  specification_version: 4
1252
1261
  summary: A Rails Engine that allows an application to CRUD CurationConcern objects
@@ -1258,6 +1267,7 @@ test_files:
1258
1267
  - spec/abilities/generic_work_abilities_spec.rb
1259
1268
  - spec/abilities/operation_ability_spec.rb
1260
1269
  - spec/actors/curation_concerns/add_to_collections_actor_spec.rb
1270
+ - spec/actors/curation_concerns/apply_order_actor_spec.rb
1261
1271
  - spec/actors/curation_concerns/embargo_actor_spec.rb
1262
1272
  - spec/actors/curation_concerns/file_actor_spec.rb
1263
1273
  - spec/actors/curation_concerns/file_set_actor_spec.rb
@@ -1405,7 +1415,6 @@ test_files:
1405
1415
  - spec/views/catalog/index.html.erb_spec.rb
1406
1416
  - spec/views/collections/_sort_and_per_page.html.erb_spec.rb
1407
1417
  - spec/views/curation_concerns/base/_attributes.html.erb_spec.rb
1408
- - spec/views/curation_concerns/base/_form_permission.html.erb_spec.rb
1409
1418
  - spec/views/curation_concerns/base/_form_rights_spec.rb
1410
1419
  - spec/views/curation_concerns/base/_member.html.erb_spec.rb
1411
1420
  - spec/views/curation_concerns/base/_show_actions.html.erb_spec.rb
@@ -1,11 +0,0 @@
1
- module CurationConcerns
2
- module FileSet
3
- module FullTextIndexing
4
- extend ActiveSupport::Concern
5
-
6
- included do
7
- has_subresource 'full_text'
8
- end
9
- end
10
- end
11
- end
@@ -1,15 +0,0 @@
1
- <section class="help-block">
2
- <p>
3
- <strong>Please note</strong>, making something visible to the world (i.e.
4
- marking this as <span class="label label-success">Open Access</span>) may be
5
- viewed as publishing which could impact your ability to:
6
- </p>
7
- <ul>
8
- <li>Patent your work</li>
9
- <li>Publish your work in a journal</li>
10
- </ul>
11
- <p>
12
- Check out <a href="http://www.sherpa.ac.uk/romeo/">SHERPA/RoMEO</a> for more
13
- information about publisher copyright policies.
14
- </p>
15
- </section>
@@ -1,17 +0,0 @@
1
- <p>This setting will determine who can view your file, and the associated metadata. Setting
2
- the visibility to <span class='label label-success'>Open Access</span> will allow your
3
- content to be discovered in Google and viewed by anyone. The visibility setting
4
- <span class='label label-info'><%=t('curation_concerns.institution_name') %></span> will only allow
5
- users who are logged into <%=application_name %> (via WebAccess) to view the content.
6
- Files that are marked <span class='label label-danger'>Private</span> are only able to be viewed
7
- by users and/or groups that have been given specific access in the &quot;Share With&quot; section.
8
- </p>
9
-
10
- <p>
11
- Permissions in <%=application_name %> are hierarchical. This means that you cannot set
12
- the visibility of a file to <span class='label label-success'>Open Access</span> or
13
- <span class='label label-info'><%=t('curation_concerns.institution_name') %></span> and simultaneously
14
- try to restrict the access of a single user. However, you may mark the visibility of
15
- a file as <span class='label label-danger'>Private</span> and then grant access to
16
- particular users and/or groups for that file in the &quot;Share With&quot; section.
17
- </p>
@@ -1,6 +0,0 @@
1
- <script>
2
- var _gaq=[['_setAccount','<%= t('curation_concerns.google_analytics_id', default: 'TRACKME') %>'],['_trackPageview']];
3
- (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
4
- g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
5
- s.parentNode.insertBefore(g,s)}(document,'script'));
6
- </script>
@@ -1,16 +0,0 @@
1
- require 'spec_helper'
2
-
3
- describe 'curation_concerns/base/_form_permission.html.erb' do
4
- let(:curation_concern) { GenericWork.new }
5
- before do
6
- f = double('form', object: curation_concern,
7
- object_name: nil,
8
- input: nil,
9
- radio_button: nil)
10
- render partial: "curation_concerns/base/form_permission", locals: { f: f }
11
- end
12
-
13
- it 'has a permissions note' do
14
- expect(rendered).to have_content('Please note, making something visible to the world')
15
- end
16
- end