curation_concerns-models 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/LICENSE.md +177 -0
- data/README.md +42 -0
- data/Rakefile +1 -0
- data/app/actors/concerns/curation_concerns/manages_embargoes_actor.rb +99 -0
- data/app/actors/curation_concerns/base_actor.rb +90 -0
- data/app/actors/curation_concerns/generic_file_actor.rb +150 -0
- data/app/actors/curation_concerns/work_actor_behavior.rb +88 -0
- data/app/jobs/active_fedora_id_based_job.rb +22 -0
- data/app/jobs/active_fedora_pid_based_job.rb +6 -0
- data/app/jobs/audit_job.rb +58 -0
- data/app/jobs/characterize_job.rb +11 -0
- data/app/jobs/copy_permissions_job.rb +24 -0
- data/app/jobs/create_derivatives_job.rb +15 -0
- data/app/jobs/import_url_job.rb +56 -0
- data/app/jobs/ingest_local_file_job.rb +48 -0
- data/app/jobs/resolrize_job.rb +9 -0
- data/app/models/checksum_audit_log.rb +21 -0
- data/app/models/concerns/curation_concerns/ability.rb +34 -0
- data/app/models/concerns/curation_concerns/basic_metadata.rb +87 -0
- data/app/models/concerns/curation_concerns/collection_behavior.rb +47 -0
- data/app/models/concerns/curation_concerns/generic_file/belongs_to_works.rb +53 -0
- data/app/models/concerns/curation_concerns/generic_file/characterization.rb +89 -0
- data/app/models/concerns/curation_concerns/generic_file/content.rb +8 -0
- data/app/models/concerns/curation_concerns/generic_file/export.rb +343 -0
- data/app/models/concerns/curation_concerns/generic_file/full_text_indexing.rb +12 -0
- data/app/models/concerns/curation_concerns/generic_file/indexing.rb +14 -0
- data/app/models/concerns/curation_concerns/generic_file/versions.rb +16 -0
- data/app/models/concerns/curation_concerns/generic_file.rb +5 -0
- data/app/models/concerns/curation_concerns/generic_file_behavior.rb +44 -0
- data/app/models/concerns/curation_concerns/generic_work_behavior.rb +38 -0
- data/app/models/concerns/curation_concerns/has_representative.rb +14 -0
- data/app/models/concerns/curation_concerns/human_readable_type.rb +23 -0
- data/app/models/concerns/curation_concerns/permissions/readable.rb +19 -0
- data/app/models/concerns/curation_concerns/permissions/writable.rb +75 -0
- data/app/models/concerns/curation_concerns/permissions.rb +7 -0
- data/app/models/concerns/curation_concerns/serializers.rb +15 -0
- data/app/models/concerns/curation_concerns/solr_document_behavior.rb +135 -0
- data/app/models/concerns/curation_concerns/user.rb +65 -0
- data/app/models/concerns/curation_concerns/with_basic_metadata.rb +98 -0
- data/app/models/concerns/curation_concerns/with_generic_files.rb +29 -0
- data/app/models/curation_concerns/classify_concern.rb +47 -0
- data/app/models/curation_concerns/quick_classification_query.rb +31 -0
- data/app/models/datastreams/fits_datastream.rb +148 -0
- data/app/models/version_committer.rb +2 -0
- data/app/services/curation_concerns/characterization_service.rb +71 -0
- data/app/services/curation_concerns/full_text_extraction_service.rb +38 -0
- data/app/services/curation_concerns/generic_file_audit_service.rb +85 -0
- data/app/services/curation_concerns/generic_file_indexing_service.rb +14 -0
- data/app/services/curation_concerns/generic_work_indexing_service.rb +16 -0
- data/app/services/curation_concerns/noid.rb +23 -0
- data/app/services/curation_concerns/repository_audit_service.rb +9 -0
- data/app/services/curation_concerns/versioning_service.rb +27 -0
- data/config/locales/curation_concerns.en.yml +6 -0
- data/curation_concerns-models.gemspec +34 -0
- data/lib/curation_concerns/messages.rb +66 -0
- data/lib/curation_concerns/models/engine.rb +61 -0
- data/lib/curation_concerns/models/resque.rb +36 -0
- data/lib/curation_concerns/models/utils.rb +22 -0
- data/lib/curation_concerns/models/version.rb +5 -0
- data/lib/curation_concerns/models.rb +32 -0
- data/lib/generators/curation_concerns/models/abstract_migration_generator.rb +30 -0
- data/lib/generators/curation_concerns/models/clamav_generator.rb +19 -0
- data/lib/generators/curation_concerns/models/fulltext_generator.rb +28 -0
- data/lib/generators/curation_concerns/models/install_generator.rb +70 -0
- data/lib/generators/curation_concerns/models/templates/app/models/collection.rb +4 -0
- data/lib/generators/curation_concerns/models/templates/app/models/generic_file.rb +4 -0
- data/lib/generators/curation_concerns/models/templates/config/clamav.rb +1 -0
- data/lib/generators/curation_concerns/models/templates/config/curation_concerns.rb +123 -0
- data/lib/generators/curation_concerns/models/templates/config/mime_types.rb +6 -0
- data/lib/generators/curation_concerns/models/templates/config/redis.yml +9 -0
- data/lib/generators/curation_concerns/models/templates/config/redis_config.rb +32 -0
- data/lib/generators/curation_concerns/models/templates/config/resque-pool.yml +1 -0
- data/lib/generators/curation_concerns/models/templates/config/resque_admin.rb +10 -0
- data/lib/generators/curation_concerns/models/templates/config/resque_config.rb +5 -0
- data/lib/generators/curation_concerns/models/templates/migrations/create_checksum_audit_logs.rb +19 -0
- data/lib/generators/curation_concerns/models/templates/migrations/create_version_committers.rb +15 -0
- data/lib/tasks/curation_concerns-models_tasks.rake +75 -0
- data/lib/tasks/migrate.rake +13 -0
- data/lib/tasks/resque.rake +13 -0
- data/lib/tasks/solr_reindex.rake +8 -0
- metadata +282 -0
@@ -0,0 +1,123 @@
|
|
1
|
+
CurationConcerns.config do |config|
|
2
|
+
config.fits_to_desc_mapping = {
|
3
|
+
file_title: :title,
|
4
|
+
file_author: :creator
|
5
|
+
}
|
6
|
+
|
7
|
+
config.max_days_between_audits = 7
|
8
|
+
|
9
|
+
config.cc_licenses = {
|
10
|
+
'Attribution 3.0 United States' => 'http://creativecommons.org/licenses/by/3.0/us/',
|
11
|
+
'Attribution-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-sa/3.0/us/',
|
12
|
+
'Attribution-NonCommercial 3.0 United States' => 'http://creativecommons.org/licenses/by-nc/3.0/us/',
|
13
|
+
'Attribution-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nd/3.0/us/',
|
14
|
+
'Attribution-NonCommercial-NoDerivs 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-nd/3.0/us/',
|
15
|
+
'Attribution-NonCommercial-ShareAlike 3.0 United States' => 'http://creativecommons.org/licenses/by-nc-sa/3.0/us/',
|
16
|
+
'Public Domain Mark 1.0' => 'http://creativecommons.org/publicdomain/mark/1.0/',
|
17
|
+
'CC0 1.0 Universal' => 'http://creativecommons.org/publicdomain/zero/1.0/',
|
18
|
+
'All rights reserved' => 'All rights reserved'
|
19
|
+
}
|
20
|
+
|
21
|
+
config.cc_licenses_reverse = Hash[*config.cc_licenses.to_a.flatten.reverse]
|
22
|
+
|
23
|
+
config.resource_types = {
|
24
|
+
"Article" => "Article",
|
25
|
+
"Audio" => "Audio",
|
26
|
+
"Book" => "Book",
|
27
|
+
"Capstone Project" => "Capstone Project",
|
28
|
+
"Conference Proceeding" => "Conference Proceeding",
|
29
|
+
"Dataset" => "Dataset",
|
30
|
+
"Dissertation" => "Dissertation",
|
31
|
+
"Image" => "Image",
|
32
|
+
"Journal" => "Journal",
|
33
|
+
"Map or Cartographic Material" => "Map or Cartographic Material",
|
34
|
+
"Masters Thesis" => "Masters Thesis",
|
35
|
+
"Part of Book" => "Part of Book",
|
36
|
+
"Poster" => "Poster",
|
37
|
+
"Presentation" => "Presentation",
|
38
|
+
"Project" => "Project",
|
39
|
+
"Report" => "Report",
|
40
|
+
"Research Paper" => "Research Paper",
|
41
|
+
"Software or Program Code" => "Software or Program Code",
|
42
|
+
"Video" => "Video",
|
43
|
+
"Other" => "Other",
|
44
|
+
}
|
45
|
+
|
46
|
+
config.resource_types_to_schema = {
|
47
|
+
"Article" => "http://schema.org/Article",
|
48
|
+
"Audio" => "http://schema.org/AudioObject",
|
49
|
+
"Book" => "http://schema.org/Book",
|
50
|
+
"Capstone Project" => "http://schema.org/CreativeWork",
|
51
|
+
"Conference Proceeding" => "http://schema.org/ScholarlyArticle",
|
52
|
+
"Dataset" => "http://schema.org/Dataset",
|
53
|
+
"Dissertation" => "http://schema.org/ScholarlyArticle",
|
54
|
+
"Image" => "http://schema.org/ImageObject",
|
55
|
+
"Journal" => "http://schema.org/CreativeWork",
|
56
|
+
"Map or Cartographic Material" => "http://schema.org/Map",
|
57
|
+
"Masters Thesis" => "http://schema.org/ScholarlyArticle",
|
58
|
+
"Part of Book" => "http://schema.org/Book",
|
59
|
+
"Poster" => "http://schema.org/CreativeWork",
|
60
|
+
"Presentation" => "http://schema.org/CreativeWork",
|
61
|
+
"Project" => "http://schema.org/CreativeWork",
|
62
|
+
"Report" => "http://schema.org/CreativeWork",
|
63
|
+
"Research Paper" => "http://schema.org/ScholarlyArticle",
|
64
|
+
"Software or Program Code" => "http://schema.org/Code",
|
65
|
+
"Video" => "http://schema.org/VideoObject",
|
66
|
+
"Other" => "http://schema.org/CreativeWork",
|
67
|
+
}
|
68
|
+
|
69
|
+
config.permission_levels = {
|
70
|
+
"Choose Access"=>"none",
|
71
|
+
"View/Download" => "read",
|
72
|
+
"Edit" => "edit"
|
73
|
+
}
|
74
|
+
|
75
|
+
config.owner_permission_levels = {
|
76
|
+
"Edit" => "edit"
|
77
|
+
}
|
78
|
+
|
79
|
+
config.queue = CurationConcerns::Resque::Queue
|
80
|
+
|
81
|
+
# Enable displaying usage statistics in the UI
|
82
|
+
# Defaults to FALSE
|
83
|
+
# Requires a Google Analytics id and OAuth2 keyfile. See README for more info
|
84
|
+
config.analytics = false
|
85
|
+
|
86
|
+
# Specify a Google Analytics tracking ID to gather usage statistics
|
87
|
+
# config.google_analytics_id = 'UA-99999999-1'
|
88
|
+
|
89
|
+
# Specify a date you wish to start collecting Google Analytic statistics for.
|
90
|
+
# config.analytic_start_date = DateTime.new(2014,9,10)
|
91
|
+
|
92
|
+
# Where to store tempfiles, leave blank for the system temp directory (e.g. /tmp)
|
93
|
+
# config.temp_file_base = '/home/developer1'
|
94
|
+
|
95
|
+
# Specify the form of hostpath to be used in Endnote exports
|
96
|
+
# config.persistent_hostpath = 'http://localhost/files/'
|
97
|
+
|
98
|
+
# If you have ffmpeg installed and want to transcode audio and video uncomment this line
|
99
|
+
# config.enable_ffmpeg = true
|
100
|
+
|
101
|
+
# CurationConcerns uses NOIDs for files and collections instead of Fedora UUIDs
|
102
|
+
# where NOID = 10-character string and UUID = 32-character string w/ hyphens
|
103
|
+
# config.enable_noids = true
|
104
|
+
|
105
|
+
# Specify a different template for your repository's NOID IDs
|
106
|
+
# config.noid_template = ".reeddeeddk"
|
107
|
+
|
108
|
+
# Specify the prefix for Redis keys:
|
109
|
+
# config.redis_namespace = "curation_concerns"
|
110
|
+
|
111
|
+
# Specify the path to the file characterization tool:
|
112
|
+
# config.fits_path = "fits.sh"
|
113
|
+
|
114
|
+
# Specify a date you wish to start collecting Google Analytic statistics for.
|
115
|
+
# Leaving it blank will set the start date to when ever the file was uploaded by
|
116
|
+
# NOTE: if you have always sent analytics to GA for downloads and page views leave this commented out
|
117
|
+
# config.analytic_start_date = DateTime.new(2014,9,10)
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
end
|
122
|
+
|
123
|
+
Date::DATE_FORMATS[:standard] = "%m/%d/%Y"
|
@@ -0,0 +1,6 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
# Add new mime types for use in respond_to blocks:
|
4
|
+
# Mime::Type.register "text/richtext", :rtf
|
5
|
+
# Mime::Type.register_alias "text/html", :iphone
|
6
|
+
Mime::Type.register 'application/x-endnote-refer', :endnote
|
@@ -0,0 +1,32 @@
|
|
1
|
+
if defined?(PhusionPassenger)
|
2
|
+
PhusionPassenger.on_event(:starting_worker_process) do |forked|
|
3
|
+
# We're in smart spawning mode.
|
4
|
+
if forked
|
5
|
+
# Re-establish redis connection
|
6
|
+
require 'redis'
|
7
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
8
|
+
|
9
|
+
# The important two lines
|
10
|
+
$redis.client.disconnect if $redis
|
11
|
+
$redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
|
12
|
+
Resque.redis = $redis
|
13
|
+
Resque.redis.client.reconnect if Resque.redis
|
14
|
+
end
|
15
|
+
end
|
16
|
+
else
|
17
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
18
|
+
$redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true) rescue nil
|
19
|
+
end
|
20
|
+
|
21
|
+
|
22
|
+
# Code borrowed from Obie's Redis patterns talk at RailsConf'12
|
23
|
+
Nest.class_eval do
|
24
|
+
def initialize(key, redis=$redis)
|
25
|
+
super(key.to_param)
|
26
|
+
@redis = redis
|
27
|
+
end
|
28
|
+
|
29
|
+
def [](key)
|
30
|
+
self.class.new("#{self}:#{key.to_param}", @redis)
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
"*": 1
|
@@ -0,0 +1,10 @@
|
|
1
|
+
module CurationConcerns
|
2
|
+
class ResqueAdmin
|
3
|
+
def self.matches?(request)
|
4
|
+
current_user = request.env['warden'].user
|
5
|
+
return false if current_user.blank?
|
6
|
+
# TODO code a group here that makes sense
|
7
|
+
#current_user.groups.include? 'umg/up.dlt.scholarsphere-admin'
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1,5 @@
|
|
1
|
+
config = YAML::load(ERB.new(IO.read(File.join(Rails.root, 'config', 'redis.yml'))).result)[Rails.env].with_indifferent_access
|
2
|
+
Resque.redis = Redis.new(host: config[:host], port: config[:port], thread_safe: true)
|
3
|
+
|
4
|
+
Resque.inline = Rails.env.test?
|
5
|
+
Resque.redis.namespace = "#{CurationConcerns.config.redis_namespace}:#{Rails.env}"
|
data/lib/generators/curation_concerns/models/templates/migrations/create_checksum_audit_logs.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
class CreateChecksumAuditLogs < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :checksum_audit_logs do |t|
|
4
|
+
t.string :generic_file_id
|
5
|
+
t.string :file_id
|
6
|
+
t.string :version
|
7
|
+
t.integer :pass
|
8
|
+
t.string :expected_result
|
9
|
+
t.string :actual_result
|
10
|
+
t.timestamps
|
11
|
+
end
|
12
|
+
add_index :checksum_audit_logs, [:generic_file_id, :file_id], name: 'by_generic_file_id_and_file_id', order: {created_at: "DESC" }
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
remove_index(:checksum_audit_logs, name: 'by_generic_file_id_and_file_id')
|
17
|
+
drop_table :checksum_audit_logs
|
18
|
+
end
|
19
|
+
end
|
data/lib/generators/curation_concerns/models/templates/migrations/create_version_committers.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
class CreateVersionCommitters < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :version_committers do |t|
|
4
|
+
t.string :obj_id
|
5
|
+
t.string :datastream_id
|
6
|
+
t.string :version_id
|
7
|
+
t.string :committer_login
|
8
|
+
t.timestamps
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.down
|
13
|
+
drop_table :version_committers
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
namespace :curation_concerns do
|
4
|
+
namespace :jetty do
|
5
|
+
|
6
|
+
FULLTEXT_JARS = %w(
|
7
|
+
org/apache/james/apache-mime4j-core/0.7.2/apache-mime4j-core-0.7.2.jar
|
8
|
+
org/apache/james/apache-mime4j-dom/0.7.2/apache-mime4j-dom-0.7.2.jar
|
9
|
+
org/apache/solr/solr-cell/4.0.0/solr-cell-4.0.0.jar
|
10
|
+
org/bouncycastle/bcmail-jdk15/1.45/bcmail-jdk15-1.45.jar
|
11
|
+
org/bouncycastle/bcprov-jdk15/1.45/bcprov-jdk15-1.45.jar
|
12
|
+
de/l3s/boilerpipe/boilerpipe/1.1.0/boilerpipe-1.1.0.jar
|
13
|
+
org/apache/commons/commons-compress/1.4.1/commons-compress-1.4.1.jar
|
14
|
+
dom4j/dom4j/1.6.1/dom4j-1.6.1.jar
|
15
|
+
org/apache/pdfbox/fontbox/1.7.0/fontbox-1.7.0.jar
|
16
|
+
com/ibm/icu/icu4j/49.1/icu4j-49.1.jar
|
17
|
+
com/googlecode/mp4parser/isoparser/1.0-RC-1/isoparser-1.0-RC-1.jar
|
18
|
+
jdom/jdom/1.0/jdom-1.0.jar
|
19
|
+
org/apache/pdfbox/jempbox/1.7.0/jempbox-1.7.0.jar
|
20
|
+
com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar
|
21
|
+
com/drewnoakes/metadata-extractor/2.4.0-beta-1/metadata-extractor-2.4.0-beta-1.jar
|
22
|
+
edu/ucar/netcdf/4.2-min/netcdf-4.2-min.jar
|
23
|
+
org/apache/pdfbox/pdfbox/1.7.0/pdfbox-1.7.0.jar
|
24
|
+
org/apache/poi/poi/3.8/poi-3.8.jar
|
25
|
+
org/apache/poi/poi-ooxml/3.8/poi-ooxml-3.8.jar
|
26
|
+
org/apache/poi/poi-ooxml-schemas/3.8/poi-ooxml-schemas-3.8.jar
|
27
|
+
org/apache/poi/poi-scratchpad/3.8/poi-scratchpad-3.8.jar
|
28
|
+
rome/rome/0.9/rome-0.9.jar
|
29
|
+
org/ccil/cowan/tagsoup/tagsoup/1.2.1/tagsoup-1.2.1.jar
|
30
|
+
org/apache/tika/tika-core/1.2/tika-core-1.2.jar
|
31
|
+
org/apache/tika/tika-parsers/1.2/tika-parsers-1.2.jar
|
32
|
+
org/gagravarr/vorbis-java-core/0.1/vorbis-java-core-0.1.jar
|
33
|
+
org/gagravarr/vorbis-java-tika/0.1/vorbis-java-tika-0.1.jar
|
34
|
+
xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar
|
35
|
+
org/apache/xmlbeans/xmlbeans/2.3.0/xmlbeans-2.3.0.jar
|
36
|
+
org/tukaani/xz/1.0/xz-1.0.jar
|
37
|
+
org/aspectj/aspectjrt/1.8.5/aspectjrt-1.8.5.jar
|
38
|
+
)
|
39
|
+
|
40
|
+
desc 'Configure jetty with full-text indexing'
|
41
|
+
task config: :download_jars do
|
42
|
+
Rake::Task['jetty:config'].invoke
|
43
|
+
end
|
44
|
+
|
45
|
+
desc 'Download Solr full-text extraction jars'
|
46
|
+
task :download_jars do
|
47
|
+
puts "Downloading full-text jars from maven.org ..."
|
48
|
+
fulltext_dir = 'jetty/solr/lib/contrib/extraction/lib'
|
49
|
+
FileUtils.mkdir_p(fulltext_dir) unless File.directory?(fulltext_dir)
|
50
|
+
Dir.chdir(fulltext_dir) do
|
51
|
+
FULLTEXT_JARS.each do |jar|
|
52
|
+
destination = jar.split('/').last
|
53
|
+
download_from_maven(jar, destination) unless File.exists?(destination)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
def download_from_maven url, dst
|
61
|
+
full_url = '/remotecontent?filepath=' + url
|
62
|
+
file = File.open(dst, "wb")
|
63
|
+
endpoint = Net::HTTP.new('search.maven.org', 443)
|
64
|
+
endpoint.use_ssl = true
|
65
|
+
endpoint.start do |http|
|
66
|
+
puts "Fetching #{full_url}"
|
67
|
+
begin
|
68
|
+
http.request_get(full_url) do |resp|
|
69
|
+
resp.read_body { |segment| file.write(segment) }
|
70
|
+
end
|
71
|
+
ensure
|
72
|
+
file.close
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
namespace :curation_concerns do
|
2
|
+
namespace :migrate do
|
3
|
+
|
4
|
+
desc "Migrate audit logs"
|
5
|
+
task audit_logs: :environment do
|
6
|
+
ChecksumAuditLog.all.each do |cs|
|
7
|
+
cs.generic_file_id = cs.generic_file_id.delete "#{CurationConcerns.config.redis_namespace}:"
|
8
|
+
cs.save
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'resque/pool/tasks'
|
2
|
+
|
3
|
+
# This provides access to the Rails env within all Resque workers
|
4
|
+
task 'resque:setup' => :environment
|
5
|
+
|
6
|
+
# Set up resque-pool
|
7
|
+
task 'resque:pool:setup' do
|
8
|
+
ActiveRecord::Base.connection.disconnect!
|
9
|
+
Resque::Pool.after_prefork do |job|
|
10
|
+
ActiveRecord::Base.establish_connection
|
11
|
+
Resque.redis.client.reconnect
|
12
|
+
end
|
13
|
+
end
|
metadata
ADDED
@@ -0,0 +1,282 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: curation_concerns-models
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Justin Coyne
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: active_attr
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: nest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: hydra-collections
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 6.0.0.alpha
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 6.0.0.alpha
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: hydra-head
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 9.2.2
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 9.2.2
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: hydra-works
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.1'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.1'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: active-fedora
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 9.3.0
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 9.3.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: active_fedora-noid
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 1.0.2
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 1.0.2
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: resque
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.23'
|
118
|
+
type: :runtime
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.23'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: resque-pool
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0.3'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0.3'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: bundler
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.6'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.6'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: rake
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
description: An extensible repository data-model with works and and many attached
|
168
|
+
files
|
169
|
+
email:
|
170
|
+
- justin@curationexperts.com
|
171
|
+
executables: []
|
172
|
+
extensions: []
|
173
|
+
extra_rdoc_files: []
|
174
|
+
files:
|
175
|
+
- ".gitignore"
|
176
|
+
- Gemfile
|
177
|
+
- LICENSE.md
|
178
|
+
- README.md
|
179
|
+
- Rakefile
|
180
|
+
- app/actors/concerns/curation_concerns/manages_embargoes_actor.rb
|
181
|
+
- app/actors/curation_concerns/base_actor.rb
|
182
|
+
- app/actors/curation_concerns/generic_file_actor.rb
|
183
|
+
- app/actors/curation_concerns/work_actor_behavior.rb
|
184
|
+
- app/jobs/active_fedora_id_based_job.rb
|
185
|
+
- app/jobs/active_fedora_pid_based_job.rb
|
186
|
+
- app/jobs/audit_job.rb
|
187
|
+
- app/jobs/characterize_job.rb
|
188
|
+
- app/jobs/copy_permissions_job.rb
|
189
|
+
- app/jobs/create_derivatives_job.rb
|
190
|
+
- app/jobs/import_url_job.rb
|
191
|
+
- app/jobs/ingest_local_file_job.rb
|
192
|
+
- app/jobs/resolrize_job.rb
|
193
|
+
- app/models/checksum_audit_log.rb
|
194
|
+
- app/models/concerns/curation_concerns/ability.rb
|
195
|
+
- app/models/concerns/curation_concerns/basic_metadata.rb
|
196
|
+
- app/models/concerns/curation_concerns/collection_behavior.rb
|
197
|
+
- app/models/concerns/curation_concerns/generic_file.rb
|
198
|
+
- app/models/concerns/curation_concerns/generic_file/belongs_to_works.rb
|
199
|
+
- app/models/concerns/curation_concerns/generic_file/characterization.rb
|
200
|
+
- app/models/concerns/curation_concerns/generic_file/content.rb
|
201
|
+
- app/models/concerns/curation_concerns/generic_file/export.rb
|
202
|
+
- app/models/concerns/curation_concerns/generic_file/full_text_indexing.rb
|
203
|
+
- app/models/concerns/curation_concerns/generic_file/indexing.rb
|
204
|
+
- app/models/concerns/curation_concerns/generic_file/versions.rb
|
205
|
+
- app/models/concerns/curation_concerns/generic_file_behavior.rb
|
206
|
+
- app/models/concerns/curation_concerns/generic_work_behavior.rb
|
207
|
+
- app/models/concerns/curation_concerns/has_representative.rb
|
208
|
+
- app/models/concerns/curation_concerns/human_readable_type.rb
|
209
|
+
- app/models/concerns/curation_concerns/permissions.rb
|
210
|
+
- app/models/concerns/curation_concerns/permissions/readable.rb
|
211
|
+
- app/models/concerns/curation_concerns/permissions/writable.rb
|
212
|
+
- app/models/concerns/curation_concerns/serializers.rb
|
213
|
+
- app/models/concerns/curation_concerns/solr_document_behavior.rb
|
214
|
+
- app/models/concerns/curation_concerns/user.rb
|
215
|
+
- app/models/concerns/curation_concerns/with_basic_metadata.rb
|
216
|
+
- app/models/concerns/curation_concerns/with_generic_files.rb
|
217
|
+
- app/models/curation_concerns/classify_concern.rb
|
218
|
+
- app/models/curation_concerns/quick_classification_query.rb
|
219
|
+
- app/models/datastreams/fits_datastream.rb
|
220
|
+
- app/models/version_committer.rb
|
221
|
+
- app/services/curation_concerns/characterization_service.rb
|
222
|
+
- app/services/curation_concerns/full_text_extraction_service.rb
|
223
|
+
- app/services/curation_concerns/generic_file_audit_service.rb
|
224
|
+
- app/services/curation_concerns/generic_file_indexing_service.rb
|
225
|
+
- app/services/curation_concerns/generic_work_indexing_service.rb
|
226
|
+
- app/services/curation_concerns/noid.rb
|
227
|
+
- app/services/curation_concerns/repository_audit_service.rb
|
228
|
+
- app/services/curation_concerns/versioning_service.rb
|
229
|
+
- config/locales/curation_concerns.en.yml
|
230
|
+
- curation_concerns-models.gemspec
|
231
|
+
- lib/curation_concerns/messages.rb
|
232
|
+
- lib/curation_concerns/models.rb
|
233
|
+
- lib/curation_concerns/models/engine.rb
|
234
|
+
- lib/curation_concerns/models/resque.rb
|
235
|
+
- lib/curation_concerns/models/utils.rb
|
236
|
+
- lib/curation_concerns/models/version.rb
|
237
|
+
- lib/generators/curation_concerns/models/abstract_migration_generator.rb
|
238
|
+
- lib/generators/curation_concerns/models/clamav_generator.rb
|
239
|
+
- lib/generators/curation_concerns/models/fulltext_generator.rb
|
240
|
+
- lib/generators/curation_concerns/models/install_generator.rb
|
241
|
+
- lib/generators/curation_concerns/models/templates/app/models/collection.rb
|
242
|
+
- lib/generators/curation_concerns/models/templates/app/models/generic_file.rb
|
243
|
+
- lib/generators/curation_concerns/models/templates/config/clamav.rb
|
244
|
+
- lib/generators/curation_concerns/models/templates/config/curation_concerns.rb
|
245
|
+
- lib/generators/curation_concerns/models/templates/config/mime_types.rb
|
246
|
+
- lib/generators/curation_concerns/models/templates/config/redis.yml
|
247
|
+
- lib/generators/curation_concerns/models/templates/config/redis_config.rb
|
248
|
+
- lib/generators/curation_concerns/models/templates/config/resque-pool.yml
|
249
|
+
- lib/generators/curation_concerns/models/templates/config/resque_admin.rb
|
250
|
+
- lib/generators/curation_concerns/models/templates/config/resque_config.rb
|
251
|
+
- lib/generators/curation_concerns/models/templates/migrations/create_checksum_audit_logs.rb
|
252
|
+
- lib/generators/curation_concerns/models/templates/migrations/create_version_committers.rb
|
253
|
+
- lib/tasks/curation_concerns-models_tasks.rake
|
254
|
+
- lib/tasks/migrate.rake
|
255
|
+
- lib/tasks/resque.rake
|
256
|
+
- lib/tasks/solr_reindex.rake
|
257
|
+
homepage: ''
|
258
|
+
licenses:
|
259
|
+
- APACHE2
|
260
|
+
metadata: {}
|
261
|
+
post_install_message:
|
262
|
+
rdoc_options: []
|
263
|
+
require_paths:
|
264
|
+
- lib
|
265
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
266
|
+
requirements:
|
267
|
+
- - ">="
|
268
|
+
- !ruby/object:Gem::Version
|
269
|
+
version: '0'
|
270
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
271
|
+
requirements:
|
272
|
+
- - ">="
|
273
|
+
- !ruby/object:Gem::Version
|
274
|
+
version: '0'
|
275
|
+
requirements: []
|
276
|
+
rubyforge_project:
|
277
|
+
rubygems_version: 2.4.5
|
278
|
+
signing_key:
|
279
|
+
specification_version: 4
|
280
|
+
summary: Simple institutional repository models for Hydra
|
281
|
+
test_files: []
|
282
|
+
has_rdoc:
|