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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2936e5b807433daa6ecd2c103eb663255afa6815
4
- data.tar.gz: 0bcbd88134dea8542bf81852bb9ff15d39c35317
3
+ metadata.gz: 124bb44e71c185a51d708ad4c7a368ff767315fd
4
+ data.tar.gz: 41fd3af3306eb3f9cf8943a048cba3eddde884a9
5
5
  SHA512:
6
- metadata.gz: 9e3a0171c9cb88cbc161b86295a628f2c4d5b0a1f45a22a4322d2c562ed167d49455c6c064ef4d8a9909fdc44df951584c8332d8bf4c09e0276a551a766f32bd
7
- data.tar.gz: a15532976668837b47d10e1f93511abe7f109486a21a1b832bc1e7117ffd7063c3e2750e4130e02a62df0975e464a15cc371d7d057f97ad4643d47d592a74672
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.1'
25
- gem.add_dependency "blacklight", '~> 5.10'
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', :params=> solr_opts)
26
- solr_response = Blacklight::SolrResponse.new(response, solr_opts)
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
- :qt => :permissions,
46
- :id => id # this assumes the document request handler will map the 'id' param to the unique key field
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
- require_relative '../app/vocabularies/acl'
26
- require_relative '../app/vocabularies/hydra/acl'
27
- require_relative '../app/models/role_mapper'
28
- require_relative '../app/models/ability'
29
- require_relative '../app/indexers/hydra/access_controls/embargo_indexer'
30
- require_relative '../app/indexers/hydra/access_controls/lease_indexer'
31
- require_relative '../app/models/hydra/access_controls/access_control_list'
32
- require_relative '../app/models/hydra/access_controls/permission'
33
- require_relative '../app/models/hydra/access_controls/embargo'
34
- require_relative '../app/models/hydra/access_controls/lease'
35
- require_relative '../app/models/concerns/hydra/with_depositor'
36
- require_relative '../app/models/concerns/hydra/ip_based_ability'
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.1
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-03 00:00:00.000000000 Z
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.1'
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.1'
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.10'
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.10'
84
+ version: '5.16'
85
85
  - !ruby/object:Gem::Dependency
86
86
  name: sass-rails
87
87
  requirement: !ruby/object:Gem::Requirement