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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eeaf0ad10fe003791b1a113272ea588e56670fc1
4
- data.tar.gz: a05450f3306ecef24f812e9daa9c62b785ce14c0
3
+ metadata.gz: ac588315cdf1172497fb2ad3791de1a5337ed896
4
+ data.tar.gz: 144af558698a89db79f7a1be3a0f0852e7f608dd
5
5
  SHA512:
6
- metadata.gz: 062b3bfc9c2f5658da3a1b87763478c37c1930a0fca2938cc8fb38ccfe6d1d0f16fc4033b3f19d9812939dc0811ddd6b827859ebafdb0d7b2a6dc61cbe39f1cb
7
- data.tar.gz: f0daddca17fb68cf7e917287a97ea58d8c7b8275a664a0654743a8cae4c2e9f8e0fa9922c9c66cf6026850bd8705744128d2b10bd2f6e4c39e46c6aa60c0631b
6
+ metadata.gz: 014b179384dd2fa6ba2fef3a3288a5fa61fe55adcf106708b98aeb3009b6f5b1da1c217a39a9113e59c7fb9c87e7623c2588f5da5c1b682f00238c1838ee9e48
7
+ data.tar.gz: 5f7433fed253c1d65253b8c0609c76e021b540548023047e692c40a46a01ab8ff8cc00afc2c72e083296ea636df0a7d0ca9628e11d5a12d644925b59f4421f7d
@@ -0,0 +1,5 @@
1
+ module Hydra::Catalog
2
+ extend ActiveSupport::Concern
3
+ include Blacklight::Catalog
4
+ include Hydra::Controller::SearchBuilder
5
+ end
@@ -16,12 +16,7 @@ module Hydra::Controller::ControllerBehavior
16
16
  rescue_from CanCan::AccessDenied, with: :deny_access
17
17
  end
18
18
 
19
- # Override blacklight to produce a search_builder that has the current collection in context
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 Blacklight::Catalog
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
@@ -1,3 +1,3 @@
1
1
  module HydraHead
2
- VERSION = "9.1.1"
2
+ VERSION = "9.1.2"
3
3
  end
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.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-10 00:00:00.000000000 Z
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.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.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.5
197
+ rubygems_version: 2.4.6
196
198
  signing_key:
197
199
  specification_version: 4
198
200
  summary: Hydra-Head Rails Engine (requires Rails3)