sufia-models 3.1.2 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/batch.rb +0 -14
- data/app/models/concerns/sufia/models/access_right.rb +79 -0
- data/app/models/concerns/sufia/models/with_access_right.rb +33 -0
- data/app/models/datastreams/batch_rdf_datastream.rb +0 -14
- data/app/models/datastreams/fits_datastream.rb +0 -14
- data/app/models/datastreams/generic_file_rdf_datastream.rb +0 -14
- data/app/models/datastreams/properties_datastream.rb +0 -14
- data/app/models/follow.rb +0 -14
- data/app/models/subject_local_authority_entry.rb +0 -14
- data/lib/sufia/models/generic_file/visibility.rb +30 -26
- data/lib/sufia/models/id_service.rb +0 -14
- data/lib/sufia/models/jobs/audit_job.rb +0 -14
- data/lib/sufia/models/jobs/characterize_job.rb +0 -14
- data/lib/sufia/models/jobs/resolrize_job.rb +0 -14
- data/lib/sufia/models/jobs/unzip_job.rb +0 -14
- data/lib/sufia/models/noid.rb +0 -14
- data/lib/sufia/models/solr_document_behavior.rb +0 -14
- data/lib/sufia/models/user.rb +0 -14
- data/lib/sufia/models/utils.rb +0 -14
- data/lib/sufia/models/version.rb +1 -1
- data/lib/tasks/resque.rake +0 -14
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72c416d322fb3bea980a2eccd7f10da2788bfc6c
|
4
|
+
data.tar.gz: 6d00d262f2085368c8bae2a406b6db69ba0a0ca8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e38dc785cbd05a8404999089dabf5b76a920db07cc852bd961b1e0182ba227d477b5f3be19aca01174285e0786761e6afe184ab3410ace1868ca1fe59eae9b60
|
7
|
+
data.tar.gz: 7ab56759eced4a028a5a23891618c3cc9ca303f877a7dc50eef59722aba6fbb99f0d22d4d69e8b4e23f5532ad7575ac078203e3d75def697a8c5ee6f5a12271e
|
data/app/models/batch.rb
CHANGED
@@ -1,17 +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
1
|
class Batch < ActiveFedora::Base
|
16
2
|
include Hydra::ModelMixins::CommonMetadata
|
17
3
|
include Hydra::ModelMixins::RightsMetadata
|
@@ -0,0 +1,79 @@
|
|
1
|
+
module Sufia
|
2
|
+
module Models
|
3
|
+
class AccessRight
|
4
|
+
PERMISSION_TEXT_VALUE_PUBLIC = 'public'.freeze
|
5
|
+
PERMISSION_TEXT_VALUE_AUTHENTICATED = 'registered'.freeze
|
6
|
+
VISIBILITY_TEXT_VALUE_PUBLIC = 'open'.freeze
|
7
|
+
VISIBILITY_TEXT_VALUE_EMBARGO = 'open_with_embargo_release_date'.freeze
|
8
|
+
VISIBILITY_TEXT_VALUE_AUTHENTICATED = 'psu'.freeze
|
9
|
+
VISIBILITY_TEXT_VALUE_PRIVATE = 'restricted'.freeze
|
10
|
+
|
11
|
+
# @param permissionable [#visibility, #permissions]
|
12
|
+
# @example
|
13
|
+
# file = GenericFile.find('sufia:1234')
|
14
|
+
# access = Sufia::AccessRight.new(file)
|
15
|
+
def initialize(permissionable)
|
16
|
+
@permissionable = permissionable
|
17
|
+
end
|
18
|
+
|
19
|
+
attr_reader :permissionable
|
20
|
+
delegate :persisted?, :permissions, :visibility, to: :permissionable
|
21
|
+
protected :persisted?, :permissions, :visibility
|
22
|
+
|
23
|
+
|
24
|
+
def open_access?
|
25
|
+
return true if has_visibility_text_for?(VISIBILITY_TEXT_VALUE_PUBLIC)
|
26
|
+
# We don't want to know if its under embargo, simply does it have a date.
|
27
|
+
# In this way, we can properly inform the label input
|
28
|
+
persisted_open_access_permission? && !permissionable.embargo_release_date.present?
|
29
|
+
end
|
30
|
+
|
31
|
+
def open_access_with_embargo_release_date?
|
32
|
+
return false unless permissionable_is_embargoable?
|
33
|
+
return true if has_visibility_text_for?(VISIBILITY_TEXT_VALUE_EMBARGO)
|
34
|
+
# We don't want to know if its under embargo, simply does it have a date.
|
35
|
+
# In this way, we can properly inform the label input
|
36
|
+
persisted_open_access_permission? && permissionable.embargo_release_date.present?
|
37
|
+
end
|
38
|
+
|
39
|
+
def authenticated_only?
|
40
|
+
return false if open_access?
|
41
|
+
has_permission_text_for?(PERMISSION_TEXT_VALUE_AUTHENTICATED) ||
|
42
|
+
has_visibility_text_for?(VISIBILITY_TEXT_VALUE_AUTHENTICATED)
|
43
|
+
end
|
44
|
+
|
45
|
+
def private?
|
46
|
+
return false if open_access?
|
47
|
+
return false if authenticated_only?
|
48
|
+
return false if open_access_with_embargo_release_date?
|
49
|
+
true
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def persisted_open_access_permission?
|
55
|
+
if persisted?
|
56
|
+
has_permission_text_for?(PERMISSION_TEXT_VALUE_PUBLIC)
|
57
|
+
else
|
58
|
+
visibility.to_s == ''
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
def on_or_after_any_embargo_release_date?
|
63
|
+
return true unless permissionable.embargo_release_date
|
64
|
+
permissionable.embargo_release_date.to_date < Date.today
|
65
|
+
end
|
66
|
+
|
67
|
+
def permissionable_is_embargoable?
|
68
|
+
permissionable.respond_to?(:embargo_release_date)
|
69
|
+
end
|
70
|
+
|
71
|
+
def has_visibility_text_for?(text)
|
72
|
+
visibility == text
|
73
|
+
end
|
74
|
+
def has_permission_text_for?(text)
|
75
|
+
!!permissions.detect { |perm| perm[:name] == text }
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
module Sufia
|
2
|
+
module Models
|
3
|
+
module WithAccessRight
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
def under_embargo?
|
7
|
+
@under_embargo ||= rightsMetadata.under_embargo?
|
8
|
+
end
|
9
|
+
|
10
|
+
def open_access?
|
11
|
+
access_rights.open_access?
|
12
|
+
end
|
13
|
+
|
14
|
+
def open_access_with_embargo_release_date?
|
15
|
+
access_rights.open_access_with_embargo_release_date?
|
16
|
+
end
|
17
|
+
|
18
|
+
def authenticated_only_access?
|
19
|
+
access_rights.authenticated_only?
|
20
|
+
end
|
21
|
+
|
22
|
+
def private_access?
|
23
|
+
access_rights.private?
|
24
|
+
end
|
25
|
+
|
26
|
+
def access_rights
|
27
|
+
@access_rights ||= AccessRight.new(self)
|
28
|
+
end
|
29
|
+
protected :access_rights
|
30
|
+
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
@@ -1,17 +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
1
|
class BatchRdfDatastream < ActiveFedora::NtriplesRDFDatastream
|
16
2
|
map_predicates do |map|
|
17
3
|
map.part(:to => "hasPart", :in => RDF::DC)
|
@@ -1,17 +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
1
|
class FitsDatastream < ActiveFedora::OmDatastream
|
16
2
|
include OM::XML::Document
|
17
3
|
|
@@ -1,17 +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
1
|
class GenericFileRdfDatastream < ActiveFedora::NtriplesRDFDatastream
|
16
2
|
map_predicates do |map|
|
17
3
|
map.part_of(:to => "isPartOf", :in => RDF::DC)
|
@@ -1,17 +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
1
|
# properties datastream: catch-all for info that didn't have another home. Particularly depositor.
|
16
2
|
class PropertiesDatastream < ActiveFedora::OmDatastream
|
17
3
|
set_terminology do |t|
|
data/app/models/follow.rb
CHANGED
@@ -1,17 +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
1
|
class Follow < ActiveRecord::Base
|
16
2
|
|
17
3
|
extend ActsAsFollower::FollowerLib
|
@@ -1,16 +1,2 @@
|
|
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
1
|
class SubjectLocalAuthorityEntry < ActiveRecord::Base
|
16
2
|
end
|
@@ -10,48 +10,52 @@ module Sufia
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def visibility= (value)
|
13
|
+
return if value.nil?
|
13
14
|
# only set explicit permissions
|
14
15
|
case value
|
15
|
-
when
|
16
|
+
when Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC
|
16
17
|
public_visibility!
|
17
|
-
when
|
18
|
+
when Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED
|
18
19
|
registered_visibility!
|
19
|
-
when
|
20
|
+
when Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE
|
20
21
|
private_visibility!
|
22
|
+
else
|
23
|
+
raise ArgumentError, "Invalid visibility: #{value.inspect}"
|
21
24
|
end
|
22
25
|
end
|
23
26
|
|
24
|
-
def public_visibility!
|
25
|
-
visibility_will_change! unless visibility == 'public'
|
26
|
-
self.datastreams["rightsMetadata"].permissions({:group=>"public"}, "read")
|
27
|
-
end
|
28
|
-
|
29
|
-
def registered_visibility!
|
30
|
-
visibility_will_change! unless visibility == 'registered'
|
31
|
-
self.datastreams["rightsMetadata"].permissions({:group=>"registered"}, "read")
|
32
|
-
self.datastreams["rightsMetadata"].permissions({:group=>"public"}, "none")
|
33
|
-
end
|
34
|
-
|
35
|
-
def private_visibility!
|
36
|
-
visibility_will_change! unless visibility == 'private'
|
37
|
-
self.datastreams["rightsMetadata"].permissions({:group=>"registered"}, "none")
|
38
|
-
self.datastreams["rightsMetadata"].permissions({:group=>"public"}, "none")
|
39
|
-
end
|
40
|
-
|
41
27
|
def visibility
|
42
|
-
if read_groups.include?
|
43
|
-
|
44
|
-
elsif read_groups.include?
|
45
|
-
|
28
|
+
if read_groups.include? Sufia::Models::AccessRight::PERMISSION_TEXT_VALUE_PUBLIC
|
29
|
+
Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC
|
30
|
+
elsif read_groups.include? Sufia::Models::AccessRight::PERMISSION_TEXT_VALUE_AUTHENTICATED
|
31
|
+
Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED
|
46
32
|
else
|
47
|
-
|
33
|
+
Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE
|
48
34
|
end
|
49
35
|
end
|
50
36
|
|
51
37
|
def set_visibility(visibility)
|
52
|
-
Deprecation.warn
|
38
|
+
Deprecation.warn Visibility, "set_visibility is deprecated, use visibility= instead. set_visibility will be removed in sufia 3.0", caller
|
53
39
|
self.visibility= visibility
|
54
40
|
end
|
41
|
+
|
42
|
+
private
|
43
|
+
def public_visibility!
|
44
|
+
visibility_will_change! unless visibility == Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC
|
45
|
+
self.datastreams["rightsMetadata"].permissions({:group=>Sufia::Models::AccessRight::PERMISSION_TEXT_VALUE_PUBLIC}, "read")
|
46
|
+
end
|
47
|
+
|
48
|
+
def registered_visibility!
|
49
|
+
visibility_will_change! unless visibility == Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED
|
50
|
+
self.datastreams["rightsMetadata"].permissions({:group=>Sufia::Models::AccessRight::PERMISSION_TEXT_VALUE_AUTHENTICATED}, "read")
|
51
|
+
self.datastreams["rightsMetadata"].permissions({:group=>Sufia::Models::AccessRight::PERMISSION_TEXT_VALUE_PUBLIC}, "none")
|
52
|
+
end
|
53
|
+
|
54
|
+
def private_visibility!
|
55
|
+
visibility_will_change! unless visibility == Sufia::Models::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE
|
56
|
+
self.datastreams["rightsMetadata"].permissions({:group=>Sufia::Models::AccessRight::PERMISSION_TEXT_VALUE_AUTHENTICATED}, "none")
|
57
|
+
self.datastreams["rightsMetadata"].permissions({:group=>Sufia::Models::AccessRight::PERMISSION_TEXT_VALUE_PUBLIC}, "none")
|
58
|
+
end
|
55
59
|
end
|
56
60
|
end
|
57
61
|
end
|
@@ -1,17 +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
1
|
require 'noid'
|
16
2
|
|
17
3
|
module Sufia
|
@@ -1,17 +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
1
|
class AuditJob < ActiveFedoraPidBasedJob
|
16
2
|
def queue_name
|
17
3
|
:audit
|
@@ -1,17 +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
1
|
class CharacterizeJob < ActiveFedoraPidBasedJob
|
16
2
|
|
17
3
|
def queue_name
|
@@ -1,17 +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
1
|
class ResolrizeJob
|
16
2
|
def queue_name
|
17
3
|
:resolrize
|
@@ -1,17 +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
1
|
class UnzipJob < ActiveFedoraPidBasedJob
|
16
2
|
def queue_name
|
17
3
|
:unzip
|
data/lib/sufia/models/noid.rb
CHANGED
@@ -1,17 +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
1
|
module Sufia
|
16
2
|
module Noid
|
17
3
|
def Noid.noidify(identifier)
|
@@ -1,17 +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
1
|
# -*- encoding : utf-8 -*-
|
16
2
|
module Sufia
|
17
3
|
module SolrDocumentBehavior
|
data/lib/sufia/models/user.rb
CHANGED
@@ -1,17 +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
1
|
module Sufia::User
|
16
2
|
extend ActiveSupport::Concern
|
17
3
|
|
data/lib/sufia/models/utils.rb
CHANGED
@@ -1,17 +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
1
|
module Sufia
|
16
2
|
module Utils
|
17
3
|
extend ActiveSupport::Concern
|
data/lib/sufia/models/version.rb
CHANGED
data/lib/tasks/resque.rake
CHANGED
@@ -1,17 +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
1
|
require 'resque/pool/tasks'
|
16
2
|
|
17
3
|
# This provides access to the Rails env within all Resque workers
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sufia-models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Friesen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -240,6 +240,8 @@ files:
|
|
240
240
|
- Rakefile
|
241
241
|
- app/models/batch.rb
|
242
242
|
- app/models/checksum_audit_log.rb
|
243
|
+
- app/models/concerns/sufia/models/access_right.rb
|
244
|
+
- app/models/concerns/sufia/models/with_access_right.rb
|
243
245
|
- app/models/datastreams/batch_rdf_datastream.rb
|
244
246
|
- app/models/datastreams/file_content_datastream.rb
|
245
247
|
- app/models/datastreams/fits_datastream.rb
|