sufia 7.0.0.rc1 → 7.0.0.rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/app/actors/sufia/create_with_remote_files_actor.rb +1 -4
- data/app/assets/javascripts/sufia.js +1 -1
- data/app/assets/javascripts/sufia/browse_everything.js +11 -0
- data/app/assets/javascripts/sufia/flot_stats.js +4 -4
- data/app/assets/stylesheets/sufia/_dashboard.scss +2 -3
- data/app/assets/stylesheets/sufia/_header.scss +5 -2
- data/app/assets/stylesheets/sufia/_settings.scss +0 -1
- data/app/models/batch_upload_item.rb +3 -1
- data/app/views/_controls.html.erb +1 -1
- data/app/views/collections/_sort_and_per_page.html.erb +16 -14
- data/app/views/collections/show.html.erb +6 -8
- data/app/views/curation_concerns/base/_browse_everything.html.erb +0 -15
- data/app/views/dashboard/_index_partials/_heading_actions.html.erb +29 -27
- data/app/views/dashboard/_index_partials/_proxy_rights.html.erb +7 -7
- data/app/views/layouts/sufia-dashboard.html.erb +3 -1
- data/app/views/my/_facets.html.erb +1 -1
- data/app/views/my/_sort_and_per_page.html.erb +17 -14
- data/app/views/stats/file.html.erb +1 -1
- data/app/views/stats/work.html.erb +1 -1
- data/lib/sufia/version.rb +1 -1
- data/spec/actors/sufia/create_with_remote_files_actor_spec.rb +24 -3
- data/spec/features/batch_create_spec.rb +17 -0
- data/sufia.gemspec +1 -1
- metadata +10 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1654dd7eac815f40dd134668a72b7dc051dc62b3
|
|
4
|
+
data.tar.gz: 1e1dd5204d18cfdc1e1f3c9a345539f5a0ce58b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0436acdd93ddf3749c6bff8d08088cefcab1a7714c0882484bed9364d8c65c41f4925258e7a38b6548910eeb41658f40a8fcd4a0a108c29433ab28a8bca644e
|
|
7
|
+
data.tar.gz: fc3f693637e73c144fe388be094c1599a8eae0903dc1a2c08e0a7025632f431b2168df64bac16266159092e1cfbe15c5802bd9a561aec240bb80d84f289e5611
|
data/README.md
CHANGED
|
@@ -100,10 +100,10 @@ After installing the Prerequisites:
|
|
|
100
100
|
|
|
101
101
|
## Prerequisites
|
|
102
102
|
|
|
103
|
-
Sufia requires the following software to work:
|
|
103
|
+
Sufia 7.x requires the following software to work:
|
|
104
104
|
|
|
105
|
-
1. Solr
|
|
106
|
-
1. [Fedora Commons](http://www.fedora-commons.org/) digital repository
|
|
105
|
+
1. Solr version >= 5.x
|
|
106
|
+
1. [Fedora Commons](http://www.fedora-commons.org/) digital repository version >= 4.5.1
|
|
107
107
|
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
|
|
108
108
|
1. [Redis](http://redis.io/), a key-value store
|
|
109
109
|
1. [ImageMagick](http://www.imagemagick.org/) with JPEG-2000 support
|
|
@@ -33,10 +33,7 @@ module Sufia
|
|
|
33
33
|
fs.save!
|
|
34
34
|
uri = URI.parse(url)
|
|
35
35
|
if uri.scheme == 'file'
|
|
36
|
-
IngestLocalFileJob.perform_later(fs.
|
|
37
|
-
File.dirname(uri.path),
|
|
38
|
-
File.basename(uri.path),
|
|
39
|
-
user.user_key)
|
|
36
|
+
IngestLocalFileJob.perform_later(fs, uri.path, user)
|
|
40
37
|
else
|
|
41
38
|
ImportUrlJob.perform_later(fs, log(actor.user))
|
|
42
39
|
end
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
//= require sufia/featured_works
|
|
35
35
|
//= require sufia/featured_researcher
|
|
36
36
|
//= require sufia/batch_select_all
|
|
37
|
+
//= require sufia/browse_everything
|
|
37
38
|
//= require sufia/single_use_link
|
|
38
39
|
//= require sufia/search
|
|
39
40
|
//= require sufia/editor
|
|
@@ -59,7 +60,6 @@
|
|
|
59
60
|
|
|
60
61
|
//= require curation_concerns/collections
|
|
61
62
|
//= require hydra-editor/hydra-editor
|
|
62
|
-
//= require browse_everything
|
|
63
63
|
//= require nestable
|
|
64
64
|
|
|
65
65
|
// this needs to be after batch_select so that the form ids get setup correctly
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//= require browse_everything
|
|
2
|
+
|
|
3
|
+
// Show the files in the queue
|
|
4
|
+
$(document).on('turbolinks:load', function() {
|
|
5
|
+
$('#browse-btn').browseEverything()
|
|
6
|
+
.done(function(data) {
|
|
7
|
+
var evt = { isDefaultPrevented: function() { return false; } };
|
|
8
|
+
var files = $.map(data, function(d) { return { name: d.file_name, size: d.file_size, id: d.url } });
|
|
9
|
+
$.blueimp.fileupload.prototype.options.done.call($('#fileupload').fileupload(), evt, { result: { files: files }});
|
|
10
|
+
})
|
|
11
|
+
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
$(function() {
|
|
2
|
-
if (typeof
|
|
2
|
+
if (typeof sufia_item_stats === "undefined") {
|
|
3
3
|
return;
|
|
4
4
|
}
|
|
5
5
|
|
|
@@ -55,7 +55,7 @@ $(function() {
|
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
58
|
-
var plot = $.plot("#usage-stats",
|
|
58
|
+
var plot = $.plot("#usage-stats", sufia_item_stats, options);
|
|
59
59
|
|
|
60
60
|
$("<div id='tooltip'></div>").css({
|
|
61
61
|
position: "absolute",
|
|
@@ -79,7 +79,7 @@ $(function() {
|
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
var overview = $.plot("#overview",
|
|
82
|
+
var overview = $.plot("#overview", sufia_item_stats, {
|
|
83
83
|
series: {
|
|
84
84
|
lines: {
|
|
85
85
|
show: true,
|
|
@@ -106,7 +106,7 @@ $(function() {
|
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
$("#usage-stats").bind("plotselected", function(event, ranges) {
|
|
109
|
-
plot = $.plot("#usage-stats",
|
|
109
|
+
plot = $.plot("#usage-stats", sufia_item_stats, $.extend(true, {}, options, {
|
|
110
110
|
xaxis: {
|
|
111
111
|
min: ranges.xaxis.from,
|
|
112
112
|
max: ranges.xaxis.to
|
|
@@ -57,8 +57,8 @@ div.heading-tile:hover .glyphicon {
|
|
|
57
57
|
transition-timing-function: ease-out;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.
|
|
61
|
-
|
|
60
|
+
.panel-body h4 {
|
|
61
|
+
font-size: $font-size-base;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
#my_nav {
|
|
@@ -71,7 +71,6 @@ div.heading-tile:hover .glyphicon {
|
|
|
71
71
|
|
|
72
72
|
.sort-toggle {
|
|
73
73
|
padding: 1.5em 0 0 1em;
|
|
74
|
-
overflow: auto;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
.transfer_link {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
# It should never actually be persisted in the repository.
|
|
3
3
|
# The properties on this form should be copied to a real work type.
|
|
4
4
|
class BatchUploadItem < ActiveFedora::Base
|
|
5
|
-
include CurationConcerns::
|
|
5
|
+
include ::CurationConcerns::WorkBehavior
|
|
6
|
+
include ::CurationConcerns::BasicMetadata
|
|
7
|
+
include Sufia::WorkBehavior
|
|
6
8
|
|
|
7
9
|
# This mocks out the behavior of Hydra::PCDM::PcdmBehavior
|
|
8
10
|
def in_collection_ids
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<li <%= 'class=active' if action_name == "help" %>><a href="<%= sufia.static_path('help') %>">Help</a></li>
|
|
8
8
|
<li <%= 'class=active' if current_page?(sufia.contact_path) %>><a href="<%= sufia.contact_path %>">Contact</a></li>
|
|
9
9
|
</ul><!-- /.nav -->
|
|
10
|
-
<div class="navbar-right col-sm-7 col-md-6">
|
|
10
|
+
<div class="searchbar-right navbar-right col-sm-7 col-md-6">
|
|
11
11
|
<%= render partial: 'catalog/search_form' %>
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
@@ -12,20 +12,22 @@
|
|
|
12
12
|
<div class="sort-toggle">
|
|
13
13
|
<%# kind of hacky way to get this to work on catalog and folder controllers. May be able to simple do {action: "index"} but I'm not sure -%>
|
|
14
14
|
<% if @response.response['numFound'] > 1 && !sort_fields.empty? %>
|
|
15
|
-
<%= form_tag collection_path(collection), method: :get, class: 'per_page form-
|
|
16
|
-
<
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
<%= form_tag collection_path(collection), method: :get, class: 'per_page form-horizontal' do %>
|
|
16
|
+
<div class="form-group form-group-lg">
|
|
17
|
+
<fieldset class="col-xs-12 col-sm-9 col-md-8 col-lg-10">
|
|
18
|
+
<legend class="sr-only"><%= t('sufia.sort_label') %></legend>
|
|
19
|
+
<%= label_tag(:sort, "<span>Sort By:</span>".html_safe) %>
|
|
20
|
+
<%= select_tag(:sort, options_for_select(sort_fields, h(params[:sort]))) %>
|
|
21
|
+
<%= label_tag(:per_page) do %>
|
|
22
|
+
Show <%= select_tag(:per_page, options_for_select(['10', '20', '50', '100'], h(params[:per_page])), title: "Number of results to display per page") %>
|
|
23
|
+
per page
|
|
24
|
+
<% end %>
|
|
25
|
+
<%= render_hash_as_hidden_fields(search_state.params_for_search.except(:per_page, :sort)) %>
|
|
26
|
+
|
|
27
|
+
<button class="btn btn-info"><span class="glyphicon glyphicon-refresh"></span> Refresh</button>
|
|
28
|
+
</fieldset>
|
|
29
|
+
<%= render 'view_type_group' %>
|
|
30
|
+
</div>
|
|
29
31
|
<% end %>
|
|
30
32
|
<% end %>
|
|
31
33
|
</div>
|
|
@@ -19,16 +19,14 @@
|
|
|
19
19
|
</div>
|
|
20
20
|
|
|
21
21
|
<div class="row">
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
<% if has_collection_search_parameters? %>
|
|
22
|
+
<h2 class="col-xs-6 col-md-7 col-lg-6">
|
|
23
|
+
<% if has_collection_search_parameters? %>
|
|
25
24
|
Search Results within this Collection
|
|
26
|
-
|
|
25
|
+
<% else %>
|
|
27
26
|
Items in this Collection
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
</div>
|
|
27
|
+
<% end %>
|
|
28
|
+
</h2>
|
|
29
|
+
<div class="col-xs-6 col-md-5 col-lg-6"><%= render 'search_form', presenter: @presenter %></div>
|
|
32
30
|
</div>
|
|
33
31
|
|
|
34
32
|
<%= render 'sort_and_per_page', collection: @presenter %>
|
|
@@ -4,18 +4,3 @@
|
|
|
4
4
|
<%= button_tag(t('sufia.upload.browse_everything.browse_files_button'), type: 'button', class: 'btn btn-lg btn-success', id: "browse-btn",
|
|
5
5
|
'data-toggle' => 'browse-everything', 'data-route' => browse_everything_engine.root_path,
|
|
6
6
|
'data-target' => "##{f.object.persisted? ? 'edit' : 'new'}_#{f.object.model.model_name.param_key}" ) %>
|
|
7
|
-
|
|
8
|
-
<p id="status">0 items selected</p>
|
|
9
|
-
<script>
|
|
10
|
-
// Update the count in #status element when user selects files.
|
|
11
|
-
$(document).on('page:change', function() {
|
|
12
|
-
$('#browse-btn').browseEverything()
|
|
13
|
-
.done(function(data) {
|
|
14
|
-
$('#status').html(data.length.toString() + " <%= t('sufia.upload.browse_everything.files_selected')%>")
|
|
15
|
-
$('#submit-btn').html("Submit "+data.length.toString() + " selected files")
|
|
16
|
-
var evt = { isDefaultPrevented: function() { return false; } };
|
|
17
|
-
var files = $.map(data, function(d) { return { name: d.file_name, size: d.file_size, id: d.url } });
|
|
18
|
-
$.blueimp.fileupload.prototype.options.done.call($('#fileupload').fileupload(), evt, { result: { files: files }});
|
|
19
|
-
})
|
|
20
|
-
});
|
|
21
|
-
</script>
|
|
@@ -1,36 +1,38 @@
|
|
|
1
1
|
<div class="col-xs-12 heading-row">
|
|
2
|
-
|
|
2
|
+
<div class="row">
|
|
3
|
+
<% if can?(:create, Sufia.primary_work_type) %>
|
|
4
|
+
<div class="col-xs-6 col-sm-2 heading-tile">
|
|
5
|
+
<% classification = CurationConcerns::QuickClassificationQuery.new(current_user) %>
|
|
6
|
+
<% classification.each do |concern| %>
|
|
7
|
+
<%= link_to(new_polymorphic_path([main_app, concern]),
|
|
8
|
+
class: "item-option contextual-quick-classify #{dom_class(concern, 'new').gsub('_', '-')}",
|
|
9
|
+
role: 'menuitem'
|
|
10
|
+
) do %>
|
|
11
|
+
<span class="glyphicon glyphicon-upload"></span>
|
|
12
|
+
<%= I18n.t("sufia.dashboard.create_work", work_type: concern.human_readable_type) %>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% end %>
|
|
15
|
+
</div>
|
|
16
|
+
<% end %>
|
|
17
|
+
<% if can?(:create, Collection) %>
|
|
18
|
+
<div class="col-xs-6 col-sm-2 heading-tile">
|
|
19
|
+
<%= link_to new_collection_path, id: "hydra-collection-add" do %>
|
|
20
|
+
<span class="glyphicon glyphicon-plus"></span>
|
|
21
|
+
<%= t("sufia.dashboard.create_collection") %>
|
|
22
|
+
<% end %>
|
|
23
|
+
</div>
|
|
24
|
+
<% end %>
|
|
3
25
|
<div class="col-xs-6 col-sm-2 heading-tile">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class: "item-option contextual-quick-classify #{dom_class(concern, 'new').gsub('_', '-')}",
|
|
8
|
-
role: 'menuitem'
|
|
9
|
-
) do %>
|
|
10
|
-
<span class="glyphicon glyphicon-upload"></span>
|
|
11
|
-
<%= I18n.t("sufia.dashboard.create_work", work_type: concern.human_readable_type) %>
|
|
12
|
-
<% end %>
|
|
26
|
+
<%= link_to sufia.dashboard_collections_path, id: "hydra-collection-view" do %>
|
|
27
|
+
<span class="glyphicon glyphicon-th"></span>
|
|
28
|
+
<%= t("sufia.dashboard.view_collections") %>
|
|
13
29
|
<% end %>
|
|
14
30
|
</div>
|
|
15
|
-
<% end %>
|
|
16
|
-
<% if can?(:create, Collection) %>
|
|
17
31
|
<div class="col-xs-6 col-sm-2 heading-tile">
|
|
18
|
-
<%= link_to
|
|
19
|
-
<span class="glyphicon glyphicon-
|
|
20
|
-
<%= t("sufia.dashboard.
|
|
32
|
+
<%= link_to sufia.dashboard_works_path do %>
|
|
33
|
+
<span class="glyphicon glyphicon-eye-open"></span>
|
|
34
|
+
<%= t("sufia.dashboard.view_works") %>
|
|
21
35
|
<% end %>
|
|
22
36
|
</div>
|
|
23
|
-
<% end %>
|
|
24
|
-
<div class="col-xs-6 col-sm-2 heading-tile">
|
|
25
|
-
<%= link_to sufia.dashboard_collections_path, id: "hydra-collection-view" do %>
|
|
26
|
-
<span class="glyphicon glyphicon-th"></span>
|
|
27
|
-
<%= t("sufia.dashboard.view_collections") %>
|
|
28
|
-
<% end %>
|
|
29
|
-
</div>
|
|
30
|
-
<div class="col-xs-6 col-sm-2 heading-tile">
|
|
31
|
-
<%= link_to sufia.dashboard_works_path do %>
|
|
32
|
-
<span class="glyphicon glyphicon-eye-open"></span>
|
|
33
|
-
<%= t("sufia.dashboard.view_works") %>
|
|
34
|
-
<% end %>
|
|
35
37
|
</div>
|
|
36
38
|
</div>
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
<div class="clearfix proxy-rights">
|
|
2
|
-
|
|
2
|
+
<div class="row">
|
|
3
3
|
<div class="col-xs-6 proxy-search">
|
|
4
|
-
<
|
|
4
|
+
<h4><%= t("sufia.dashboard.authorize_proxies") %></h4>
|
|
5
5
|
<label class="sr-only" for="user"><%= t("sufia.dashboard.proxy_user") %></label>
|
|
6
6
|
<%= hidden_field_tag :user, nil, data: { grantor: current_user.to_param } %>
|
|
7
7
|
</div>
|
|
8
8
|
|
|
9
9
|
<div class="col-xs-6">
|
|
10
|
-
<
|
|
10
|
+
<h4><%= t("sufia.dashboard.current_proxies") %></h4>
|
|
11
11
|
<table class="table table-condensed table-striped" id="authorizedProxies">
|
|
12
12
|
<tbody>
|
|
13
|
-
|
|
13
|
+
<% user.can_receive_deposits_from.each do |depositor| %>
|
|
14
14
|
<tr><td class="depositor-name"><%= depositor.name %></td>
|
|
15
15
|
<td><%= link_to(sufia.user_depositor_path(user, depositor), method: :delete, class: "remove-proxy-button") do %>
|
|
16
|
-
|
|
16
|
+
<i class="glyphicon glyphicon-remove"></i><% end %>
|
|
17
17
|
</td></tr>
|
|
18
|
-
|
|
18
|
+
<% end %>
|
|
19
19
|
</tbody>
|
|
20
20
|
</table>
|
|
21
21
|
</div>
|
|
22
|
-
|
|
22
|
+
</div>
|
|
23
23
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<% # main container for facets/limits menu -%>
|
|
2
2
|
<% if has_facet_values? %>
|
|
3
|
-
<div id="facets" class="facets sidenav">
|
|
3
|
+
<div id="facets" class="panel facets sidenav">
|
|
4
4
|
|
|
5
5
|
<div class="top-panel-heading panel-heading">
|
|
6
6
|
<button type="button" class="facets-toggle" data-toggle="collapse" data-target="#facet-panel-collapse">
|
|
@@ -18,20 +18,23 @@
|
|
|
18
18
|
<div class="sort-toggle">
|
|
19
19
|
<% if @response.response['numFound'] > 1 && !sort_fields.empty? %>
|
|
20
20
|
<%= form_tag search_action_for_dashboard, method: :get, class: 'per_page form-inline' do %>
|
|
21
|
-
<
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
21
|
+
<div class="form-group">
|
|
22
|
+
<fieldset class="col-xs-12">
|
|
23
|
+
<legend class="sr-only"><%= t('sufia.sort_label') %></legend>
|
|
24
|
+
<%= label_tag(:sort, "<span>Sort By:</span>".html_safe) %>
|
|
25
|
+
<%= select_tag(:sort, options_for_select(sort_fields, h(params[:sort]))) %>
|
|
26
|
+
<%= label_tag :per_page do %>
|
|
27
|
+
Show <%= select_tag :per_page, options_for_select(['10', '20', '50', '100'], h(params[:per_page])),
|
|
28
|
+
title: "Number of results to display per page" %> per page
|
|
29
|
+
<% end %>
|
|
30
|
+
<%= render_hash_as_hidden_fields(search_state.params_for_search.except(:per_page, :sort, :utf8)) %>
|
|
31
|
+
|
|
32
|
+
<button class="btn btn-info" id="dashboard_sort_submit"><span class="glyphicon glyphicon-refresh"></span>
|
|
33
|
+
Refresh
|
|
34
|
+
</button>
|
|
35
|
+
</fieldset>
|
|
36
|
+
</div>
|
|
37
|
+
|
|
35
38
|
<% end %>
|
|
36
39
|
<% end %>
|
|
37
40
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Adapted from jquery-flot examples https://github.com/flot/flot/blob/master/examples/visitors/index.html -->
|
|
2
2
|
<%= javascript_tag do %>
|
|
3
|
-
var
|
|
3
|
+
var sufia_item_stats = <%= @stats.to_flot.to_json.html_safe %>;
|
|
4
4
|
<% end %>
|
|
5
5
|
|
|
6
6
|
<%= content_tag :h1, @file_set, class: "lower" %>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<!-- Adapted from jquery-flot examples https://github.com/flot/flot/blob/master/examples/visitors/index.html -->
|
|
2
2
|
<%= javascript_tag do %>
|
|
3
|
-
var
|
|
3
|
+
var sufia_item_stats = <%= @stats.to_flot.to_json.html_safe %>;
|
|
4
4
|
<% end %>
|
|
5
5
|
|
|
6
6
|
<%= content_tag :h1, @stats, class: "lower" %>
|
data/lib/sufia/version.rb
CHANGED
|
@@ -9,6 +9,7 @@ describe Sufia::CreateWithRemoteFilesActor do
|
|
|
9
9
|
let(:work) { create(:generic_work, user: user) }
|
|
10
10
|
let(:url1) { "https://dl.dropbox.com/fake/blah-blah.filepicker-demo.txt.txt" }
|
|
11
11
|
let(:url2) { "https://dl.dropbox.com/fake/blah-blah.Getting%20Started.pdf" }
|
|
12
|
+
let(:file) { "file:///local/file/here.txt" }
|
|
12
13
|
|
|
13
14
|
let(:remote_files) { [{ url: url1,
|
|
14
15
|
expires: "2014-03-31T20:37:36.214Z",
|
|
@@ -23,8 +24,28 @@ describe Sufia::CreateWithRemoteFilesActor do
|
|
|
23
24
|
allow(create_actor).to receive(:create).and_return(true)
|
|
24
25
|
end
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
context "with source uris that are remote" do
|
|
28
|
+
let(:remote_files) { [{ url: url1,
|
|
29
|
+
expires: "2014-03-31T20:37:36.214Z",
|
|
30
|
+
file_name: "filepicker-demo.txt.txt" },
|
|
31
|
+
{ url: url2,
|
|
32
|
+
expires: "2014-03-31T20:37:36.731Z",
|
|
33
|
+
file_name: "Getting+Started.pdf" }] }
|
|
34
|
+
|
|
35
|
+
it "attaches files" do
|
|
36
|
+
expect(ImportUrlJob).to receive(:perform_later).with(FileSet, CurationConcerns::Operation).twice
|
|
37
|
+
expect(actor.create(attributes)).to be true
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
context "with source uris that are local files" do
|
|
42
|
+
let(:remote_files) { [{ url: file,
|
|
43
|
+
expires: "2014-03-31T20:37:36.214Z",
|
|
44
|
+
file_name: "here.txt" }] }
|
|
45
|
+
|
|
46
|
+
it "attaches files" do
|
|
47
|
+
expect(IngestLocalFileJob).to receive(:perform_later).with(FileSet, "/local/file/here.txt", user)
|
|
48
|
+
expect(actor.create(attributes)).to be true
|
|
49
|
+
end
|
|
29
50
|
end
|
|
30
51
|
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
describe 'Batch creation of works', type: :feature do
|
|
4
|
+
let(:user) { create(:user) }
|
|
5
|
+
|
|
6
|
+
before do
|
|
7
|
+
sign_in user
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
it "renders the batch create form" do
|
|
11
|
+
visit sufia.new_batch_upload_path
|
|
12
|
+
within("li.active") do
|
|
13
|
+
expect(page).to have_content("Files")
|
|
14
|
+
end
|
|
15
|
+
expect(page).to have_content("Each file will be uploaded to a separate new work resulting in one work per uploaded file.")
|
|
16
|
+
end
|
|
17
|
+
end
|
data/sufia.gemspec
CHANGED
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
|
|
21
21
|
spec.add_dependency 'curation_concerns', '~> 1.1'
|
|
22
22
|
spec.add_dependency 'hydra-batch-edit', '~> 2.0'
|
|
23
|
-
spec.add_dependency 'browse-everything', '
|
|
23
|
+
spec.add_dependency 'browse-everything', '>= 0.10.3'
|
|
24
24
|
spec.add_dependency 'blacklight-gallery', '~> 0.1'
|
|
25
25
|
spec.add_dependency 'tinymce-rails', '~> 4.1'
|
|
26
26
|
spec.add_dependency 'tinymce-rails-imageupload', '~> 4.0.16.beta'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sufia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 7.0.0.
|
|
4
|
+
version: 7.0.0.rc2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
@@ -12,7 +12,7 @@ authors:
|
|
|
12
12
|
autorequire:
|
|
13
13
|
bindir: bin
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date: 2016-07-
|
|
15
|
+
date: 2016-07-20 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: curation_concerns
|
|
@@ -46,16 +46,16 @@ dependencies:
|
|
|
46
46
|
name: browse-everything
|
|
47
47
|
requirement: !ruby/object:Gem::Requirement
|
|
48
48
|
requirements:
|
|
49
|
-
- - "
|
|
49
|
+
- - ">="
|
|
50
50
|
- !ruby/object:Gem::Version
|
|
51
|
-
version:
|
|
51
|
+
version: 0.10.3
|
|
52
52
|
type: :runtime
|
|
53
53
|
prerelease: false
|
|
54
54
|
version_requirements: !ruby/object:Gem::Requirement
|
|
55
55
|
requirements:
|
|
56
|
-
- - "
|
|
56
|
+
- - ">="
|
|
57
57
|
- !ruby/object:Gem::Version
|
|
58
|
-
version:
|
|
58
|
+
version: 0.10.3
|
|
59
59
|
- !ruby/object:Gem::Dependency
|
|
60
60
|
name: blacklight-gallery
|
|
61
61
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -680,6 +680,7 @@ files:
|
|
|
680
680
|
- app/assets/javascripts/sufia/batch.js
|
|
681
681
|
- app/assets/javascripts/sufia/batch_edit.js
|
|
682
682
|
- app/assets/javascripts/sufia/batch_select_all.js
|
|
683
|
+
- app/assets/javascripts/sufia/browse_everything.js
|
|
683
684
|
- app/assets/javascripts/sufia/dashboard_actions.js
|
|
684
685
|
- app/assets/javascripts/sufia/editor.js
|
|
685
686
|
- app/assets/javascripts/sufia/facets.js
|
|
@@ -1286,6 +1287,7 @@ files:
|
|
|
1286
1287
|
- spec/factories/operations.rb
|
|
1287
1288
|
- spec/factories/proxy_deposit_requests.rb
|
|
1288
1289
|
- spec/factories/users.rb
|
|
1290
|
+
- spec/features/batch_create_spec.rb
|
|
1289
1291
|
- spec/features/batch_edit_spec.rb
|
|
1290
1292
|
- spec/features/browse_catalog_spec.rb
|
|
1291
1293
|
- spec/features/browse_dashboard_files_spec.rb
|
|
@@ -1535,7 +1537,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1535
1537
|
version: 1.3.1
|
|
1536
1538
|
requirements: []
|
|
1537
1539
|
rubyforge_project:
|
|
1538
|
-
rubygems_version: 2.
|
|
1540
|
+
rubygems_version: 2.6.4
|
|
1539
1541
|
signing_key:
|
|
1540
1542
|
specification_version: 4
|
|
1541
1543
|
summary: Sufia was originally extracted from ScholarSphere developed by Penn State
|
|
@@ -1588,6 +1590,7 @@ test_files:
|
|
|
1588
1590
|
- spec/factories/operations.rb
|
|
1589
1591
|
- spec/factories/proxy_deposit_requests.rb
|
|
1590
1592
|
- spec/factories/users.rb
|
|
1593
|
+
- spec/features/batch_create_spec.rb
|
|
1591
1594
|
- spec/features/batch_edit_spec.rb
|
|
1592
1595
|
- spec/features/browse_catalog_spec.rb
|
|
1593
1596
|
- spec/features/browse_dashboard_files_spec.rb
|