sufia 3.4.0.rc3 → 3.4.0.rc4
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/SUFIA_VERSION +1 -1
- data/app/controllers/concerns/sufia/dashboard_controller_behavior.rb +1 -15
- data/app/views/dashboard/_index_partials/_list_files.html.erb +1 -17
- data/lib/sufia/version.rb +1 -1
- data/spec/models/file_content_datastream_spec.rb +2 -9
- data/sufia-models/app/models/batch.rb +1 -4
- data/sufia-models/lib/sufia/models/generic_file/characterization.rb +4 -4
- data/sufia-models/lib/sufia/models/generic_file/metadata.rb +4 -4
- data/sufia-models/lib/sufia/models/version.rb +1 -1
- data/sufia-models/sufia-models.gemspec +3 -1
- data/tasks/sufia-dev.rake +1 -1
- metadata +5 -15
- data/lib/generators/sufia/templates/migrations/acts_as_follower_migration.rb +0 -17
- data/lib/generators/sufia/templates/migrations/add_avatars_to_users.rb +0 -9
- data/lib/generators/sufia/templates/migrations/add_groups_to_users.rb +0 -11
- data/lib/generators/sufia/templates/migrations/add_ldap_attrs_to_user.rb +0 -27
- data/lib/generators/sufia/templates/migrations/add_social_to_users.rb +0 -13
- data/lib/generators/sufia/templates/migrations/create_checksum_audit_logs.rb +0 -20
- data/lib/generators/sufia/templates/migrations/create_local_authorities.rb +0 -50
- data/lib/generators/sufia/templates/migrations/create_single_use_links.rb +0 -12
- data/lib/generators/sufia/templates/migrations/create_trophies.rb +0 -10
- data/lib/generators/sufia/templates/migrations/create_version_committers.rb +0 -15
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 49dcaf1bde3b21b0f57dbae93c5772ffb0d155c3
|
|
4
|
+
data.tar.gz: ab6e2d7e3dd40b8f564a2f252f3cc56effb035a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 869b250c644be760a7adad86d62e65a33e945db2555442c6fdeb4586a64b2dc117bfae2df64ed46e7efdc1dd5e57ba410cc290526953f4e522159515b4bc343e
|
|
7
|
+
data.tar.gz: ad4da981d7648aef8e8f48b44d533c738d1193005e13a3b41da07f12938149d2dcd74dacf780a2b729956791db1d17c495e734e459e06b20af8bb28d555c8bc4
|
data/SUFIA_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.4.0.
|
|
1
|
+
3.4.0.rc4
|
|
@@ -1,17 +1,3 @@
|
|
|
1
|
-
# -*- coding: utf-8 -*-
|
|
2
|
-
# Copyright © 2012 The Pennsylvania State University
|
|
3
|
-
#
|
|
4
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
# you may not use this file except in compliance with the License.
|
|
6
|
-
# You may obtain a copy of the License at
|
|
7
|
-
#
|
|
8
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
#
|
|
10
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
# See the License for the specific language governing permissions and
|
|
14
|
-
# limitations under the License.
|
|
15
1
|
require 'blacklight/catalog'
|
|
16
2
|
|
|
17
3
|
module Sufia
|
|
@@ -61,7 +47,7 @@ module Sufia
|
|
|
61
47
|
# adding a key to the session so that the history will be saved so that batch_edits select all will work
|
|
62
48
|
search_session[:dashboard] = true
|
|
63
49
|
respond_to do |format|
|
|
64
|
-
format.html {
|
|
50
|
+
format.html { }
|
|
65
51
|
format.rss { render :layout => false }
|
|
66
52
|
format.atom { render :layout => false }
|
|
67
53
|
end
|
|
@@ -1,19 +1,3 @@
|
|
|
1
|
-
<%#
|
|
2
|
-
Copyright © 2012 The Pennsylvania State University
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
%>
|
|
16
|
-
|
|
17
1
|
<% noid = document.noid %>
|
|
18
2
|
<tr id="document_<%= noid %>" class="<%= cycle("","zebra") %>">
|
|
19
3
|
<% gf = GenericFile.load_instance_from_solr(document.id) %>
|
|
@@ -32,7 +16,7 @@ limitations under the License.
|
|
|
32
16
|
<span class=center><%= link_to document.title_or_label, sufia.generic_file_path(noid), :id => "src_copy_link#{noid}" %> <br /></span>
|
|
33
17
|
</td>
|
|
34
18
|
<td width="17%"><%= document.date_uploaded %> </td>
|
|
35
|
-
<td width="5%"
|
|
19
|
+
<td width="5%">
|
|
36
20
|
<% if document.registered? %>
|
|
37
21
|
<a href="<%= sufia.generic_file_path(noid) %>/edit/?tab=permissions" id="permission_<%= noid %>"><span class="label label-info" title="<%=t('sufia.institution_name') %>"><%=t('sufia.institution_name') %></span></a>
|
|
38
22
|
<% elsif document.public? %>
|
data/lib/sufia/version.rb
CHANGED
|
@@ -55,20 +55,13 @@ describe FileContentDatastream do
|
|
|
55
55
|
@subject.stub(:dsVersionID=>'content.7')
|
|
56
56
|
end
|
|
57
57
|
it "should return an xml document", :unless => $in_travis do
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
f = File.new(fixture_path + '/world.png')
|
|
61
|
-
content = double("file")
|
|
62
|
-
content.stub(:read=>f.read)
|
|
63
|
-
content.stub(:rewind=>f.rewind)
|
|
64
|
-
@subject.stub(:content).and_return(f)
|
|
58
|
+
f = File.new(fixture_path + '/world.png', 'rb')
|
|
59
|
+
@subject.content = f.read
|
|
65
60
|
xml = @subject.extract_metadata
|
|
66
61
|
doc = Nokogiri::XML.parse(xml)
|
|
67
62
|
doc.root.xpath('//ns:imageWidth/text()', {'ns'=>'http://hul.harvard.edu/ois/xml/ns/fits/fits_output'}).inner_text.should == '50'
|
|
68
63
|
end
|
|
69
64
|
it "should return expected results when invoked via HTTP", :unless => $in_travis do
|
|
70
|
-
repo = double("repo")
|
|
71
|
-
repo.stub(:config=>{})
|
|
72
65
|
f = ActionDispatch::Http::UploadedFile.new(:tempfile => File.new(fixture_path + '/world.png'),
|
|
73
66
|
:filename => 'world.png')
|
|
74
67
|
content = double("file")
|
|
@@ -8,10 +8,7 @@ class Batch < ActiveFedora::Base
|
|
|
8
8
|
belongs_to :user, :property => "creator"
|
|
9
9
|
has_many :generic_files, :property => :is_part_of
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
delegate :creator, :to => :descMetadata, multiple: true
|
|
13
|
-
delegate :part, :to => :descMetadata, multiple: true
|
|
14
|
-
delegate :status, :to => :descMetadata, multiple: true
|
|
11
|
+
has_attributes :title, :creator, :part, :status, datastream: :descMetadata, multiple: true
|
|
15
12
|
|
|
16
13
|
def self.find_or_create(pid)
|
|
17
14
|
begin
|
|
@@ -3,9 +3,9 @@ module Sufia
|
|
|
3
3
|
module Characterization
|
|
4
4
|
extend ActiveSupport::Concern
|
|
5
5
|
included do
|
|
6
|
-
has_metadata
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
has_metadata "characterization", :type => FitsDatastream
|
|
7
|
+
has_attributes :mime_type, datastream: :characterization, multiple: false
|
|
8
|
+
has_attributes :format_label, :file_size, :last_modified,
|
|
9
9
|
:filename, :original_checksum, :rights_basis,
|
|
10
10
|
:copyright_basis, :copyright_note,
|
|
11
11
|
:well_formed, :valid, :status_message,
|
|
@@ -20,7 +20,7 @@ module Sufia
|
|
|
20
20
|
:gps_timestamp, :latitude, :longitude,
|
|
21
21
|
:character_set, :markup_basis,
|
|
22
22
|
:markup_language, :duration, :bit_depth,
|
|
23
|
-
:sample_rate, :channels, :data_format, :offset
|
|
23
|
+
:sample_rate, :channels, :data_format, :offset, datastream: :characterization, multiple: true
|
|
24
24
|
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -10,12 +10,12 @@ module Sufia
|
|
|
10
10
|
has_file_datastream "thumbnail"
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
has_attributes :relative_path, :depositor, :import_url, datastream: :properties, multiple: false
|
|
14
|
+
has_attributes :date_uploaded, :date_modified, datastream: :descMetadata, multiple: false
|
|
15
|
+
has_attributes :related_url, :based_near, :part_of, :creator,
|
|
16
16
|
:contributor, :title, :tag, :description, :rights,
|
|
17
17
|
:publisher, :date_created, :subject,
|
|
18
|
-
:resource_type, :identifier, :language
|
|
18
|
+
:resource_type, :identifier, :language, datastream: :descMetadata, multiple: true
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
end
|
|
@@ -33,10 +33,12 @@ Gem::Specification.new do |spec|
|
|
|
33
33
|
# spec.add_dependency "hydra", "6.1.0.rc2"
|
|
34
34
|
# Since hydra 6.1 isn't out yet, we'll just build it so that it's compatible
|
|
35
35
|
# without an explicit dependency
|
|
36
|
+
spec.add_dependency "active-fedora", "~> 6.7.0"
|
|
37
|
+
spec.add_dependency "blacklight", "~> 4.5.0"
|
|
36
38
|
spec.add_dependency "hydra-head", "~> 6.4.0"
|
|
37
39
|
|
|
38
40
|
spec.add_dependency 'nest', '~> 1.1.1'
|
|
39
|
-
spec.add_dependency 'resque', '~> 1.23
|
|
41
|
+
spec.add_dependency 'resque', '~> 1.23'
|
|
40
42
|
spec.add_dependency 'resque-pool', '0.3.0'
|
|
41
43
|
spec.add_dependency 'noid', '~> 0.6.6'
|
|
42
44
|
spec.add_dependency 'mailboxer', '~> 0.11.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.0.
|
|
4
|
+
version: 3.4.0.rc4
|
|
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-10-
|
|
11
|
+
date: 2013-10-29 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.4.0.
|
|
19
|
+
version: 3.4.0.rc4
|
|
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.4.0.
|
|
26
|
+
version: 3.4.0.rc4
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: blacklight_advanced_search
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -473,16 +473,6 @@ files:
|
|
|
473
473
|
- lib/generators/sufia/sufia_generator.rb
|
|
474
474
|
- lib/generators/sufia/templates/catalog_controller.rb
|
|
475
475
|
- lib/generators/sufia/templates/config/action_dispatch_http_upload_monkey_patch.rb
|
|
476
|
-
- lib/generators/sufia/templates/migrations/acts_as_follower_migration.rb
|
|
477
|
-
- lib/generators/sufia/templates/migrations/add_avatars_to_users.rb
|
|
478
|
-
- lib/generators/sufia/templates/migrations/add_groups_to_users.rb
|
|
479
|
-
- lib/generators/sufia/templates/migrations/add_ldap_attrs_to_user.rb
|
|
480
|
-
- lib/generators/sufia/templates/migrations/add_social_to_users.rb
|
|
481
|
-
- lib/generators/sufia/templates/migrations/create_checksum_audit_logs.rb
|
|
482
|
-
- lib/generators/sufia/templates/migrations/create_local_authorities.rb
|
|
483
|
-
- lib/generators/sufia/templates/migrations/create_single_use_links.rb
|
|
484
|
-
- lib/generators/sufia/templates/migrations/create_trophies.rb
|
|
485
|
-
- lib/generators/sufia/templates/migrations/create_version_committers.rb
|
|
486
476
|
- lib/sufia.rb
|
|
487
477
|
- lib/sufia/batch_edits_controller_behavior.rb
|
|
488
478
|
- lib/sufia/controller.rb
|
|
@@ -751,7 +741,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
751
741
|
version: 1.3.1
|
|
752
742
|
requirements: []
|
|
753
743
|
rubyforge_project:
|
|
754
|
-
rubygems_version: 2.
|
|
744
|
+
rubygems_version: 2.0.3
|
|
755
745
|
signing_key:
|
|
756
746
|
specification_version: 4
|
|
757
747
|
summary: Sufia was extracted from ScholarSphere developed by Penn State University
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
class ActsAsFollowerMigration < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
create_table :follows, :force => true do |t|
|
|
4
|
-
t.references :followable, :polymorphic => true, :null => false
|
|
5
|
-
t.references :follower, :polymorphic => true, :null => false
|
|
6
|
-
t.boolean :blocked, :default => false, :null => false
|
|
7
|
-
t.timestamps
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
add_index :follows, ["follower_id", "follower_type"], :name => "fk_follows"
|
|
11
|
-
add_index :follows, ["followable_id", "followable_type"], :name => "fk_followables"
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def self.down
|
|
15
|
-
drop_table :follows
|
|
16
|
-
end
|
|
17
|
-
end
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
class AddGroupsToUsers < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
add_column :users, :group_list, :text
|
|
4
|
-
add_column :users, :groups_last_update, :datetime
|
|
5
|
-
end
|
|
6
|
-
|
|
7
|
-
def self.down
|
|
8
|
-
remove_column :users, :group_list
|
|
9
|
-
remove_column :users, :groups_last_update
|
|
10
|
-
end
|
|
11
|
-
end
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
class AddLdapAttrsToUser < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
add_column :users, :display_name, :string
|
|
4
|
-
add_column :users, :address, :string
|
|
5
|
-
add_column :users, :admin_area, :string
|
|
6
|
-
add_column :users, :department, :string
|
|
7
|
-
add_column :users, :title, :string
|
|
8
|
-
add_column :users, :office, :string
|
|
9
|
-
add_column :users, :chat_id, :string
|
|
10
|
-
add_column :users, :website, :string
|
|
11
|
-
add_column :users, :affiliation, :string
|
|
12
|
-
add_column :users, :telephone, :string
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def self.down
|
|
16
|
-
remove_column :users, :display_name
|
|
17
|
-
remove_column :users, :address
|
|
18
|
-
remove_column :users, :admin_area
|
|
19
|
-
remove_column :users, :department
|
|
20
|
-
remove_column :users, :title
|
|
21
|
-
remove_column :users, :office
|
|
22
|
-
remove_column :users, :chat_id
|
|
23
|
-
remove_column :users, :website
|
|
24
|
-
remove_column :users, :affiliation
|
|
25
|
-
remove_column :users, :telephone
|
|
26
|
-
end
|
|
27
|
-
end
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
class AddSocialToUsers < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
add_column :users, :facebook_handle, :string
|
|
4
|
-
add_column :users, :twitter_handle, :string
|
|
5
|
-
add_column :users, :googleplus_handle, :string
|
|
6
|
-
end
|
|
7
|
-
|
|
8
|
-
def self.down
|
|
9
|
-
remove_column :users, :facebook_handle, :string
|
|
10
|
-
remove_column :users, :twitter_handle, :string
|
|
11
|
-
remove_column :users, :googleplus_handle, :string
|
|
12
|
-
end
|
|
13
|
-
end
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
class CreateChecksumAuditLogs < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
create_table :checksum_audit_logs do |t|
|
|
4
|
-
t.string :pid
|
|
5
|
-
t.string :dsid
|
|
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, [:pid, :dsid], :name=>'by_pid_and_dsid', :order => {:created_at => "DESC" }
|
|
13
|
-
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def self.down
|
|
17
|
-
remove_index(:checksum_audit_logs, :name => 'by_pid_and_dsid')
|
|
18
|
-
drop_table :checksum_audit_logs
|
|
19
|
-
end
|
|
20
|
-
end
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
class CreateLocalAuthorities < ActiveRecord::Migration
|
|
2
|
-
def self.up
|
|
3
|
-
create_table :local_authority_entries, :force => true do |t|
|
|
4
|
-
t.integer :local_authority_id
|
|
5
|
-
t.string :label
|
|
6
|
-
t.string :uri
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
create_table :local_authorities, :force => true do |t|
|
|
10
|
-
t.string :name, :unique => true
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
create_table :domain_terms, :force => true do |t|
|
|
14
|
-
t.string :model
|
|
15
|
-
t.string :term
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
create_table :domain_terms_local_authorities, :id => false do |t|
|
|
19
|
-
t.integer :domain_term_id, :foreign_key => true
|
|
20
|
-
t.integer :local_authority_id, :foreign_key => true
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
create_table :subject_local_authority_entries, :force => true do |t|
|
|
24
|
-
t.string :label
|
|
25
|
-
t.string :lowerLabel
|
|
26
|
-
t.string :url
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
add_index :local_authority_entries, [:local_authority_id, :label], :name => 'entries_by_term_and_label'
|
|
30
|
-
add_index :local_authority_entries, [:local_authority_id, :uri], :name => 'entries_by_term_and_uri'
|
|
31
|
-
add_index :domain_terms, [:model, :term], :name => 'terms_by_model_and_term'
|
|
32
|
-
add_index :domain_terms_local_authorities, [:local_authority_id, :domain_term_id], :name => 'dtla_by_ids1'
|
|
33
|
-
add_index :domain_terms_local_authorities, [:domain_term_id, :local_authority_id], :name => 'dtla_by_ids2'
|
|
34
|
-
add_index :subject_local_authority_entries, [:lowerLabel], :name => 'entries_by_lower_label'
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def self.down
|
|
38
|
-
drop_table :local_authority_entries
|
|
39
|
-
drop_table :local_authorities
|
|
40
|
-
drop_table :domain_terms
|
|
41
|
-
drop_table :domain_terms_local_authorities
|
|
42
|
-
drop_table :subject_local_authority_entries
|
|
43
|
-
remove_index :local_authority_entries, :name => "entries_by_term_and_label"
|
|
44
|
-
remove_index :local_authority_entries, :name => "entries_by_term_and_uri"
|
|
45
|
-
remove_index :domain_terms, :name => "terms_by_model_and_term"
|
|
46
|
-
remove_index :subject_local_authority_entries, :name => 'entries_by_lower_label'
|
|
47
|
-
remove_index :domain_terms_local_authorities, :name => 'dtla_by_ids1'
|
|
48
|
-
remove_index :domain_terms_local_authorities, :name => 'dtla_by_ids2'
|
|
49
|
-
end
|
|
50
|
-
end
|
|
@@ -1,15 +0,0 @@
|
|
|
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
|