curation_concerns 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/concerns/curation_concerns/single_use_links_viewer_controller_behavior.rb +1 -1
- data/app/services/curation_concerns/persist_directly_contained_output_file_service.rb +1 -1
- data/app/views/{error → curation_concerns/single_use_links_viewer}/single_use_error.html.erb +0 -0
- data/lib/curation_concerns/version.rb +1 -1
- data/spec/controllers/curation_concerns/single_use_links_viewer_controller_spec.rb +3 -3
- data/spec/views/{error → single_use_links_viewer}/single_use_error.html.erb_spec.rb +2 -2
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 835147e30b02f4bd8176f008f6581a72852a03f0
|
4
|
+
data.tar.gz: 653102b81aed097f57c153baaea3c1f85f4e3f1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a6827a24f8fc84168c0d53fdfadc4745b08707d29a9ef0b6abaf628ccb8e8ae6177473068e1a723bcfc4b342d49e9323e0e6a354defffe2a7ed14d094581a5a
|
7
|
+
data.tar.gz: 20707bc6b4305fbc5df1cdf03216f5f8b7634aa442ec141b42b67bacf77e51da16bb58efe3804ae334dba22af31a48be982e5a7e479f53e81bb856df6c1ff106
|
data/app/controllers/concerns/curation_concerns/single_use_links_viewer_controller_behavior.rb
CHANGED
@@ -74,7 +74,7 @@ module CurationConcerns
|
|
74
74
|
|
75
75
|
def render_single_use_error(exception)
|
76
76
|
logger.error("Rendering PAGE due to exception: #{exception.inspect} - #{exception.backtrace if exception.respond_to? :backtrace}")
|
77
|
-
render
|
77
|
+
render 'single_use_error', layout: "error", status: 404
|
78
78
|
end
|
79
79
|
|
80
80
|
def _prefixes
|
@@ -14,7 +14,7 @@ module CurationConcerns
|
|
14
14
|
o_name = determine_original_name(file)
|
15
15
|
m_type = determine_mime_type(file)
|
16
16
|
uri = URI(directives.fetch(:url))
|
17
|
-
raise ArgumentError, "#{uri} is not an http uri" unless uri.
|
17
|
+
raise ArgumentError, "#{uri} is not an http(s) uri" unless uri.is_a?(URI::HTTP)
|
18
18
|
file_set = ActiveFedora::Base.find(ActiveFedora::Base.uri_to_id(uri.to_s))
|
19
19
|
remote_file = file_set.send("build_#{directives.fetch(:container)}".to_sym)
|
20
20
|
remote_file.content = file
|
data/app/views/{error → curation_concerns/single_use_links_viewer}/single_use_error.html.erb
RENAMED
File without changes
|
@@ -44,7 +44,7 @@ describe CurationConcerns::SingleUseLinksViewerController do
|
|
44
44
|
|
45
45
|
it "returns 404 if the key is not present" do
|
46
46
|
get :download, id: download_link_hash
|
47
|
-
expect(response).to render_template(
|
47
|
+
expect(response).to render_template("curation_concerns/single_use_links_viewer/single_use_error", "layouts/error")
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
@@ -61,13 +61,13 @@ describe CurationConcerns::SingleUseLinksViewerController do
|
|
61
61
|
before { SingleUseLink.find_by_downloadKey!(show_link_hash).destroy }
|
62
62
|
it "returns 404 if the key is not present" do
|
63
63
|
get :show, id: show_link_hash
|
64
|
-
expect(response).to render_template(
|
64
|
+
expect(response).to render_template("curation_concerns/single_use_links_viewer/single_use_error", "layouts/error")
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
68
|
it "returns 404 on attempt to get show path with download hash" do
|
69
69
|
get :show, id: download_link_hash
|
70
|
-
expect(response).to render_template(
|
70
|
+
expect(response).to render_template("curation_concerns/single_use_links_viewer/single_use_error", "layouts/error")
|
71
71
|
end
|
72
72
|
end
|
73
73
|
end
|
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe '
|
3
|
+
describe 'curation_concerns/single_use_links_viewer/single_use_error.html.erb' do
|
4
4
|
it 'renders without errors' do
|
5
|
-
render
|
5
|
+
render
|
6
6
|
expect(rendered).to have_text("Single Use Link Expired or Not Found")
|
7
7
|
end
|
8
8
|
end
|
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.1.
|
4
|
+
version: 1.1.2
|
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-07-
|
13
|
+
date: 2016-07-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: hydra-head
|
@@ -950,13 +950,13 @@ files:
|
|
950
950
|
- app/views/curation_concerns/operations/show.html.erb
|
951
951
|
- app/views/curation_concerns/permissions/confirm.html.erb
|
952
952
|
- app/views/curation_concerns/single_use_links_viewer/show.html.erb
|
953
|
+
- app/views/curation_concerns/single_use_links_viewer/single_use_error.html.erb
|
953
954
|
- app/views/embargoes/_embargo_history.html.erb
|
954
955
|
- app/views/embargoes/_list_active_embargoes.html.erb
|
955
956
|
- app/views/embargoes/_list_deactivated_embargoes.html.erb
|
956
957
|
- app/views/embargoes/_list_expired_active_embargoes.html.erb
|
957
958
|
- app/views/embargoes/edit.html.erb
|
958
959
|
- app/views/embargoes/index.html.erb
|
959
|
-
- app/views/error/single_use_error.html.erb
|
960
960
|
- app/views/layouts/boilerplate.html.erb
|
961
961
|
- app/views/layouts/curation_concerns.html.erb
|
962
962
|
- app/views/layouts/curation_concerns/1_column.html.erb
|
@@ -1220,11 +1220,11 @@ files:
|
|
1220
1220
|
- spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
|
1221
1221
|
- spec/views/curation_concerns/permissions/confirm.html.erb_spec.rb
|
1222
1222
|
- spec/views/curation_concerns/single_use_links_viewer/show.html.erb_spec.rb
|
1223
|
-
- spec/views/error/single_use_error.html.erb_spec.rb
|
1224
1223
|
- spec/views/layouts/error.html.erb_spec.rb
|
1225
1224
|
- spec/views/shared/_add_content.html.erb_spec.rb
|
1226
1225
|
- spec/views/shared/_my_actions.html.erb_spec.rb
|
1227
1226
|
- spec/views/single_use_links_viewer/show.html.erb_spec.rb
|
1227
|
+
- spec/views/single_use_links_viewer/single_use_error.html.erb_spec.rb
|
1228
1228
|
- tasks/jasmine.rake
|
1229
1229
|
- vendor/assets/images/ui-bg_glass_100_fdf5ce_1x400.png
|
1230
1230
|
- vendor/assets/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
|
@@ -1425,8 +1425,8 @@ test_files:
|
|
1425
1425
|
- spec/views/curation_concerns/file_sets/show.json.jbuilder_spec.rb
|
1426
1426
|
- spec/views/curation_concerns/permissions/confirm.html.erb_spec.rb
|
1427
1427
|
- spec/views/curation_concerns/single_use_links_viewer/show.html.erb_spec.rb
|
1428
|
-
- spec/views/error/single_use_error.html.erb_spec.rb
|
1429
1428
|
- spec/views/layouts/error.html.erb_spec.rb
|
1430
1429
|
- spec/views/shared/_add_content.html.erb_spec.rb
|
1431
1430
|
- spec/views/shared/_my_actions.html.erb_spec.rb
|
1432
1431
|
- spec/views/single_use_links_viewer/show.html.erb_spec.rb
|
1432
|
+
- spec/views/single_use_links_viewer/single_use_error.html.erb_spec.rb
|