sufia 4.0.0 → 4.0.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/README.md +31 -4
- data/SUFIA_VERSION +1 -1
- data/app/assets/javascripts/sufia.js +1 -9
- data/app/assets/javascripts/sufia/batch_edit.js +3 -3
- data/app/assets/javascripts/sufia/multiForm.js +4 -2
- data/app/assets/javascripts/sufia/{single_use_link.js → single_use_link.js.erb} +1 -1
- data/app/assets/javascripts/sufia/tagcloud.js +12 -0
- data/app/assets/stylesheets/sufia.css.scss +3 -12
- data/app/assets/stylesheets/{batch-edit.css.scss → sufia/_batch-edit.scss} +0 -0
- data/app/assets/stylesheets/sufia/_buttons.scss +8 -0
- data/app/assets/stylesheets/{catalog.css.scss → sufia/_catalog.scss} +0 -0
- data/app/assets/stylesheets/{collections.css.scss → sufia/_collections.scss} +0 -0
- data/app/assets/stylesheets/sufia/_dashboard.scss +112 -0
- data/app/assets/stylesheets/{featured.css.scss → sufia/_featured.scss} +0 -0
- data/app/assets/stylesheets/{file-listing.css.scss → sufia/_file-listing.scss} +0 -0
- data/app/assets/stylesheets/{header.css.scss → sufia/_header.scss} +0 -0
- data/app/assets/stylesheets/{home-page.css.scss → sufia/_home-page.scss} +0 -0
- data/app/assets/stylesheets/sufia/_settings.scss +37 -0
- data/app/assets/stylesheets/{styles.css.scss → sufia/_styles.scss} +1 -1
- data/app/assets/stylesheets/{tagcloud.css → sufia/_tagcloud.scss} +0 -0
- data/app/assets/stylesheets/{usage-stats.css → sufia/_usage-stats.scss} +0 -0
- data/app/controllers/concerns/sufia/controller.rb +1 -1
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +1 -1
- data/app/helpers/sufia/records_helper_behavior.rb +13 -7
- data/app/views/batch/_metadata.html.erb +3 -3
- data/app/views/collections/_form_for_select_collection.html.erb +7 -7
- data/app/views/dashboard/_index_partials/_contents.html.erb +10 -6
- data/app/views/dashboard/_index_partials/_heading_actions.html.erb +16 -8
- data/app/views/dashboard/_index_partials/_heading_greetings.html.erb +3 -3
- data/app/views/dashboard/_index_partials/_stats.html.erb +22 -20
- data/app/views/dashboard/_index_partials/_user_info.html.erb +15 -15
- data/app/views/dashboard/index.html.erb +6 -10
- data/app/views/error/401.html.erb +1 -1
- data/app/views/error/404.html.erb +1 -1
- data/app/views/error/single_use_error.html.erb +1 -1
- data/app/views/generic_files/_permission_form.html.erb +2 -2
- data/app/views/homepage/_home_content.html.erb +3 -3
- data/app/views/layouts/error.html.erb +1 -1
- data/app/views/layouts/homepage.html.erb +1 -1
- data/app/views/layouts/sufia-dashboard.html.erb +9 -11
- data/app/views/layouts/sufia-one-column.html.erb +1 -1
- data/app/views/layouts/sufia-two-column.html.erb +1 -1
- data/app/views/mailbox/_notifications.html.erb +5 -4
- data/app/views/my/_facets.html.erb +1 -1
- data/config/locales/sufia.en.yml +24 -1
- data/fedora_conf/conf/development/fedora.fcfg +1 -1
- data/fedora_conf/conf/test/fedora.fcfg +1 -1
- data/lib/sufia.rb +4 -0
- data/lib/sufia/version.rb +1 -1
- data/spec/controllers/downloads_controller_spec.rb +1 -1
- data/spec/controllers/my/files_controller_spec.rb +26 -5
- data/spec/helpers/records_helper_spec.rb +2 -2
- data/spec/jobs/import_url_job_spec.rb +5 -2
- data/spec/models/file_usage_spec.rb +53 -1
- data/spec/views/dashboard/index_spec.rb +8 -8
- data/sufia-models/app/actors/sufia/generic_file/actor.rb +8 -1
- data/sufia-models/app/jobs/import_url_job.rb +1 -1
- data/sufia-models/app/models/concerns/sufia/generic_file/audit.rb +16 -12
- data/sufia-models/app/models/file_usage.rb +4 -2
- data/sufia-models/lib/generators/sufia/models/install_generator.rb +1 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/resque-pool.yml +1 -0
- data/sufia-models/lib/generators/sufia/models/templates/config/sufia.rb +8 -0
- data/sufia-models/lib/sufia/models/engine.rb +4 -0
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/tasks/sufia-dev.rake +1 -0
- metadata +20 -16
- data/app/assets/stylesheets/settings.css.scss +0 -6
data/lib/sufia/version.rb
CHANGED
|
@@ -33,7 +33,7 @@ describe DownloadsController do
|
|
|
33
33
|
it "should return requested datastreams" do
|
|
34
34
|
controller.stub(:render) # send_data calls render internally
|
|
35
35
|
expected_content = ActiveFedora::Base.find("sufia:test1", cast: true).descMetadata.content
|
|
36
|
-
controller.
|
|
36
|
+
expect(controller).to receive(:send_file_headers!).with(filename: 'descMetadata', disposition: 'inline', type: 'application/n-triples')
|
|
37
37
|
get "show", id: "test1", datastream_id: "descMetadata"
|
|
38
38
|
response.body.should == expected_content
|
|
39
39
|
response.should be_success
|
|
@@ -14,7 +14,7 @@ describe My::FilesController do
|
|
|
14
14
|
|
|
15
15
|
let(:my_collection) do
|
|
16
16
|
Collection.new(title: 'test collection').tap do |c|
|
|
17
|
-
c.apply_depositor_metadata(
|
|
17
|
+
c.apply_depositor_metadata(user.user_key)
|
|
18
18
|
c.save!
|
|
19
19
|
end
|
|
20
20
|
end
|
|
@@ -22,15 +22,17 @@ describe My::FilesController do
|
|
|
22
22
|
let(:shared_file) do
|
|
23
23
|
FactoryGirl.build(:generic_file).tap do |r|
|
|
24
24
|
r.apply_depositor_metadata FactoryGirl.create(:user)
|
|
25
|
-
r.edit_users += [
|
|
25
|
+
r.edit_users += [user.user_key]
|
|
26
26
|
r.save!
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
+
let(:user) { FactoryGirl.find_or_create(:archivist) }
|
|
31
|
+
|
|
32
|
+
|
|
30
33
|
before do
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
@my_file = FactoryGirl.create(:generic_file, depositor: @user)
|
|
34
|
+
sign_in user
|
|
35
|
+
@my_file = FactoryGirl.create(:generic_file, depositor: user)
|
|
34
36
|
@my_collection = my_collection
|
|
35
37
|
@shared_file = shared_file
|
|
36
38
|
@unrelated_file = FactoryGirl.create(:generic_file, depositor: FactoryGirl.create(:user))
|
|
@@ -65,4 +67,23 @@ describe My::FilesController do
|
|
|
65
67
|
expect(assigns[:document_list].map(&:id)).to_not include(@wrong_type.id)
|
|
66
68
|
end
|
|
67
69
|
|
|
70
|
+
describe "batch processing" do
|
|
71
|
+
include Sufia::Messages
|
|
72
|
+
let (:batch_noid) {"batch_noid"}
|
|
73
|
+
let (:batch_noid2) {"batch_noid2"}
|
|
74
|
+
let (:batch) {double}
|
|
75
|
+
|
|
76
|
+
before do
|
|
77
|
+
allow(batch).to receive(:noid).and_return(batch_noid)
|
|
78
|
+
User.batchuser().send_message(user, single_success(batch_noid, batch), success_subject, sanitize_text = false)
|
|
79
|
+
User.batchuser().send_message(user, multiple_success(batch_noid2, [batch]), success_subject, sanitize_text = false)
|
|
80
|
+
get :index
|
|
81
|
+
end
|
|
82
|
+
it "gets batches that are complete" do
|
|
83
|
+
expect(assigns(:batches).count).to eq(2)
|
|
84
|
+
expect(assigns(:batches)).to include("ss-"+batch_noid)
|
|
85
|
+
expect(assigns(:batches)).to include("ss-"+batch_noid2)
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
68
89
|
end
|
|
@@ -2,10 +2,10 @@ require 'spec_helper'
|
|
|
2
2
|
|
|
3
3
|
describe RecordsHelper do
|
|
4
4
|
let(:adder) {
|
|
5
|
-
"<button class=\"adder btn\" id=\"additional_test_submit\" name=\"additional_test\"><span aria-hidden=\"true\"
|
|
5
|
+
"<button class=\"adder btn\" id=\"additional_test_submit\" name=\"additional_test\"><span aria-hidden=\"true\"><i class=\"glyphicon glyphicon-plus\"></i></span><span class=\"sr-only\">add another test</span></button>"
|
|
6
6
|
}
|
|
7
7
|
let(:remover) {
|
|
8
|
-
"<button class=\"remover btn\" id=\"additional_test_submit\" name=\"additional_test\"><span aria-hidden=\"true\"
|
|
8
|
+
"<button class=\"remover btn\" id=\"additional_test_submit\" name=\"additional_test\"><span aria-hidden=\"true\"><i class=\"glyphicon glyphicon-remove\"></i></span><span class=\"sr-only\">add another test</span></button>"
|
|
9
9
|
}
|
|
10
10
|
it "draws add button" do
|
|
11
11
|
expect(helper.add_field(:test)).to eql(adder)
|
|
@@ -4,10 +4,12 @@ describe ImportUrlJob do
|
|
|
4
4
|
let(:user) { FactoryGirl.find_or_create(:jill) }
|
|
5
5
|
|
|
6
6
|
let(:file_path) { '/world.png' }
|
|
7
|
+
let(:file_hash) {'/673467823498723948237462429793840923582'}
|
|
7
8
|
|
|
8
9
|
let(:generic_file) do
|
|
9
10
|
GenericFile.new.tap do |f|
|
|
10
|
-
f.import_url = "http://example.org#{
|
|
11
|
+
f.import_url = "http://example.org#{file_hash}"
|
|
12
|
+
f.label = file_path
|
|
11
13
|
f.apply_depositor_metadata(user.user_key)
|
|
12
14
|
f.save
|
|
13
15
|
end
|
|
@@ -44,10 +46,11 @@ describe ImportUrlJob do
|
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
it "should create a content datastream" do
|
|
47
|
-
Net::HTTP.any_instance.should_receive(:request_get).with(
|
|
49
|
+
Net::HTTP.any_instance.should_receive(:request_get).with(file_hash).and_yield(mock_response)
|
|
48
50
|
job.run
|
|
49
51
|
expect(generic_file.reload.content.size).to eq 4218
|
|
50
52
|
expect(generic_file.content.dsLabel).to eq file_path
|
|
53
|
+
expect(user.mailbox.inbox.first.last_message.body).to eq("The file (#{file_path}) was successfully imported.")
|
|
51
54
|
end
|
|
52
55
|
end
|
|
53
56
|
|
|
@@ -84,8 +84,60 @@ describe FileUsage do
|
|
|
84
84
|
expect(usage.to_flot[1][:label]).to eq("Downloads")
|
|
85
85
|
expect(usage.to_flot[0][:data]).to include([1388534400000, 4], [1388620800000, 8], [1388707200000, 6], [1388793600000, 10], [1388880000000, 2])
|
|
86
86
|
expect(usage.to_flot[1][:data]).to include([1388534400000, 1], [1388620800000, 1], [1388707200000, 2], [1388793600000, 3], [1388880000000, 5])
|
|
87
|
-
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
let(:create_date) {DateTime.new(2014, 01, 01)}
|
|
90
|
+
|
|
91
|
+
describe "analytics start date set" do
|
|
92
|
+
let(:earliest) {
|
|
93
|
+
DateTime.new(2014, 01, 02)
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
before do
|
|
97
|
+
Sufia.config.analytic_start_date = earliest
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
describe "create date before earliest date set" do
|
|
101
|
+
let(:usage) {
|
|
102
|
+
allow_any_instance_of(GenericFile).to receive(:create_date).and_return(create_date.to_s)
|
|
103
|
+
allow_any_instance_of(FileUsage).to receive(:download_statistics).and_return(sample_download_statistics)
|
|
104
|
+
allow_any_instance_of(FileUsage).to receive(:pageview_statistics).and_return(sample_pageview_statistics)
|
|
105
|
+
FileUsage.new(@file.id)
|
|
106
|
+
}
|
|
107
|
+
it "should set the created date to the earliest date not the created date" do
|
|
108
|
+
expect(usage.created).to eq(earliest)
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
describe "create date after earliest" do
|
|
114
|
+
let(:usage) {
|
|
115
|
+
allow_any_instance_of(FileUsage).to receive(:download_statistics).and_return(sample_download_statistics)
|
|
116
|
+
allow_any_instance_of(FileUsage).to receive(:pageview_statistics).and_return(sample_pageview_statistics)
|
|
117
|
+
Sufia.config.analytic_start_date = earliest
|
|
118
|
+
FileUsage.new(@file.id)
|
|
119
|
+
}
|
|
120
|
+
it "should set the created date to the earliest date not the created date" do
|
|
121
|
+
expect(usage.created).to eq(@file.create_date)
|
|
122
|
+
end
|
|
123
|
+
end
|
|
124
|
+
end
|
|
125
|
+
describe "start date not set" do
|
|
126
|
+
before do
|
|
127
|
+
Sufia.config.analytic_start_date = nil
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
let(:usage) {
|
|
131
|
+
allow_any_instance_of(GenericFile).to receive(:create_date).and_return(create_date.to_s)
|
|
132
|
+
allow_any_instance_of(FileUsage).to receive(:download_statistics).and_return(sample_download_statistics)
|
|
133
|
+
allow_any_instance_of(FileUsage).to receive(:pageview_statistics).and_return(sample_pageview_statistics)
|
|
134
|
+
FileUsage.new(@file.id)
|
|
135
|
+
}
|
|
136
|
+
it "should set the created date to the earliest date not the created date" do
|
|
137
|
+
expect(usage.created).to eq(create_date)
|
|
138
|
+
end
|
|
88
139
|
|
|
140
|
+
end
|
|
89
141
|
end
|
|
90
142
|
|
|
91
143
|
end
|
|
@@ -50,16 +50,16 @@ describe "dashboard/index.html.erb" do
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
it "should have links to view and edit the user's profile" do
|
|
53
|
-
expect(@sidebar).to include '<a class="btn btn-
|
|
54
|
-
expect(@sidebar).to include '<a class="btn btn-
|
|
53
|
+
expect(@sidebar).to include '<a class="btn btn-default btn-raised" href="' + sufia.profile_path(@user) + '">View Profile</a>'
|
|
54
|
+
expect(@sidebar).to include '<a class="btn btn-default btn-raised" href="' + sufia.edit_profile_path(@user) + '">Edit Profile</a>'
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
it "should display user statistics" do
|
|
58
58
|
expect(@sidebar).to include "Your Statistics"
|
|
59
|
-
expect(@sidebar).to include '<span class="
|
|
60
|
-
expect(@sidebar).to include '<span class="
|
|
61
|
-
expect(@sidebar).to include '<span class="
|
|
62
|
-
expect(@sidebar).to include '<span class="
|
|
59
|
+
expect(@sidebar).to include '<span class="badge">1</span>'
|
|
60
|
+
expect(@sidebar).to include '<span class="badge">2</span>'
|
|
61
|
+
expect(@sidebar).to include '<span class="badge">15</span>'
|
|
62
|
+
expect(@sidebar).to include '<span class="badge">3</span>'
|
|
63
63
|
end
|
|
64
64
|
|
|
65
65
|
it "should show the statistics before the profile" do
|
|
@@ -74,8 +74,8 @@ describe "dashboard/index.html.erb" do
|
|
|
74
74
|
before do
|
|
75
75
|
@now = DateTime.now.to_i
|
|
76
76
|
assign(:activity, [
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
{ action: 'so and so edited their profile', timestamp: @now },
|
|
78
|
+
{ action: 'so and so uploaded a file', timestamp: (@now - 360 ) }
|
|
79
79
|
])
|
|
80
80
|
end
|
|
81
81
|
|
|
@@ -58,7 +58,7 @@ module Sufia::GenericFile
|
|
|
58
58
|
|
|
59
59
|
def update_metadata(attributes, visibility)
|
|
60
60
|
generic_file.attributes = generic_file.sanitize_attributes(attributes)
|
|
61
|
-
|
|
61
|
+
update_visibility(visibility)
|
|
62
62
|
generic_file.date_modified = DateTime.now
|
|
63
63
|
remove_from_feature_works if generic_file.visibility_changed? && !generic_file.public?
|
|
64
64
|
save_and_record_committer do
|
|
@@ -118,6 +118,13 @@ module Sufia::GenericFile
|
|
|
118
118
|
end
|
|
119
119
|
end
|
|
120
120
|
|
|
121
|
+
protected
|
|
122
|
+
|
|
123
|
+
# This method can be overridden in case there is a custom approach for visibility (e.g. embargo)
|
|
124
|
+
def update_visibility(visibility)
|
|
125
|
+
generic_file.visibility = visibility
|
|
126
|
+
end
|
|
127
|
+
|
|
121
128
|
private
|
|
122
129
|
def remove_from_feature_works
|
|
123
130
|
featured_work = FeaturedWork.find_by_generic_file_id(generic_file.noid)
|
|
@@ -16,7 +16,7 @@ class ImportUrlJob < ActiveFedoraPidBasedJob
|
|
|
16
16
|
# attach downloaded file to generic file stubbed out
|
|
17
17
|
if Sufia::GenericFile::Actor.new(generic_file, user).create_content(f, path, 'content')
|
|
18
18
|
# add message to user for downloaded file
|
|
19
|
-
message = "The file (#{
|
|
19
|
+
message = "The file (#{generic_file.content.label}) was successfully imported."
|
|
20
20
|
job_user.send_message(user, message, 'File Import')
|
|
21
21
|
else
|
|
22
22
|
job_user.send_message(user, generic_file.errors.full_messages.join(', '), 'File Import Error')
|
|
@@ -8,7 +8,7 @@ module Sufia
|
|
|
8
8
|
def audit(force = false)
|
|
9
9
|
logs = []
|
|
10
10
|
self.per_version do |ver|
|
|
11
|
-
logs <<
|
|
11
|
+
logs << audit_each(ver, force)
|
|
12
12
|
end
|
|
13
13
|
logs
|
|
14
14
|
end
|
|
@@ -51,23 +51,27 @@ module Sufia
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
def audit_each(version, force = false)
|
|
55
|
+
latest_audit = logs(version.dsid).first
|
|
56
|
+
return latest_audit unless force || ::GenericFile.needs_audit?(version, latest_audit)
|
|
57
|
+
|
|
58
|
+
# Resque.enqueue(AuditJob, version.pid, version.dsid, version.versionID)
|
|
59
|
+
Sufia.queue.push(AuditJob.new(version.pid, version.dsid, version.versionID))
|
|
60
|
+
|
|
61
|
+
# run the find just incase the job has finished already
|
|
62
|
+
latest_audit = logs(version.dsid).first
|
|
63
|
+
latest_audit = ChecksumAuditLog.new(pass: NO_RUNS, pid: version.pid, dsid: version.dsid, version: version.versionID) unless latest_audit
|
|
64
|
+
latest_audit
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
|
|
54
68
|
module ClassMethods
|
|
55
69
|
def audit!(version)
|
|
56
70
|
::GenericFile.audit(version, true)
|
|
57
71
|
end
|
|
58
72
|
|
|
59
73
|
def audit(version, force = false)
|
|
60
|
-
latest_audit = self.find(version.pid).
|
|
61
|
-
unless force
|
|
62
|
-
return latest_audit unless ::GenericFile.needs_audit?(version, latest_audit)
|
|
63
|
-
end
|
|
64
|
-
# Resque.enqueue(AuditJob, version.pid, version.dsid, version.versionID)
|
|
65
|
-
Sufia.queue.push(AuditJob.new(version.pid, version.dsid, version.versionID))
|
|
66
|
-
|
|
67
|
-
# run the find just incase the job has finished already
|
|
68
|
-
latest_audit = self.find(version.pid).logs(version.dsid).first
|
|
69
|
-
latest_audit = ChecksumAuditLog.new(pass: NO_RUNS, pid: version.pid, dsid: version.dsid, version: version.versionID) unless latest_audit
|
|
70
|
-
latest_audit
|
|
74
|
+
latest_audit = self.find(version.pid).audit_each( version, force)
|
|
71
75
|
end
|
|
72
76
|
|
|
73
77
|
def needs_audit?(version, latest_audit)
|
|
@@ -5,7 +5,9 @@ class FileUsage
|
|
|
5
5
|
def initialize id
|
|
6
6
|
self.id = id
|
|
7
7
|
self.path = Sufia::Engine.routes.url_helpers.generic_file_path(Sufia::Noid.noidify(id))
|
|
8
|
+
earliest = Sufia.config.analytic_start_date
|
|
8
9
|
self.created = DateTime.parse(::GenericFile.find(id).create_date)
|
|
10
|
+
self.created = earliest > created ? earliest : created unless earliest.blank?
|
|
9
11
|
self.downloads = download_statistics
|
|
10
12
|
self.pageviews = pageview_statistics
|
|
11
13
|
end
|
|
@@ -31,13 +33,13 @@ class FileUsage
|
|
|
31
33
|
# Sufia::Download is sent to Sufia::Analytics.profile as #sufia__download
|
|
32
34
|
# see Legato::ProfileMethods.method_name_from_klass
|
|
33
35
|
def download_statistics
|
|
34
|
-
Sufia::Analytics.profile.sufia__download(sort: 'date').for_file(self.id)
|
|
36
|
+
Sufia::Analytics.profile.sufia__download(sort: 'date', start_date: created).for_file(self.id)
|
|
35
37
|
end
|
|
36
38
|
|
|
37
39
|
# Sufia::Pageview is sent to Sufia::Analytics.profile as #sufia__pageview
|
|
38
40
|
# see Legato::ProfileMethods.method_name_from_klass
|
|
39
41
|
def pageview_statistics
|
|
40
|
-
Sufia::Analytics.profile.sufia__pageview(sort: 'date').for_path(self.path)
|
|
42
|
+
Sufia::Analytics.profile.sufia__pageview(sort: 'date', start_date: created).for_path(self.path)
|
|
41
43
|
end
|
|
42
44
|
|
|
43
45
|
def pageviews_to_flot values = Array.new
|
|
@@ -79,6 +79,7 @@ This generator makes the following changes to your application:
|
|
|
79
79
|
"\nMime::Type.register 'application/x-endnote-refer', :endnote", {verbose: false }
|
|
80
80
|
copy_file 'config/sufia.rb', 'config/initializers/sufia.rb'
|
|
81
81
|
copy_file 'config/redis.yml', 'config/redis.yml'
|
|
82
|
+
copy_file 'config/resque-pool.yml', 'config/resque-pool.yml'
|
|
82
83
|
copy_file 'config/redis_config.rb', 'config/initializers/redis_config.rb'
|
|
83
84
|
copy_file 'config/resque_admin.rb', 'config/initializers/resque_admin.rb'
|
|
84
85
|
copy_file 'config/resque_config.rb', 'config/initializers/resque_config.rb'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"*": 1
|
|
@@ -105,6 +105,14 @@ Sufia.config do |config|
|
|
|
105
105
|
# Specify the path to the file characterization tool:
|
|
106
106
|
# config.fits_path = "fits.sh"
|
|
107
107
|
|
|
108
|
+
# Specify how many seconds back from the current time that we should show by default of the user's activity on the user's dashboard
|
|
109
|
+
# config.activity_to_show_default_seconds_since_now = 24*60*60
|
|
110
|
+
|
|
111
|
+
# Specify a date you wish to start collecting Google Analytic statistics for.
|
|
112
|
+
# Leaving it blank will set the start date to when ever the file was uploaded by
|
|
113
|
+
# NOTE: if you have always sent analytics to GA for downloads and page views leave this commented out
|
|
114
|
+
# config.analytic_start_date = DateTime.new(2014,9,10)
|
|
115
|
+
|
|
108
116
|
# If browse-everything has been configured, load the configs. Otherwise, set to nil.
|
|
109
117
|
begin
|
|
110
118
|
if defined? BrowseEverything
|
|
@@ -26,6 +26,10 @@ module Sufia
|
|
|
26
26
|
config.analytics = false
|
|
27
27
|
config.queue = Sufia::Resque::Queue
|
|
28
28
|
config.max_notifications_for_dashboard = 5
|
|
29
|
+
config.activity_to_show_default_seconds_since_now = 24*60*60
|
|
30
|
+
|
|
31
|
+
# Defaulting analytic start date to when ever the file was uploaded by leaving it blank
|
|
32
|
+
config.analytic_start_date = nil
|
|
29
33
|
|
|
30
34
|
config.autoload_paths += %W(
|
|
31
35
|
#{config.root}/app/models/datastreams
|
data/tasks/sufia-dev.rake
CHANGED
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: 4.0.
|
|
4
|
+
version: 4.0.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Justin Coyne
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2014-
|
|
12
|
+
date: 2014-10-28 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: sufia-models
|
|
@@ -17,14 +17,14 @@ dependencies:
|
|
|
17
17
|
requirements:
|
|
18
18
|
- - '='
|
|
19
19
|
- !ruby/object:Gem::Version
|
|
20
|
-
version: 4.0.
|
|
20
|
+
version: 4.0.1
|
|
21
21
|
type: :runtime
|
|
22
22
|
prerelease: false
|
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
|
24
24
|
requirements:
|
|
25
25
|
- - '='
|
|
26
26
|
- !ruby/object:Gem::Version
|
|
27
|
-
version: 4.0.
|
|
27
|
+
version: 4.0.1
|
|
28
28
|
- !ruby/object:Gem::Dependency
|
|
29
29
|
name: blacklight_advanced_search
|
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -490,32 +490,35 @@ files:
|
|
|
490
490
|
- app/assets/javascripts/sufia/multiForm.js
|
|
491
491
|
- app/assets/javascripts/sufia/permissions.js
|
|
492
492
|
- app/assets/javascripts/sufia/search.js
|
|
493
|
-
- app/assets/javascripts/sufia/single_use_link.js
|
|
493
|
+
- app/assets/javascripts/sufia/single_use_link.js.erb
|
|
494
494
|
- app/assets/javascripts/sufia/tabs.js
|
|
495
|
+
- app/assets/javascripts/sufia/tagcloud.js
|
|
495
496
|
- app/assets/javascripts/sufia/trophy.js
|
|
496
497
|
- app/assets/javascripts/sufia/uploader.js
|
|
497
498
|
- app/assets/javascripts/terms_of_service.js
|
|
498
|
-
- app/assets/stylesheets/batch-edit.css.scss
|
|
499
|
-
- app/assets/stylesheets/catalog.css.scss
|
|
500
|
-
- app/assets/stylesheets/collections.css.scss
|
|
501
|
-
- app/assets/stylesheets/featured.css.scss
|
|
502
|
-
- app/assets/stylesheets/file-listing.css.scss
|
|
503
499
|
- app/assets/stylesheets/fileupload/application.css
|
|
504
500
|
- app/assets/stylesheets/fileupload/jquery.fileupload-ui.css.erb
|
|
505
501
|
- app/assets/stylesheets/fileupload/pbar-ani.gif
|
|
506
502
|
- app/assets/stylesheets/fileupload/style.css
|
|
507
503
|
- app/assets/stylesheets/fileupload/thumbnail-scaling.css
|
|
508
504
|
- app/assets/stylesheets/generic_files.css.erb
|
|
509
|
-
- app/assets/stylesheets/header.css.scss
|
|
510
|
-
- app/assets/stylesheets/home-page.css.scss
|
|
511
505
|
- app/assets/stylesheets/jquery-ui.css
|
|
512
506
|
- app/assets/stylesheets/nestable.css.scss
|
|
513
|
-
- app/assets/stylesheets/settings.css.scss
|
|
514
|
-
- app/assets/stylesheets/styles.css.scss
|
|
515
507
|
- app/assets/stylesheets/sufia-audio-overrides.css
|
|
516
508
|
- app/assets/stylesheets/sufia.css.scss
|
|
517
|
-
- app/assets/stylesheets/
|
|
518
|
-
- app/assets/stylesheets/
|
|
509
|
+
- app/assets/stylesheets/sufia/_batch-edit.scss
|
|
510
|
+
- app/assets/stylesheets/sufia/_buttons.scss
|
|
511
|
+
- app/assets/stylesheets/sufia/_catalog.scss
|
|
512
|
+
- app/assets/stylesheets/sufia/_collections.scss
|
|
513
|
+
- app/assets/stylesheets/sufia/_dashboard.scss
|
|
514
|
+
- app/assets/stylesheets/sufia/_featured.scss
|
|
515
|
+
- app/assets/stylesheets/sufia/_file-listing.scss
|
|
516
|
+
- app/assets/stylesheets/sufia/_header.scss
|
|
517
|
+
- app/assets/stylesheets/sufia/_home-page.scss
|
|
518
|
+
- app/assets/stylesheets/sufia/_settings.scss
|
|
519
|
+
- app/assets/stylesheets/sufia/_styles.scss
|
|
520
|
+
- app/assets/stylesheets/sufia/_tagcloud.scss
|
|
521
|
+
- app/assets/stylesheets/sufia/_usage-stats.scss
|
|
519
522
|
- app/builders/sufia/bootstrap_breadcrumbs_builder.rb
|
|
520
523
|
- app/controllers/authorities_controller.rb
|
|
521
524
|
- app/controllers/batch_controller.rb
|
|
@@ -1037,6 +1040,7 @@ files:
|
|
|
1037
1040
|
- sufia-models/lib/generators/sufia/models/templates/config/mime_types.rb
|
|
1038
1041
|
- sufia-models/lib/generators/sufia/models/templates/config/redis.yml
|
|
1039
1042
|
- sufia-models/lib/generators/sufia/models/templates/config/redis_config.rb
|
|
1043
|
+
- sufia-models/lib/generators/sufia/models/templates/config/resque-pool.yml
|
|
1040
1044
|
- sufia-models/lib/generators/sufia/models/templates/config/resque_admin.rb
|
|
1041
1045
|
- sufia-models/lib/generators/sufia/models/templates/config/resque_config.rb
|
|
1042
1046
|
- sufia-models/lib/generators/sufia/models/templates/config/setup_mail.rb
|