hydra-access-controls 9.4.1 → 9.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hydra-access-controls.gemspec +2 -2
- data/lib/hydra/permissions_query.rb +5 -6
- data/spec/spec_helper.rb +12 -15
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 124bb44e71c185a51d708ad4c7a368ff767315fd
|
4
|
+
data.tar.gz: 41fd3af3306eb3f9cf8943a048cba3eddde884a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fc4407250c8593de0233f270cf3d1bbe638916713dab4b1e8e9462dcb3ebfbd52162fce9037e03af7ccfcaba8ce227f9c662f0c6c487d41e5ee836c2e0a8d3a
|
7
|
+
data.tar.gz: 5ea74853a2c5782822c74640bfb7197b2e45950e25677eab3072720c0dad2b7ac77c55a2879d5f7c771fd36f2fa452aa6f8f36a760ccea1550c4c21545d6d190
|
@@ -21,8 +21,8 @@ Gem::Specification.new do |gem|
|
|
21
21
|
gem.add_dependency 'activesupport', '~> 4.0'
|
22
22
|
gem.add_dependency "active-fedora", '~> 9.0'
|
23
23
|
gem.add_dependency 'cancancan', '~> 1.8'
|
24
|
-
gem.add_dependency 'deprecation', '~> 0.
|
25
|
-
gem.add_dependency "blacklight", '~> 5.
|
24
|
+
gem.add_dependency 'deprecation', '~> 0.2'
|
25
|
+
gem.add_dependency "blacklight", '~> 5.16'
|
26
26
|
|
27
27
|
# sass-rails is typically generated into the app's gemfile by `rails new`
|
28
28
|
# In rails 3 it's put into the "assets" group and thus not available to the
|
@@ -11,7 +11,6 @@ module Hydra
|
|
11
11
|
doc
|
12
12
|
end
|
13
13
|
|
14
|
-
|
15
14
|
protected
|
16
15
|
|
17
16
|
# a solr query method
|
@@ -22,8 +21,8 @@ module Hydra
|
|
22
21
|
def get_permissions_solr_response_for_doc_id(id=nil, extra_controller_params={})
|
23
22
|
raise Blacklight::Exceptions::InvalidSolrID.new("The application is trying to retrieve permissions without specifying an asset id") if id.nil?
|
24
23
|
solr_opts = permissions_solr_doc_params(id).merge(extra_controller_params)
|
25
|
-
response = ActiveFedora::SolrService.instance.conn.get('select', :
|
26
|
-
solr_response = Blacklight::
|
24
|
+
response = ActiveFedora::SolrService.instance.conn.get('select', params: solr_opts)
|
25
|
+
solr_response = Blacklight::Solr::Response.new(response, solr_opts)
|
27
26
|
|
28
27
|
raise Blacklight::Exceptions::InvalidSolrID.new("The solr permissions search handler didn't return anything for id \"#{id}\"") if solr_response.docs.empty?
|
29
28
|
Hydra::PermissionsSolrDocument.new(solr_response.docs.first, solr_response)
|
@@ -42,9 +41,9 @@ module Hydra
|
|
42
41
|
id ||= params[:id]
|
43
42
|
# just to be consistent with the other solr param methods:
|
44
43
|
{
|
45
|
-
:
|
46
|
-
:
|
44
|
+
qt: :permissions,
|
45
|
+
id: id # this assumes the document request handler will map the 'id' param to the unique key field
|
47
46
|
}
|
48
47
|
end
|
49
|
-
end
|
48
|
+
end
|
50
49
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -22,21 +22,18 @@ end
|
|
22
22
|
require 'support/rails'
|
23
23
|
|
24
24
|
# Since we're not doing a Rails Engine test, we have to load these classes manually:
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
require_relative '../app/services/hydra/lease_service'
|
38
|
-
require_relative '../app/services/hydra/embargo_service'
|
39
|
-
require_relative '../app/validators/hydra/future_date_validator'
|
25
|
+
require 'active_support'
|
26
|
+
require 'active_support/dependencies'
|
27
|
+
relative_load_paths = ["#{Blacklight.root}/app/controllers/concerns",
|
28
|
+
"#{Blacklight.root}/app/models",
|
29
|
+
"app/models",
|
30
|
+
"app/models/concerns",
|
31
|
+
"app/indexers",
|
32
|
+
"app/services",
|
33
|
+
"app/validators",
|
34
|
+
"app/vocabularies"]
|
35
|
+
ActiveSupport::Dependencies.autoload_paths += relative_load_paths
|
36
|
+
|
40
37
|
require 'support/mods_asset'
|
41
38
|
require 'support/solr_document'
|
42
39
|
require "support/user"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-access-controls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Beer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2015-11-
|
13
|
+
date: 2015-11-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -60,28 +60,28 @@ dependencies:
|
|
60
60
|
requirements:
|
61
61
|
- - "~>"
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: '0.
|
63
|
+
version: '0.2'
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - "~>"
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: '0.
|
70
|
+
version: '0.2'
|
71
71
|
- !ruby/object:Gem::Dependency
|
72
72
|
name: blacklight
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
74
74
|
requirements:
|
75
75
|
- - "~>"
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version: '5.
|
77
|
+
version: '5.16'
|
78
78
|
type: :runtime
|
79
79
|
prerelease: false
|
80
80
|
version_requirements: !ruby/object:Gem::Requirement
|
81
81
|
requirements:
|
82
82
|
- - "~>"
|
83
83
|
- !ruby/object:Gem::Version
|
84
|
-
version: '5.
|
84
|
+
version: '5.16'
|
85
85
|
- !ruby/object:Gem::Dependency
|
86
86
|
name: sass-rails
|
87
87
|
requirement: !ruby/object:Gem::Requirement
|