hydra-core 9.1.1 → 9.1.2
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/controllers/concerns/hydra/catalog.rb +5 -0
- data/app/controllers/concerns/hydra/controller/controller_behavior.rb +1 -6
- data/app/controllers/concerns/hydra/controller/search_builder.rb +9 -0
- data/lib/generators/hydra/head_generator.rb +11 -1
- data/lib/generators/hydra/templates/catalog_controller.rb +1 -2
- data/lib/hydra-head/version.rb +1 -1
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac588315cdf1172497fb2ad3791de1a5337ed896
|
4
|
+
data.tar.gz: 144af558698a89db79f7a1be3a0f0852e7f608dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 014b179384dd2fa6ba2fef3a3288a5fa61fe55adcf106708b98aeb3009b6f5b1da1c217a39a9113e59c7fb9c87e7623c2588f5da5c1b682f00238c1838ee9e48
|
7
|
+
data.tar.gz: 5f7433fed253c1d65253b8c0609c76e021b540548023047e692c40a46a01ab8ff8cc00afc2c72e083296ea636df0a7d0ca9628e11d5a12d644925b59f4421f7d
|
@@ -16,12 +16,7 @@ module Hydra::Controller::ControllerBehavior
|
|
16
16
|
rescue_from CanCan::AccessDenied, with: :deny_access
|
17
17
|
end
|
18
18
|
|
19
|
-
#
|
20
|
-
def search_builder processor_chain = search_params_logic
|
21
|
-
super.tap { |builder| builder.current_ability = current_ability }
|
22
|
-
end
|
23
|
-
|
24
|
-
# get the currently configured user identifier. Can be overridden to return whatever (ie. login, email, etc)
|
19
|
+
# get the currently configured user identifier. Can be overridden to return whatever (ie. login, email, etc)
|
25
20
|
# defaults to using whatever you have set as the Devise authentication_key
|
26
21
|
def user_key
|
27
22
|
current_user.user_key if current_user
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module Hydra::Controller::SearchBuilder
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
# Override blacklight to produce a search_builder that has the current collection in context
|
5
|
+
def search_builder processor_chain = search_params_logic
|
6
|
+
super.tap { |builder| builder.current_ability = current_ability }
|
7
|
+
end
|
8
|
+
|
9
|
+
end
|
@@ -41,9 +41,19 @@ module Hydra
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
def overwrite_catalog_controller
|
45
|
+
copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
|
46
|
+
end
|
47
|
+
|
48
|
+
# Add Hydra to the application controller
|
49
|
+
def inject_hydra_controller_behavior
|
50
|
+
insert_into_file "app/controllers/application_controller.rb", after: "include Blacklight::Controller\n" do
|
51
|
+
" include Hydra::Controller::ControllerBehavior\n"
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
44
55
|
# Copy all files in templates/config directory to host config
|
45
56
|
def create_configuration_files
|
46
|
-
copy_file "catalog_controller.rb", "app/controllers/catalog_controller.rb"
|
47
57
|
|
48
58
|
# Initializers
|
49
59
|
file_path = "config/initializers/hydra_config.rb"
|
@@ -3,8 +3,7 @@ require 'blacklight/catalog'
|
|
3
3
|
|
4
4
|
class CatalogController < ApplicationController
|
5
5
|
|
6
|
-
include
|
7
|
-
include Hydra::Controller::ControllerBehavior
|
6
|
+
include Hydra::Catalog
|
8
7
|
# These before_filters apply the hydra access controls
|
9
8
|
before_filter :enforce_show_permissions, :only=>:show
|
10
9
|
# This applies appropriate access controls to all solr queries
|
data/lib/hydra-head/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hydra-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.1.
|
4
|
+
version: 9.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-03-
|
12
|
+
date: 2015-03-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -31,14 +31,14 @@ dependencies:
|
|
31
31
|
requirements:
|
32
32
|
- - '='
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: 9.1.
|
34
|
+
version: 9.1.2
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
39
|
- - '='
|
40
40
|
- !ruby/object:Gem::Version
|
41
|
-
version: 9.1.
|
41
|
+
version: 9.1.2
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: jettywrapper
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,9 +120,11 @@ extra_rdoc_files: []
|
|
120
120
|
files:
|
121
121
|
- ".gitignore"
|
122
122
|
- Rakefile
|
123
|
+
- app/controllers/concerns/hydra/catalog.rb
|
123
124
|
- app/controllers/concerns/hydra/controller.rb
|
124
125
|
- app/controllers/concerns/hydra/controller/controller_behavior.rb
|
125
126
|
- app/controllers/concerns/hydra/controller/download_behavior.rb
|
127
|
+
- app/controllers/concerns/hydra/controller/search_builder.rb
|
126
128
|
- app/helpers/blacklight_helper.rb
|
127
129
|
- app/helpers/hydra/blacklight_helper_behavior.rb
|
128
130
|
- app/models/concerns/hydra/model_methods.rb
|
@@ -192,7 +194,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
192
194
|
version: '0'
|
193
195
|
requirements: []
|
194
196
|
rubyforge_project:
|
195
|
-
rubygems_version: 2.4.
|
197
|
+
rubygems_version: 2.4.6
|
196
198
|
signing_key:
|
197
199
|
specification_version: 4
|
198
200
|
summary: Hydra-Head Rails Engine (requires Rails3)
|