hyrax 2.9.0 → 2.9.1
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/app/assets/javascripts/hyrax.js +1 -0
- data/app/assets/javascripts/hyrax/skip_to_content.js +15 -0
- data/app/controllers/hyrax/users_controller.rb +1 -1
- data/app/jobs/embargo_expiry_job.rb +15 -0
- data/app/jobs/lease_expiry_job.rb +15 -0
- data/hyrax.gemspec +2 -2
- data/lib/generators/hyrax/templates/config/locales/hyrax.es.yml +1 -1
- data/lib/hyrax/configuration.rb +8 -4
- data/lib/hyrax/version.rb +1 -1
- data/template.rb +1 -1
- metadata +23 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fdad61bdb40ae80fa4693bf81f3fc42a581943bdb77bee4fbaaa10367ae0bb9c
|
4
|
+
data.tar.gz: e83ba7521508d26a4e520fc6ab002be912594c78f1fabc066c8d5b887733ba3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8bf649b4432aeaa409734defa1773e5be9ef8ffe5993a02ede4a41aed7c541ff4c0b6eb312ade95bfd6710317b98ff6bf076f79e637ed5e4c25df6773680dac
|
7
|
+
data.tar.gz: 9deb1668640448edc64ff4576205dc9d5268692d43f730b361756b8f62bb794439b20ce88dc5a740afdd25349ea08b3884b27408d0f2726875861934402f51c7
|
@@ -104,6 +104,7 @@
|
|
104
104
|
//= require hyrax/tabbed_form
|
105
105
|
//= require hyrax/turbolinks_events
|
106
106
|
//= require hyrax/i18n_helper
|
107
|
+
//= require hyrax/skip_to_content
|
107
108
|
|
108
109
|
// this needs to be after batch_select so that the form ids get setup correctly
|
109
110
|
//= require hyrax/batch_edit
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This code is to implement skip_to_content
|
2
|
+
|
3
|
+
Blacklight.onLoad(function () {
|
4
|
+
$(".skip-to-content").click(function(event) {
|
5
|
+
event.preventDefault();
|
6
|
+
// element to focus on
|
7
|
+
let skipTo = '#' + $(this)[0].firstElementChild.hash.split('#')[1];
|
8
|
+
|
9
|
+
// Setting 'tabindex' to -1 takes an element out of normal
|
10
|
+
// tab flow but allows it to be focused via javascript
|
11
|
+
$(skipTo).attr('tabindex', -1).on('blur focusout', function () {
|
12
|
+
$(this).removeAttr('tabindex');
|
13
|
+
}).focus();
|
14
|
+
});
|
15
|
+
});
|
@@ -41,7 +41,7 @@ module Hyrax
|
|
41
41
|
|
42
42
|
def find_user
|
43
43
|
@user = ::User.from_url_component(params[:id])
|
44
|
-
redirect_to root_path, alert: "User
|
44
|
+
redirect_to root_path, alert: "User does not exist" unless @user
|
45
45
|
end
|
46
46
|
|
47
47
|
def sort_value
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
class EmbargoExpiryJob < Hyrax::ApplicationJob
|
3
|
+
def perform
|
4
|
+
records_with_expired_embargos.each do |id|
|
5
|
+
work = ActiveFedora::Base.find(id)
|
6
|
+
Hyrax::Actors::EmbargoActor.new(work).destroy
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
##
|
11
|
+
# @return [Enumerator<String>] ids for all the objects that have expired active embargoes
|
12
|
+
def records_with_expired_embargos
|
13
|
+
Hyrax::EmbargoService.assets_with_expired_embargoes.map(&:id)
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
class LeaseExpiryJob < Hyrax::ApplicationJob
|
3
|
+
def perform
|
4
|
+
records_with_expired_leases.each do |id|
|
5
|
+
work = ActiveFedora::Base.find(id)
|
6
|
+
Hyrax::Actors::LeaseActor.new(work).destroy
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
##
|
11
|
+
# @return [Enumerator<String>] ids for all the objects that have expired active leases
|
12
|
+
def records_with_expired_leases
|
13
|
+
Hyrax::LeaseService.assets_with_expired_leases.map(&:id)
|
14
|
+
end
|
15
|
+
end
|
data/hyrax.gemspec
CHANGED
@@ -50,7 +50,7 @@ SUMMARY
|
|
50
50
|
spec.add_dependency 'font-awesome-rails', '~> 4.2'
|
51
51
|
spec.add_dependency 'hydra-derivatives', '~> 3.3'
|
52
52
|
spec.add_dependency 'hydra-editor', '>= 3.3', '< 6.0'
|
53
|
-
spec.add_dependency 'hydra-head', '>= 10.6.1'
|
53
|
+
spec.add_dependency 'hydra-head', '>= 10.6.1', '< 12'
|
54
54
|
spec.add_dependency 'hydra-works', '>= 0.16', '< 2.0'
|
55
55
|
spec.add_dependency 'iiif_manifest', '>= 0.3', '< 0.6'
|
56
56
|
spec.add_dependency 'jquery-datatables-rails', '~> 3.4'
|
@@ -68,7 +68,7 @@ SUMMARY
|
|
68
68
|
spec.add_dependency 'posix-spawn'
|
69
69
|
spec.add_dependency 'power_converter', '~> 0.1', '>= 0.1.2'
|
70
70
|
spec.add_dependency 'pul_uv_rails', '~> 2.0'
|
71
|
-
spec.add_dependency 'qa', '
|
71
|
+
spec.add_dependency 'qa', '>= 2.0', '< 6.0' # questioning_authority
|
72
72
|
spec.add_dependency 'rails_autolink', '~> 1.1'
|
73
73
|
spec.add_dependency 'rdf-rdfxml' # controlled vocabulary importer
|
74
74
|
spec.add_dependency 'rdf-vocab', '< 3.1.5'
|
@@ -51,7 +51,7 @@ es:
|
|
51
51
|
suffix: "@example.org"
|
52
52
|
footer:
|
53
53
|
copyright_html: "<strong>Copyright © 2018 Samvera</strong> bajo licencia de Apache, Version 2.0"
|
54
|
-
service_html: Un servicio de <a href="http://samvera.org/" class="navbar-link" target="_blank">Samvera
|
54
|
+
service_html: Un servicio de <a href="http://samvera.org/" class="navbar-link" target="_blank">Samvera</a>.
|
55
55
|
institution_name: institución
|
56
56
|
institution_name_full: El nombre de la institución
|
57
57
|
product_name: Hyrax
|
data/lib/hyrax/configuration.rb
CHANGED
@@ -479,10 +479,14 @@ module Hyrax
|
|
479
479
|
attr_writer :translate_uri_to_id
|
480
480
|
|
481
481
|
def translate_uri_to_id
|
482
|
-
@translate_uri_to_id ||=
|
483
|
-
|
484
|
-
|
485
|
-
|
482
|
+
@translate_uri_to_id ||=
|
483
|
+
begin
|
484
|
+
baseparts = 2 + [(::Noid::Rails.config.template.gsub(/\.[rsz]/, '').length.to_f / 2).ceil, 4].min
|
485
|
+
|
486
|
+
lambda do |uri|
|
487
|
+
uri.to_s.split(ActiveFedora.fedora.base_path).last.split('/', baseparts).last
|
488
|
+
end
|
489
|
+
end
|
486
490
|
end
|
487
491
|
|
488
492
|
attr_writer :translate_id_to_uri
|
data/lib/hyrax/version.rb
CHANGED
data/template.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hyrax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.9.
|
4
|
+
version: 2.9.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Coyne
|
@@ -11,10 +11,10 @@ authors:
|
|
11
11
|
- Jeremy Friesen
|
12
12
|
- Trey Pendragon
|
13
13
|
- Esmé Cowles
|
14
|
-
autorequire:
|
14
|
+
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
|
-
date: 2020-
|
17
|
+
date: 2020-12-12 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: rails
|
@@ -327,6 +327,9 @@ dependencies:
|
|
327
327
|
- - ">="
|
328
328
|
- !ruby/object:Gem::Version
|
329
329
|
version: 10.6.1
|
330
|
+
- - "<"
|
331
|
+
- !ruby/object:Gem::Version
|
332
|
+
version: '12'
|
330
333
|
type: :runtime
|
331
334
|
prerelease: false
|
332
335
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -334,6 +337,9 @@ dependencies:
|
|
334
337
|
- - ">="
|
335
338
|
- !ruby/object:Gem::Version
|
336
339
|
version: 10.6.1
|
340
|
+
- - "<"
|
341
|
+
- !ruby/object:Gem::Version
|
342
|
+
version: '12'
|
337
343
|
- !ruby/object:Gem::Dependency
|
338
344
|
name: hydra-works
|
339
345
|
requirement: !ruby/object:Gem::Requirement
|
@@ -580,16 +586,22 @@ dependencies:
|
|
580
586
|
name: qa
|
581
587
|
requirement: !ruby/object:Gem::Requirement
|
582
588
|
requirements:
|
583
|
-
- - "
|
589
|
+
- - ">="
|
584
590
|
- !ruby/object:Gem::Version
|
585
591
|
version: '2.0'
|
592
|
+
- - "<"
|
593
|
+
- !ruby/object:Gem::Version
|
594
|
+
version: '6.0'
|
586
595
|
type: :runtime
|
587
596
|
prerelease: false
|
588
597
|
version_requirements: !ruby/object:Gem::Requirement
|
589
598
|
requirements:
|
590
|
-
- - "
|
599
|
+
- - ">="
|
591
600
|
- !ruby/object:Gem::Version
|
592
601
|
version: '2.0'
|
602
|
+
- - "<"
|
603
|
+
- !ruby/object:Gem::Version
|
604
|
+
version: '6.0'
|
593
605
|
- !ruby/object:Gem::Dependency
|
594
606
|
name: rails_autolink
|
595
607
|
requirement: !ruby/object:Gem::Requirement
|
@@ -1287,6 +1299,7 @@ files:
|
|
1287
1299
|
- app/assets/javascripts/hyrax/select_submit.js
|
1288
1300
|
- app/assets/javascripts/hyrax/select_work_type.es6
|
1289
1301
|
- app/assets/javascripts/hyrax/single_use_links_manager.js
|
1302
|
+
- app/assets/javascripts/hyrax/skip_to_content.js
|
1290
1303
|
- app/assets/javascripts/hyrax/sort_and_per_page.es6
|
1291
1304
|
- app/assets/javascripts/hyrax/sorting.js
|
1292
1305
|
- app/assets/javascripts/hyrax/tabbed_form.es6
|
@@ -1502,6 +1515,7 @@ files:
|
|
1502
1515
|
- app/jobs/content_update_event_job.rb
|
1503
1516
|
- app/jobs/create_derivatives_job.rb
|
1504
1517
|
- app/jobs/create_work_job.rb
|
1518
|
+
- app/jobs/embargo_expiry_job.rb
|
1505
1519
|
- app/jobs/event_job.rb
|
1506
1520
|
- app/jobs/file_set_attached_event_job.rb
|
1507
1521
|
- app/jobs/fixity_check_job.rb
|
@@ -1518,6 +1532,7 @@ files:
|
|
1518
1532
|
- app/jobs/ingest_job.rb
|
1519
1533
|
- app/jobs/ingest_local_file_job.rb
|
1520
1534
|
- app/jobs/inherit_permissions_job.rb
|
1535
|
+
- app/jobs/lease_expiry_job.rb
|
1521
1536
|
- app/jobs/resolrize_job.rb
|
1522
1537
|
- app/jobs/stream_notifications_job.rb
|
1523
1538
|
- app/jobs/user_edit_profile_event_job.rb
|
@@ -2443,7 +2458,7 @@ homepage: http://github.com/samvera/hyrax
|
|
2443
2458
|
licenses:
|
2444
2459
|
- Apache-2.0
|
2445
2460
|
metadata: {}
|
2446
|
-
post_install_message:
|
2461
|
+
post_install_message:
|
2447
2462
|
rdoc_options: []
|
2448
2463
|
require_paths:
|
2449
2464
|
- lib
|
@@ -2458,8 +2473,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
2458
2473
|
- !ruby/object:Gem::Version
|
2459
2474
|
version: '0'
|
2460
2475
|
requirements: []
|
2461
|
-
rubygems_version: 3.
|
2462
|
-
signing_key:
|
2476
|
+
rubygems_version: 3.1.2
|
2477
|
+
signing_key:
|
2463
2478
|
specification_version: 4
|
2464
2479
|
summary: Hyrax is a front-end based on the robust Samvera framework, providing a user
|
2465
2480
|
interface for common repository features. Hyrax offers the ability to create repository
|