blacklight-access_controls 0.6.0 → 0.6.1

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: 1e7cd1735e1adbfc7b730e61d0b6deb065ef3d6c
4
- data.tar.gz: d1d6ad746309d9c725eee9afee7a5d2000cfa262
3
+ metadata.gz: 66b7d11bbb0aacac0df560454fcaa9197d497f0d
4
+ data.tar.gz: 6972e1277bd9fe2de05767128e2e7a5e5aed16ab
5
5
  SHA512:
6
- metadata.gz: 79b64f8758122bb057404ececc2322b8eb5b25511d96ad5a937234259860e1959dc45f79fbbef8c1f3ad4423e6fc81543363a78bf2ce780b8514d672d2e4fa64
7
- data.tar.gz: 8b0e425f6f6f93e3087803a25b00212ece6dcb1d240cc5abd7d2004198f44183e3017c4b4702449fd56a15622327b0f92414349563344c960319579bbbdd6ae3
6
+ metadata.gz: bafe87cf20a214cd8391860e189cf7ded1c169a1b95a096e5bfd5d9085d9aa476d8871d808ba36fd2e8bfee718f531034b19cf134769efbd57642071be2f3868
7
+ data.tar.gz: cee89b0b791178f86ade6bfd44b863cb2ae704549499df94100ffbe5f1586992309a471f878376d168b4a49ce10c9b987797199c342b190a63ea212561898bd0
data/.solr_wrapper.yml ADDED
@@ -0,0 +1,5 @@
1
+ # Place any default configuration for solr_wrapper here
2
+ # port: 8983
3
+ collection:
4
+ dir: solr_conf/conf/
5
+ name: blacklight-core
data/.travis.yml CHANGED
@@ -1,22 +1,15 @@
1
1
  language: ruby
2
2
  sudo: false
3
- cache:
4
- directories:
5
- - /tmp/solr-5.3.0
6
3
 
7
4
  notifications:
8
5
  email: false
9
6
 
10
7
  rvm:
11
- - 2.3.0
8
+ - 2.3.1
12
9
 
13
10
  env:
14
- - "RAILS_VERSION=4.2.5"
15
-
16
- notifications:
17
- irc: "irc.freenode.org#blacklight"
18
- email:
19
- - blacklight-commits@googlegroups.com
11
+ - "RAILS_VERSION=4.2.7.1"
12
+ - "RAILS_VERSION=5.0.0.1"
20
13
 
21
14
  global_env:
22
15
  - NOKOGIRI_USE_SYSTEM_LIBRARIES=true
data/Gemfile CHANGED
@@ -3,12 +3,11 @@ source "https://rubygems.org"
3
3
  # Specify gem dependencies in blacklight-access_controls.gemspec
4
4
  gemspec
5
5
 
6
- # -------------------------
7
6
  # BEGIN ENGINE_CART BLOCK
8
- # engine_cart: 0.8.0
9
- # engine_cart stanza: 0.8.0
7
+ # engine_cart: 0.10.0
8
+ # engine_cart stanza: 0.10.0
10
9
  # the below comes from engine_cart, a gem used to test this Rails engine gem in the context of a Rails app.
11
- file = File.expand_path("Gemfile", ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path(".internal_test_app", File.dirname(__FILE__)))
10
+ file = File.expand_path('Gemfile', ENV['ENGINE_CART_DESTINATION'] || ENV['RAILS_ROOT'] || File.expand_path('.internal_test_app', File.dirname(__FILE__)))
12
11
  if File.exist?(file)
13
12
  begin
14
13
  eval_gemfile file
@@ -19,14 +18,22 @@ if File.exist?(file)
19
18
  else
20
19
  Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
21
20
 
22
- gem 'rails', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
21
+ if ENV['RAILS_VERSION']
22
+ if ENV['RAILS_VERSION'] == 'edge'
23
+ gem 'rails', github: 'rails/rails'
24
+ ENV['ENGINE_CART_RAILS_OPTIONS'] = '--edge --skip-turbolinks'
25
+ else
26
+ gem 'rails', ENV['RAILS_VERSION']
27
+ end
28
+ end
23
29
 
24
- if ENV['RAILS_VERSION'].nil? || ENV['RAILS_VERSION'] =~ /^4.2/
25
- gem 'responders', "~> 2.0"
26
- gem 'sass-rails', ">= 5.0"
27
- else
28
- gem 'sass-rails', "< 5.0"
30
+ case ENV['RAILS_VERSION']
31
+ when /^4.2/
32
+ gem 'responders', '~> 2.0'
33
+ gem 'sass-rails', '>= 5.0'
34
+ gem 'coffee-rails', '~> 4.1.0'
35
+ when /^4.[01]/
36
+ gem 'sass-rails', '< 5.0'
29
37
  end
30
38
  end
31
39
  # END ENGINE_CART BLOCK
32
- # -------------------------
data/README.textile CHANGED
@@ -1,4 +1,5 @@
1
1
  h1. Blacklight Access Controls
2
+ !https://travis-ci.org/projectblacklight/blacklight-access_controls.svg?branch=master!:https://travis-ci.org/projectblacklight/blacklight-access_controls
2
3
 
3
4
  Provides access controls for Blacklight-based applications.
4
5
 
data/Rakefile CHANGED
@@ -22,18 +22,10 @@ def solr_config_dir
22
22
  end
23
23
 
24
24
  namespace :solr do
25
- desc 'Configure solr cores'
26
- task :config do
27
- SolrWrapper.wrap do |solr|
28
- solr.create(name: 'development', dir: solr_config_dir)
29
- solr.create(name: 'test', dir: solr_config_dir)
30
- end
31
- end
32
-
33
25
  desc 'Run test suite (with solr wrapper)'
34
26
  task :spec do
35
27
  SolrWrapper.wrap do |solr|
36
- solr.with_collection(name: 'test', dir: solr_config_dir) do # |collection_name|
28
+ solr.with_collection(name: 'blacklight-core', dir: solr_config_dir) do # |collection_name|
37
29
  Rake::Task['spec'].invoke
38
30
  end
39
31
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.6.0
1
+ 0.6.1
@@ -21,9 +21,9 @@ Gem::Specification.new do |gem|
21
21
  gem.add_dependency "blacklight", '~> 6.0'
22
22
  gem.add_dependency "deprecation", '~> 1.0'
23
23
 
24
- gem.add_development_dependency "rake", '~> 10.1'
24
+ gem.add_development_dependency "rake", '~> 11.3'
25
25
  gem.add_development_dependency 'rspec', '~> 3.1'
26
- gem.add_development_dependency "engine_cart", "~> 0.8"
26
+ gem.add_development_dependency "engine_cart", "~> 1.0"
27
27
  gem.add_development_dependency "solr_wrapper"
28
28
  gem.add_development_dependency "factory_girl_rails", "~> 4.0"
29
29
  gem.add_development_dependency "database_cleaner"
@@ -27,10 +27,10 @@ module Blacklight::AccessControls
27
27
  raise Blacklight::Exceptions::InvalidSolrID, 'The application is trying to retrieve permissions without specifying an asset id' if id.nil?
28
28
  solr_opts = permissions_solr_doc_params(id).merge(extra_controller_params)
29
29
  response = Blacklight.default_index.connection.get('select', params: solr_opts)
30
- solr_response = Blacklight::Solr::Response.new(response, solr_opts)
30
+ solr_response = Blacklight::Solr::Response.new(response, solr_opts, document_model: permissions_document_class)
31
31
 
32
32
  raise Blacklight::Exceptions::InvalidSolrID, "The solr permissions search handler didn't return anything for id \"#{id}\"" if solr_response.docs.empty?
33
- permissions_document_class.new(solr_response.docs.first, solr_response)
33
+ solr_response.docs.first
34
34
  end
35
35
 
36
36
  #
data/spec/spec_helper.rb CHANGED
@@ -5,6 +5,7 @@ require 'engine_cart'
5
5
  EngineCart.load_application!
6
6
 
7
7
  require 'blacklight-access_controls'
8
+
8
9
  require 'factory_girl_rails'
9
10
  require 'database_cleaner'
10
11
 
@@ -12,7 +12,7 @@
12
12
 
13
13
  development:
14
14
  adapter: solr
15
- url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/development" %>
15
+ url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %>
16
16
  test: &test
17
17
  adapter: solr
18
- url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/test" %>
18
+ url: <%= ENV['SOLR_URL'] || "http://127.0.0.1:8983/solr/blacklight-core" %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: blacklight-access_controls
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-09-01 00:00:00.000000000 Z
14
+ date: 2016-10-06 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cancancan
@@ -61,14 +61,14 @@ dependencies:
61
61
  requirements:
62
62
  - - "~>"
63
63
  - !ruby/object:Gem::Version
64
- version: '10.1'
64
+ version: '11.3'
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - "~>"
70
70
  - !ruby/object:Gem::Version
71
- version: '10.1'
71
+ version: '11.3'
72
72
  - !ruby/object:Gem::Dependency
73
73
  name: rspec
74
74
  requirement: !ruby/object:Gem::Requirement
@@ -89,14 +89,14 @@ dependencies:
89
89
  requirements:
90
90
  - - "~>"
91
91
  - !ruby/object:Gem::Version
92
- version: '0.8'
92
+ version: '1.0'
93
93
  type: :development
94
94
  prerelease: false
95
95
  version_requirements: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
- version: '0.8'
99
+ version: '1.0'
100
100
  - !ruby/object:Gem::Dependency
101
101
  name: solr_wrapper
102
102
  requirement: !ruby/object:Gem::Requirement
@@ -178,6 +178,7 @@ files:
178
178
  - ".rspec"
179
179
  - ".rubocop.yml"
180
180
  - ".rubocop_todo.yml"
181
+ - ".solr_wrapper.yml"
181
182
  - ".travis.yml"
182
183
  - Gemfile
183
184
  - README.textile