sufia 3.0.0 → 3.1.0
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/.gitignore +2 -0
- data/Gemfile +1 -1
- data/History.md +77 -0
- data/README.md +26 -11
- data/SUFIA_VERSION +1 -1
- data/app/helpers/blacklight/render_constraints_helper_behavior.rb +4 -3
- data/app/helpers/sufia_helper.rb +7 -5
- data/app/jobs/ingest_local_file_job.rb +34 -0
- data/app/views/catalog/_facet_selected.html.erb +1 -1
- data/app/views/generic_files/_local_file_import.html.erb +3 -0
- data/app/views/generic_files/new.html.erb +10 -0
- data/app/views/generic_files/upload/_alerts.html.erb +2 -2
- data/app/views/generic_files/upload/_local_file_import_chooser.html.erb +27 -0
- data/app/views/generic_files/upload/_script_templates.html.erb +1 -1
- data/lib/generators/sufia/sufia_generator.rb +1 -0
- data/lib/generators/sufia/templates/config/resque_config.rb +3 -20
- data/lib/sufia/files_controller/local_ingest_behavior.rb +54 -0
- data/lib/sufia/files_controller/upload_complete_behavior.rb +7 -0
- data/lib/sufia/files_controller_behavior.rb +31 -11
- data/lib/sufia/version.rb +1 -1
- data/spec/active_fedora/unsaved_digital_object_spec.rb +1 -1
- data/spec/controllers/authorities_controller_spec.rb +1 -1
- data/spec/controllers/batch_controller_spec.rb +4 -4
- data/spec/controllers/batch_edits_controller_spec.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -1
- data/spec/controllers/dashboard_controller_spec.rb +2 -2
- data/spec/controllers/downloads_controller_spec.rb +2 -3
- data/spec/controllers/generic_files_controller_spec.rb +113 -31
- data/spec/controllers/mailbox_controller_spec.rb +1 -1
- data/spec/controllers/single_use_link_controller_spec.rb +4 -5
- data/spec/controllers/users_controller_spec.rb +3 -3
- data/spec/features/browse_dashboard_files.rb +1 -1
- data/spec/features/browse_files.rb +1 -1
- data/spec/features/contact_form.rb +1 -1
- data/spec/features/display_dashboard.rb +1 -1
- data/spec/features/ingest_upload_files.rb +1 -1
- data/spec/features/users_spec.rb +1 -1
- data/spec/helpers/generic_file_helper_spec.rb +1 -1
- data/spec/helpers/render_constraints_helper_behavior_spec.rb +42 -0
- data/spec/helpers/sufia_helper_spec.rb +40 -1
- data/spec/jobs/import_url_job_spec.rb +45 -0
- data/spec/jobs/ingest_local_file_job_spec.rb +35 -0
- data/spec/lib/sufia/id_service_spec.rb +1 -1
- data/spec/lib/sufia/upload_complete_behavior_spec.rb +26 -0
- data/spec/models/audit_job_spec.rb +2 -2
- data/spec/models/batch_spec.rb +1 -1
- data/spec/models/batch_update_job_spec.rb +2 -4
- data/spec/models/characterize_job_spec.rb +17 -14
- data/spec/models/checksum_audit_log_spec.rb +2 -2
- data/spec/models/event_jobs_spec.rb +2 -2
- data/spec/models/file_content_datastream_spec.rb +5 -5
- data/spec/models/fits_datastream_spec.rb +2 -2
- data/spec/models/generic_file/actions_spec.rb +25 -0
- data/spec/models/generic_file/web_form_spec.rb +1 -1
- data/spec/models/generic_file_spec.rb +16 -33
- data/spec/models/local_authority_spec.rb +1 -1
- data/spec/models/properties_datastream_spec.rb +1 -1
- data/spec/models/single_use_link_spec.rb +1 -1
- data/spec/models/solr_document_spec.rb +1 -1
- data/spec/models/transcode_audio_job_spec.rb +22 -18
- data/spec/models/transcode_video_job_spec.rb +4 -3
- data/spec/models/trophy_spec.rb +1 -1
- data/spec/models/unzip_job_spec.rb +2 -2
- data/spec/models/user_spec.rb +1 -1
- data/spec/rake/sufia_fixtures_spec.rb +1 -1
- data/spec/routing/route_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -2
- data/spec/views/batch_edits/check_all_spec.rb +1 -1
- data/sufia-models/app/models/datastreams/file_content_datastream.rb +1 -15
- data/sufia-models/app/models/geo_names_resource.rb +0 -2
- data/sufia-models/lib/sufia/models.rb +1 -1
- data/sufia-models/lib/sufia/models/engine.rb +12 -1
- data/sufia-models/lib/sufia/models/file_content.rb +0 -3
- data/sufia-models/lib/sufia/models/generic_file.rb +6 -10
- data/sufia-models/lib/sufia/models/generic_file/actions.rb +1 -1
- data/sufia-models/lib/sufia/models/generic_file/characterization.rb +1 -1
- data/sufia-models/lib/sufia/models/generic_file/derivatives.rb +31 -0
- data/sufia-models/lib/sufia/models/generic_file/mime_types.rb +27 -0
- data/sufia-models/lib/sufia/models/generic_file/thumbnail.rb +6 -60
- data/sufia-models/lib/sufia/models/jobs/active_fedora_pid_based_job.rb +19 -0
- data/sufia-models/lib/sufia/models/jobs/audit_job.rb +12 -8
- data/sufia-models/lib/sufia/models/jobs/characterize_job.rb +3 -10
- data/sufia-models/lib/sufia/models/jobs/import_url_job.rb +2 -9
- data/sufia-models/lib/sufia/models/jobs/resolrize_job.rb +8 -1
- data/sufia-models/lib/sufia/models/jobs/transcode_audio_job.rb +4 -28
- data/sufia-models/lib/sufia/models/jobs/transcode_video_job.rb +4 -28
- data/sufia-models/lib/sufia/models/jobs/unzip_job.rb +5 -19
- data/sufia-models/lib/sufia/models/model_methods.rb +2 -16
- data/sufia-models/lib/sufia/models/user_local_directory_behavior.rb +29 -0
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +1 -1
- data/sufia.gemspec +2 -1
- data/tasks/sufia-dev.rake +1 -1
- metadata +26 -10
- data/app/assets/stylesheets/jquery-ui-1.8.1.custom.css +0 -486
- data/app/assets/stylesheets/jquery-ui-1.8.23.custom.css +0 -340
- data/sufia-models/lib/sufia/models/file_content/extract_metadata.rb +0 -60
- data/sufia-models/lib/sufia/models/jobs/ffmpeg_transcode_job.rb +0 -61
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
class ActiveFedoraPidBasedJob
|
|
2
|
+
def queue_name
|
|
3
|
+
:pid_based
|
|
4
|
+
end
|
|
5
|
+
|
|
6
|
+
attr_accessor :pid
|
|
7
|
+
def initialize(pid)
|
|
8
|
+
self.pid = pid
|
|
9
|
+
end
|
|
10
|
+
def object
|
|
11
|
+
@object ||= ActiveFedora::Base.find(pid, cast:true)
|
|
12
|
+
end
|
|
13
|
+
alias_method :generic_file, :object
|
|
14
|
+
alias_method :generic_file_id, :pid
|
|
15
|
+
|
|
16
|
+
def run
|
|
17
|
+
raise RuntimeError, "Define #run in a subclass"
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
class AuditJob
|
|
15
|
+
class AuditJob < ActiveFedoraPidBasedJob
|
|
16
16
|
def queue_name
|
|
17
17
|
:audit
|
|
18
18
|
end
|
|
@@ -20,16 +20,15 @@ class AuditJob
|
|
|
20
20
|
PASS = 'Passing Audit Run'
|
|
21
21
|
FAIL = 'Failing Audit Run'
|
|
22
22
|
|
|
23
|
-
attr_accessor :
|
|
23
|
+
attr_accessor :pid, :datastream_id, :version_id
|
|
24
24
|
|
|
25
|
-
def initialize(
|
|
26
|
-
|
|
25
|
+
def initialize(pid, datastream_id, version_id)
|
|
26
|
+
super(pid)
|
|
27
27
|
self.datastream_id = datastream_id
|
|
28
28
|
self.version_id = version_id
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def run
|
|
32
|
-
generic_file = GenericFile.find(generic_file_id)
|
|
33
32
|
#logger.info "GF is #{generic_file.pid}"
|
|
34
33
|
if generic_file
|
|
35
34
|
datastream = generic_file.datastreams[datastream_id]
|
|
@@ -37,7 +36,7 @@ class AuditJob
|
|
|
37
36
|
if datastream
|
|
38
37
|
#logger.info "Datastream for audit = #{datastream.inspect}"
|
|
39
38
|
version = datastream.versions.select { |v| v.versionID == version_id}.first
|
|
40
|
-
log =
|
|
39
|
+
log = run_audit(version)
|
|
41
40
|
|
|
42
41
|
# look up the user for sending the message to
|
|
43
42
|
login = generic_file.depositor
|
|
@@ -56,10 +55,15 @@ class AuditJob
|
|
|
56
55
|
end
|
|
57
56
|
end
|
|
58
57
|
else
|
|
59
|
-
logger.warn "No datastream for audit!!!!! pid: #{
|
|
58
|
+
logger.warn "No datastream for audit!!!!! pid: #{pid} dsid: #{datastream_id}"
|
|
60
59
|
end
|
|
61
60
|
else
|
|
62
|
-
logger.warn "No generic file for data stream audit!!!!! pid: #{
|
|
61
|
+
logger.warn "No generic file for data stream audit!!!!! pid: #{pid} dsid: #{datastream_id}"
|
|
63
62
|
end
|
|
64
63
|
end
|
|
64
|
+
|
|
65
|
+
private
|
|
66
|
+
def run_audit(version)
|
|
67
|
+
object.class.run_audit(version)
|
|
68
|
+
end
|
|
65
69
|
end
|
|
@@ -12,20 +12,13 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
class CharacterizeJob
|
|
15
|
+
class CharacterizeJob < ActiveFedoraPidBasedJob
|
|
16
16
|
|
|
17
17
|
def queue_name
|
|
18
18
|
:characterize
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
attr_accessor :generic_file_id, :generic_file
|
|
22
|
-
|
|
23
|
-
def initialize(generic_file_id)
|
|
24
|
-
self.generic_file_id = generic_file_id
|
|
25
|
-
end
|
|
26
|
-
|
|
27
21
|
def run
|
|
28
|
-
self.generic_file = GenericFile.find(generic_file_id)
|
|
29
22
|
generic_file.characterize
|
|
30
23
|
after_characterize
|
|
31
24
|
end
|
|
@@ -35,9 +28,9 @@ class CharacterizeJob
|
|
|
35
28
|
generic_file.create_thumbnail
|
|
36
29
|
end
|
|
37
30
|
if generic_file.video?
|
|
38
|
-
Sufia.queue.push(TranscodeVideoJob.new(generic_file_id
|
|
31
|
+
Sufia.queue.push(TranscodeVideoJob.new(generic_file_id))
|
|
39
32
|
elsif generic_file.audio?
|
|
40
|
-
Sufia.queue.push(TranscodeAudioJob.new(generic_file_id
|
|
33
|
+
Sufia.queue.push(TranscodeAudioJob.new(generic_file_id))
|
|
41
34
|
end
|
|
42
35
|
end
|
|
43
36
|
end
|
|
@@ -2,20 +2,13 @@ require 'net/https'
|
|
|
2
2
|
require 'uri'
|
|
3
3
|
require 'tempfile'
|
|
4
4
|
|
|
5
|
-
class ImportUrlJob
|
|
5
|
+
class ImportUrlJob < ActiveFedoraPidBasedJob
|
|
6
6
|
|
|
7
7
|
def queue_name
|
|
8
8
|
:import_url
|
|
9
9
|
end
|
|
10
10
|
|
|
11
|
-
attr_accessor :pid
|
|
12
|
-
|
|
13
|
-
def initialize(pid)
|
|
14
|
-
self.pid = pid
|
|
15
|
-
end
|
|
16
|
-
|
|
17
11
|
def run
|
|
18
|
-
generic_file = GenericFile.find(self.pid)
|
|
19
12
|
f = Tempfile.new(self.pid)
|
|
20
13
|
f.binmode
|
|
21
14
|
|
|
@@ -26,7 +19,7 @@ class ImportUrlJob
|
|
|
26
19
|
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
|
27
20
|
|
|
28
21
|
http.start do
|
|
29
|
-
http.request_get(uri) do |resp|
|
|
22
|
+
http.request_get(uri.request_uri) do |resp|
|
|
30
23
|
resp.read_body do |segment|
|
|
31
24
|
f.write(segment)
|
|
32
25
|
end
|
|
@@ -18,6 +18,13 @@ class ResolrizeJob
|
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def run
|
|
21
|
-
|
|
21
|
+
require 'active_fedora/version'
|
|
22
|
+
active_fedora_version = Gem::Version.new(ActiveFedora::VERSION)
|
|
23
|
+
minimum_feature_version = Gem::Version.new('6.4.4')
|
|
24
|
+
if active_fedora_version >= minimum_feature_version
|
|
25
|
+
ActiveFedora::Base.reindex_everything("pid~#{Sufia.config.id_namespace}:*")
|
|
26
|
+
else
|
|
27
|
+
ActiveFedora::Base.reindex_everything
|
|
28
|
+
end
|
|
22
29
|
end
|
|
23
30
|
end
|
|
@@ -2,38 +2,14 @@
|
|
|
2
2
|
# 7 Feb 2013
|
|
3
3
|
# An asyncronous job for transcoding audio files using FFMpeg
|
|
4
4
|
|
|
5
|
-
class TranscodeAudioJob <
|
|
5
|
+
class TranscodeAudioJob < ActiveFedoraPidBasedJob
|
|
6
6
|
def queue_name
|
|
7
7
|
:audio
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
def run
|
|
11
|
+
generic_file.create_derivatives
|
|
12
|
+
generic_file.save
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
private
|
|
16
|
-
def encode_ogg
|
|
17
|
-
opts = ""
|
|
18
|
-
if generic_file.mime_type == 'audio/ogg'
|
|
19
|
-
# Don't re-encode, just copy
|
|
20
|
-
generic_file.add_file_datastream(generic_file.content.read, :dsid=>'ogg', :mimeType=>'audio/ogg')
|
|
21
|
-
#generic_file.content.rewind
|
|
22
|
-
else
|
|
23
|
-
encode_datastream('ogg', 'audio/ogg', opts)
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def encode_mp3
|
|
28
|
-
opts = ""
|
|
29
|
-
if generic_file.mime_type == 'audio/mpeg'
|
|
30
|
-
# Don't re-encode, just copy
|
|
31
|
-
generic_file.add_file_datastream(generic_file.content.read, :dsid=>'mp3', :mimeType=>'audio/mpeg')
|
|
32
|
-
else
|
|
33
|
-
encode_datastream('mp3', 'audio/mpeg', opts)
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
|
|
38
15
|
end
|
|
39
|
-
|
|
@@ -2,38 +2,14 @@
|
|
|
2
2
|
# 13 Dec 2012
|
|
3
3
|
# An asyncronous job for transcoding video files using FFMpeg
|
|
4
4
|
|
|
5
|
-
class TranscodeVideoJob <
|
|
5
|
+
class TranscodeVideoJob < ActiveFedoraPidBasedJob
|
|
6
6
|
def queue_name
|
|
7
7
|
:video
|
|
8
8
|
end
|
|
9
9
|
|
|
10
|
-
def
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
def encode_webm
|
|
18
|
-
# -g 30 enforces keyframe generation every second (30fps)
|
|
19
|
-
# -b:v is the video bitrate
|
|
20
|
-
# -acodec is the audio codec
|
|
21
|
-
opts = "#{size_attributes} -g 30 -b:v 345k -acodec libvorbis #{audio_attributes}"
|
|
22
|
-
encode_datastream('webm', 'video/webm', opts)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def encode_mp4
|
|
26
|
-
opts = "#{size_attributes} -b:v 345k -vcodec libx264 -acodec libfaac #{audio_attributes} "
|
|
27
|
-
encode_datastream('mp4', 'video/mp4', opts)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
def size_attributes
|
|
32
|
-
"-s 320x240"
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def audio_attributes
|
|
36
|
-
"-ac 2 -ab 96k -ar 44100"
|
|
10
|
+
def run
|
|
11
|
+
generic_file.create_derivatives
|
|
12
|
+
generic_file.save
|
|
37
13
|
end
|
|
38
14
|
end
|
|
39
15
|
|
|
@@ -12,19 +12,13 @@
|
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
14
|
|
|
15
|
-
class UnzipJob
|
|
15
|
+
class UnzipJob < ActiveFedoraPidBasedJob
|
|
16
16
|
def queue_name
|
|
17
17
|
:unzip
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
attr_accessor :pid
|
|
21
|
-
|
|
22
|
-
def initialize(pid)
|
|
23
|
-
self.pid = pid
|
|
24
|
-
end
|
|
25
|
-
|
|
26
20
|
def run
|
|
27
|
-
Zip::Archive.open_buffer(
|
|
21
|
+
Zip::Archive.open_buffer(object.content.content) do |archive|
|
|
28
22
|
archive.each do |f|
|
|
29
23
|
if f.directory?
|
|
30
24
|
create_directory(f)
|
|
@@ -41,14 +35,9 @@ class UnzipJob
|
|
|
41
35
|
# @param file [Zip::File]
|
|
42
36
|
def create_file(file)
|
|
43
37
|
@generic_file = GenericFile.new
|
|
44
|
-
@generic_file.batch_id =
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
mime_type = mime_types.empty? ? "application/octet-stream" : mime_types.first.content_type
|
|
48
|
-
options = {:label=>file_name, :dsid=>'content', :mimeType=>mime_type}
|
|
49
|
-
@generic_file.add_file_datastream(file.read, options)
|
|
50
|
-
@generic_file.set_title_and_label( file_name, :only_if_blank=>true )
|
|
51
|
-
@generic_file.apply_depositor_metadata(zip_file.edit_users.first)
|
|
38
|
+
@generic_file.batch_id = object.batch.pid
|
|
39
|
+
@generic_file.add_file(file.read, 'content', file.name)
|
|
40
|
+
@generic_file.apply_depositor_metadata(object.edit_users.first)
|
|
52
41
|
@generic_file.date_uploaded = Time.now.ctime
|
|
53
42
|
@generic_file.date_modified = Time.now.ctime
|
|
54
43
|
@generic_file.save
|
|
@@ -60,7 +49,4 @@ class UnzipJob
|
|
|
60
49
|
def create_directory(file)
|
|
61
50
|
end
|
|
62
51
|
|
|
63
|
-
def zip_file
|
|
64
|
-
@zip_file ||= GenericFile.find(pid)
|
|
65
|
-
end
|
|
66
52
|
end
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
# Copyright © 2012 The Pennsylvania State University
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
14
|
-
|
|
15
|
-
require 'hydra/model_methods'
|
|
16
1
|
module Sufia
|
|
17
2
|
module ModelMethods
|
|
18
3
|
extend ActiveSupport::Concern
|
|
@@ -26,9 +11,10 @@ module Sufia
|
|
|
26
11
|
# Adds metadata about the depositor to the asset
|
|
27
12
|
# Most important behavior: if the asset has a rightsMetadata datastream, this method will add +depositor_id+ to its individual edit permissions.
|
|
28
13
|
|
|
29
|
-
def apply_depositor_metadata(
|
|
14
|
+
def apply_depositor_metadata(depositor)
|
|
30
15
|
rights_ds = self.datastreams["rightsMetadata"]
|
|
31
16
|
prop_ds = self.datastreams["properties"]
|
|
17
|
+
depositor_id = depositor.respond_to?(:user_key) ? depositor.user_key : depositor
|
|
32
18
|
|
|
33
19
|
rights_ds.update_indexed_attributes([:edit_access, :person]=>depositor_id) unless rights_ds.nil?
|
|
34
20
|
prop_ds.depositor = depositor_id unless prop_ds.nil?
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# To enable local file ingest,
|
|
2
|
+
# - Make User model define .directory method that returns a String corresponding to the User's personal import directory on the server. This can be a simple ActiveRecord attribute on the User model, or it can be something more elaborate.
|
|
3
|
+
# - Include this module in your User model, or define a .files() method that behaves the same
|
|
4
|
+
# - Set Sufia.config.enable_local_ingest to true
|
|
5
|
+
#
|
|
6
|
+
module Sufia::UserLocalDirectoryBehavior
|
|
7
|
+
|
|
8
|
+
# You can use this validator in your User model.
|
|
9
|
+
# Ensures that a string defining the path to the user's directory has been provided
|
|
10
|
+
# and corresponds to a real directory on the server.
|
|
11
|
+
# @example
|
|
12
|
+
# validate :directory_must_exist
|
|
13
|
+
def directory_must_exist
|
|
14
|
+
unless directory.blank? || File.directory?(directory)
|
|
15
|
+
errors.add(:directory, "must be an existing directory")
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
# List the contents of the user's directory on the server
|
|
20
|
+
# Indicates whether each item is a directory or not.
|
|
21
|
+
def files
|
|
22
|
+
return [] unless directory.present? && File.directory?(directory)
|
|
23
|
+
Dir[File.join(directory, '*')].inject([]) do |accum, val|
|
|
24
|
+
accum << { name: File.basename(val), directory: File.directory?(val)}
|
|
25
|
+
accum
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
end
|
|
@@ -38,9 +38,9 @@ Gem::Specification.new do |spec|
|
|
|
38
38
|
spec.add_dependency 'noid', '~> 0.6.6'
|
|
39
39
|
spec.add_dependency 'curationexperts-mailboxer', '0.10.3'
|
|
40
40
|
spec.add_dependency 'acts_as_follower', '0.1.1'
|
|
41
|
-
spec.add_dependency 'rmagick'
|
|
42
41
|
spec.add_dependency 'paperclip', '~> 3.4.0'
|
|
43
42
|
spec.add_dependency 'zipruby', '0.3.6'
|
|
43
|
+
spec.add_dependency 'hydra-derivatives', '~> 0.0.5'
|
|
44
44
|
# https://github.com/zdennis/activerecord-import/pull/79
|
|
45
45
|
#spec.add_dependency 'activerecord-import', '0.3.0' # 0.3.1 caused a bug in testing: "SQLite3::SQLException: near ",": syntax error: INSERT INTO..."
|
|
46
46
|
end
|
data/sufia.gemspec
CHANGED
|
@@ -14,7 +14,8 @@ Gem::Specification.new do |gem|
|
|
|
14
14
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
15
15
|
gem.name = "sufia"
|
|
16
16
|
gem.require_paths = ["lib"]
|
|
17
|
-
gem.version = version
|
|
17
|
+
gem.version = version
|
|
18
|
+
gem.license = 'APACHE2'
|
|
18
19
|
|
|
19
20
|
gem.add_dependency 'sufia-models', version
|
|
20
21
|
gem.add_dependency 'blacklight', '~> 4.0'
|
data/tasks/sufia-dev.rake
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sufia
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.
|
|
4
|
+
version: 3.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-
|
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: sufia-models
|
|
@@ -16,14 +16,14 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - '='
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 3.
|
|
19
|
+
version: 3.1.0
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - '='
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 3.
|
|
26
|
+
version: 3.1.0
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: blacklight
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -252,8 +252,6 @@ files:
|
|
|
252
252
|
- app/assets/stylesheets/fileupload/style.css
|
|
253
253
|
- app/assets/stylesheets/fileupload/thumbnail-scaling.css
|
|
254
254
|
- app/assets/stylesheets/generic_files.css
|
|
255
|
-
- app/assets/stylesheets/jquery-ui-1.8.1.custom.css
|
|
256
|
-
- app/assets/stylesheets/jquery-ui-1.8.23.custom.css
|
|
257
255
|
- app/assets/stylesheets/jquery-ui.css
|
|
258
256
|
- app/assets/stylesheets/reset_body.css
|
|
259
257
|
- app/assets/stylesheets/sufia.css.scss
|
|
@@ -285,6 +283,7 @@ files:
|
|
|
285
283
|
- app/jobs/content_restored_version_event_job.rb
|
|
286
284
|
- app/jobs/content_update_event_job.rb
|
|
287
285
|
- app/jobs/event_job.rb
|
|
286
|
+
- app/jobs/ingest_local_file_job.rb
|
|
288
287
|
- app/jobs/user_edit_profile_event_job.rb
|
|
289
288
|
- app/jobs/user_follow_event_job.rb
|
|
290
289
|
- app/jobs/user_unfollow_event_job.rb
|
|
@@ -403,6 +402,7 @@ files:
|
|
|
403
402
|
- app/views/generic_files/_field_display.html.erb
|
|
404
403
|
- app/views/generic_files/_field_form.html.erb
|
|
405
404
|
- app/views/generic_files/_groups_description.html.erb
|
|
405
|
+
- app/views/generic_files/_local_file_import.html.erb
|
|
406
406
|
- app/views/generic_files/_media_display.html.erb
|
|
407
407
|
- app/views/generic_files/_multiple_upload.html.erb
|
|
408
408
|
- app/views/generic_files/_permission.html.erb
|
|
@@ -428,6 +428,7 @@ files:
|
|
|
428
428
|
- app/views/generic_files/upload/_dropbox_chooser.html.erb
|
|
429
429
|
- app/views/generic_files/upload/_form.html.erb
|
|
430
430
|
- app/views/generic_files/upload/_form_fields.html.erb
|
|
431
|
+
- app/views/generic_files/upload/_local_file_import_chooser.html.erb
|
|
431
432
|
- app/views/generic_files/upload/_script_templates.html.erb
|
|
432
433
|
- app/views/generic_files/upload/_tos_checkbox.html.erb
|
|
433
434
|
- app/views/kaminari/blacklight/_first_page.html.erb
|
|
@@ -499,6 +500,8 @@ files:
|
|
|
499
500
|
- lib/sufia/controller.rb
|
|
500
501
|
- lib/sufia/dashboard_controller_behavior.rb
|
|
501
502
|
- lib/sufia/downloads_controller_behavior.rb
|
|
503
|
+
- lib/sufia/files_controller/local_ingest_behavior.rb
|
|
504
|
+
- lib/sufia/files_controller/upload_complete_behavior.rb
|
|
502
505
|
- lib/sufia/files_controller_behavior.rb
|
|
503
506
|
- lib/sufia/role_mapper.rb
|
|
504
507
|
- lib/sufia/single_use_error.rb
|
|
@@ -579,8 +582,12 @@ files:
|
|
|
579
582
|
- spec/fixtures/xls_fits.xml
|
|
580
583
|
- spec/fixtures/xml_fits.xml
|
|
581
584
|
- spec/helpers/generic_file_helper_spec.rb
|
|
585
|
+
- spec/helpers/render_constraints_helper_behavior_spec.rb
|
|
582
586
|
- spec/helpers/sufia_helper_spec.rb
|
|
587
|
+
- spec/jobs/import_url_job_spec.rb
|
|
588
|
+
- spec/jobs/ingest_local_file_job_spec.rb
|
|
583
589
|
- spec/lib/sufia/id_service_spec.rb
|
|
590
|
+
- spec/lib/sufia/upload_complete_behavior_spec.rb
|
|
584
591
|
- spec/models/audit_job_spec.rb
|
|
585
592
|
- spec/models/batch_spec.rb
|
|
586
593
|
- spec/models/batch_update_job_spec.rb
|
|
@@ -589,6 +596,7 @@ files:
|
|
|
589
596
|
- spec/models/event_jobs_spec.rb
|
|
590
597
|
- spec/models/file_content_datastream_spec.rb
|
|
591
598
|
- spec/models/fits_datastream_spec.rb
|
|
599
|
+
- spec/models/generic_file/actions_spec.rb
|
|
592
600
|
- spec/models/generic_file/web_form_spec.rb
|
|
593
601
|
- spec/models/generic_file_spec.rb
|
|
594
602
|
- spec/models/local_authority_spec.rb
|
|
@@ -640,22 +648,23 @@ files:
|
|
|
640
648
|
- sufia-models/lib/sufia/models/active_support/core_ext/marshal.rb
|
|
641
649
|
- sufia-models/lib/sufia/models/engine.rb
|
|
642
650
|
- sufia-models/lib/sufia/models/file_content.rb
|
|
643
|
-
- sufia-models/lib/sufia/models/file_content/extract_metadata.rb
|
|
644
651
|
- sufia-models/lib/sufia/models/file_content/versions.rb
|
|
645
652
|
- sufia-models/lib/sufia/models/generic_file.rb
|
|
646
653
|
- sufia-models/lib/sufia/models/generic_file/accessible_attributes.rb
|
|
647
654
|
- sufia-models/lib/sufia/models/generic_file/actions.rb
|
|
648
655
|
- sufia-models/lib/sufia/models/generic_file/audit.rb
|
|
649
656
|
- sufia-models/lib/sufia/models/generic_file/characterization.rb
|
|
657
|
+
- sufia-models/lib/sufia/models/generic_file/derivatives.rb
|
|
650
658
|
- sufia-models/lib/sufia/models/generic_file/export.rb
|
|
659
|
+
- sufia-models/lib/sufia/models/generic_file/mime_types.rb
|
|
651
660
|
- sufia-models/lib/sufia/models/generic_file/permissions.rb
|
|
652
661
|
- sufia-models/lib/sufia/models/generic_file/thumbnail.rb
|
|
653
662
|
- sufia-models/lib/sufia/models/generic_file/web_form.rb
|
|
654
663
|
- sufia-models/lib/sufia/models/id_service.rb
|
|
664
|
+
- sufia-models/lib/sufia/models/jobs/active_fedora_pid_based_job.rb
|
|
655
665
|
- sufia-models/lib/sufia/models/jobs/audit_job.rb
|
|
656
666
|
- sufia-models/lib/sufia/models/jobs/batch_update_job.rb
|
|
657
667
|
- sufia-models/lib/sufia/models/jobs/characterize_job.rb
|
|
658
|
-
- sufia-models/lib/sufia/models/jobs/ffmpeg_transcode_job.rb
|
|
659
668
|
- sufia-models/lib/sufia/models/jobs/import_url_job.rb
|
|
660
669
|
- sufia-models/lib/sufia/models/jobs/resolrize_job.rb
|
|
661
670
|
- sufia-models/lib/sufia/models/jobs/transcode_audio_job.rb
|
|
@@ -666,6 +675,7 @@ files:
|
|
|
666
675
|
- sufia-models/lib/sufia/models/resque.rb
|
|
667
676
|
- sufia-models/lib/sufia/models/solr_document_behavior.rb
|
|
668
677
|
- sufia-models/lib/sufia/models/user.rb
|
|
678
|
+
- sufia-models/lib/sufia/models/user_local_directory_behavior.rb
|
|
669
679
|
- sufia-models/lib/sufia/models/utils.rb
|
|
670
680
|
- sufia-models/lib/sufia/models/version.rb
|
|
671
681
|
- sufia-models/lib/tasks/resque.rake
|
|
@@ -707,7 +717,8 @@ files:
|
|
|
707
717
|
- vendor/assets/javascripts/video.js
|
|
708
718
|
- vendor/plugins/.gitkeep
|
|
709
719
|
homepage: ''
|
|
710
|
-
licenses:
|
|
720
|
+
licenses:
|
|
721
|
+
- APACHE2
|
|
711
722
|
metadata: {}
|
|
712
723
|
post_install_message:
|
|
713
724
|
rdoc_options: []
|
|
@@ -725,7 +736,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
725
736
|
version: '0'
|
|
726
737
|
requirements: []
|
|
727
738
|
rubyforge_project:
|
|
728
|
-
rubygems_version: 2.0.
|
|
739
|
+
rubygems_version: 2.0.5
|
|
729
740
|
signing_key:
|
|
730
741
|
specification_version: 4
|
|
731
742
|
summary: Sufia was extracted from ScholarSphere developed by Penn State University
|
|
@@ -800,8 +811,12 @@ test_files:
|
|
|
800
811
|
- spec/fixtures/xls_fits.xml
|
|
801
812
|
- spec/fixtures/xml_fits.xml
|
|
802
813
|
- spec/helpers/generic_file_helper_spec.rb
|
|
814
|
+
- spec/helpers/render_constraints_helper_behavior_spec.rb
|
|
803
815
|
- spec/helpers/sufia_helper_spec.rb
|
|
816
|
+
- spec/jobs/import_url_job_spec.rb
|
|
817
|
+
- spec/jobs/ingest_local_file_job_spec.rb
|
|
804
818
|
- spec/lib/sufia/id_service_spec.rb
|
|
819
|
+
- spec/lib/sufia/upload_complete_behavior_spec.rb
|
|
805
820
|
- spec/models/audit_job_spec.rb
|
|
806
821
|
- spec/models/batch_spec.rb
|
|
807
822
|
- spec/models/batch_update_job_spec.rb
|
|
@@ -810,6 +825,7 @@ test_files:
|
|
|
810
825
|
- spec/models/event_jobs_spec.rb
|
|
811
826
|
- spec/models/file_content_datastream_spec.rb
|
|
812
827
|
- spec/models/fits_datastream_spec.rb
|
|
828
|
+
- spec/models/generic_file/actions_spec.rb
|
|
813
829
|
- spec/models/generic_file/web_form_spec.rb
|
|
814
830
|
- spec/models/generic_file_spec.rb
|
|
815
831
|
- spec/models/local_authority_spec.rb
|