hydra-core 7.0.0.pre2 → 7.0.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/hydra/blacklight_helper_behavior.rb +1 -19
- data/hydra-core.gemspec +0 -3
- data/lib/generators/hydra/templates/catalog_controller.rb +2 -6
- data/lib/hydra-head/version.rb +1 -1
- data/spec/controllers/catalog_controller_spec.rb +1 -1
- data/spec/helpers/blacklight_helper_spec.rb +3 -3
- data/spec/support/lib/generators/test_app_generator.rb +1 -1
- metadata +24 -66
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 18a618b3fb6dfe1dcc4cb985f041d1f672628228
|
4
|
+
data.tar.gz: 2bafd276b60113f63ff2b306614903b66aad9f97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b4b2695fc4e9fd5ff5bd1b6e0e4a43465ca9f72e19192f365b682f83b6f66aa82f0180d73e897ec7a92a16bec9661c413f3f8dde79916f409c0167cd6989281
|
7
|
+
data.tar.gz: 18417a2b15c3c2391ffe0abca2232fd4dbd38ff0a3f2a1b34d1a31e49f6c76767c5fa88dc9234b39592652442a612a93c58784e31788f50edbd07443b3af9995
|
@@ -12,29 +12,11 @@ module Hydra
|
|
12
12
|
# document_partial_name('has_model_s' => ["info:fedora/hull-cModel:text.pdf"])
|
13
13
|
# => "text_pdf"
|
14
14
|
def document_partial_name(document)
|
15
|
-
display_type = document[blacklight_config.show.
|
15
|
+
display_type = document[blacklight_config.show.display_type_field]
|
16
16
|
|
17
17
|
return 'default' unless display_type
|
18
18
|
|
19
19
|
Array(display_type).first.gsub(/^[^\/]+\/[^:]+:/,"").gsub(/\./, '_').underscore
|
20
20
|
end
|
21
|
-
|
22
|
-
# COPIED from vendor/plugins/blacklight/app/helpers/application_helper.rb
|
23
|
-
# Used in catalog/facet action, facets.rb view, for a click
|
24
|
-
# on a facet value. Add on the facet params to existing
|
25
|
-
# search constraints. Remove any paginator-specific request
|
26
|
-
# params, or other request params that should be removed
|
27
|
-
# for a 'fresh' display.
|
28
|
-
# Change the action to 'index' to send them back to
|
29
|
-
# catalog/index with their new facet choice.
|
30
|
-
def add_facet_params_and_redirect(field, value)
|
31
|
-
new_params = super
|
32
|
-
|
33
|
-
# Delete :qt, if needed - added to resolve NPE errors
|
34
|
-
new_params.delete(:qt)
|
35
|
-
|
36
|
-
new_params
|
37
|
-
end
|
38
|
-
|
39
21
|
end
|
40
22
|
end
|
data/hydra-core.gemspec
CHANGED
@@ -21,10 +21,7 @@ Gem::Specification.new do |gem|
|
|
21
21
|
|
22
22
|
|
23
23
|
gem.add_dependency "rails", '>= 3.2.3', '< 5'
|
24
|
-
gem.add_dependency "blacklight", '~> 4.0'
|
25
|
-
gem.add_dependency "active-fedora"
|
26
24
|
gem.add_dependency 'block_helpers'
|
27
|
-
gem.add_dependency 'deprecation', ">= 0.0.5"
|
28
25
|
gem.add_dependency 'hydra-access-controls', version
|
29
26
|
gem.add_dependency 'jettywrapper', ">=1.4.1"
|
30
27
|
|
@@ -20,13 +20,9 @@ class CatalogController < ApplicationController
|
|
20
20
|
}
|
21
21
|
|
22
22
|
# solr field configuration for search results/index views
|
23
|
-
config.index.
|
24
|
-
config.index.
|
23
|
+
config.index.title_field = 'title_tesim'
|
24
|
+
config.index.display_type_field = 'has_model_ssim'
|
25
25
|
|
26
|
-
# solr field configuration for document/show views
|
27
|
-
config.show.html_title = 'title_tesim'
|
28
|
-
config.show.heading = 'title_tesim'
|
29
|
-
config.show.display_type = 'has_model_ssim'
|
30
26
|
|
31
27
|
# solr fields that will be treated as facets by the blacklight application
|
32
28
|
# The ordering of the field names is the order of the display
|
data/lib/hydra-head/version.rb
CHANGED
@@ -56,7 +56,7 @@ describe CatalogController do
|
|
56
56
|
before(:all) do
|
57
57
|
fq = "read_access_group_ssim:public OR edit_access_group_ssim:public OR discover_access_group_ssim:public"
|
58
58
|
solr_opts = {:fq=>fq}
|
59
|
-
response =
|
59
|
+
response = ActiveFedora::SolrService.instance.conn.get('select', :params=> solr_opts)
|
60
60
|
@public_only_results = Blacklight::SolrResponse.new(response, solr_opts)
|
61
61
|
end
|
62
62
|
|
@@ -4,7 +4,7 @@ describe BlacklightHelper do
|
|
4
4
|
describe "document_partial_name" do
|
5
5
|
it "should lop off everything before the first colin after the slash" do
|
6
6
|
@config = Blacklight::Configuration.new.configure do |config|
|
7
|
-
config.show.
|
7
|
+
config.show.display_type_field = 'has_model_s'
|
8
8
|
end
|
9
9
|
helper.stub(:blacklight_config).and_return(@config)
|
10
10
|
helper.document_partial_name('has_model_s' => ["info:fedora/afmodel:Presentation"]).should == "presentation"
|
@@ -12,7 +12,7 @@ describe BlacklightHelper do
|
|
12
12
|
end
|
13
13
|
it "should support single valued fields" do
|
14
14
|
@config = Blacklight::Configuration.new.configure do |config|
|
15
|
-
config.show.
|
15
|
+
config.show.display_type_field = 'active_fedora_model_ssi'
|
16
16
|
end
|
17
17
|
helper.stub(:blacklight_config).and_return(@config)
|
18
18
|
helper.document_partial_name('active_fedora_model_ssi' => "Chicken").should == "chicken"
|
@@ -20,7 +20,7 @@ describe BlacklightHelper do
|
|
20
20
|
|
21
21
|
it "should handle periods" do
|
22
22
|
@config = Blacklight::Configuration.new.configure do |config|
|
23
|
-
config.show.
|
23
|
+
config.show.display_type_field = 'has_model_s'
|
24
24
|
end
|
25
25
|
helper.stub(:blacklight_config).and_return(@config)
|
26
26
|
helper.document_partial_name('has_model_s' => ["info:fedora/afmodel:text.PDF"]).should == "text_pdf"
|
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: 7.0.0.
|
4
|
+
version: 7.0.0.pre3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Zumwalt, Bess Sadler, Julie Meloni, Naomi Dushay, Jessie Keck, John Scofield,
|
@@ -9,166 +9,124 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - ">="
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 3.2.3
|
21
|
-
- - <
|
21
|
+
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: '5'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
|
-
- -
|
28
|
+
- - ">="
|
29
29
|
- !ruby/object:Gem::Version
|
30
30
|
version: 3.2.3
|
31
|
-
- - <
|
31
|
+
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '5'
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: blacklight
|
36
|
-
requirement: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '4.0'
|
41
|
-
type: :runtime
|
42
|
-
prerelease: false
|
43
|
-
version_requirements: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ~>
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '4.0'
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: active-fedora
|
50
|
-
requirement: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
type: :runtime
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: !ruby/object:Gem::Requirement
|
58
|
-
requirements:
|
59
|
-
- - '>='
|
60
|
-
- !ruby/object:Gem::Version
|
61
|
-
version: '0'
|
62
34
|
- !ruby/object:Gem::Dependency
|
63
35
|
name: block_helpers
|
64
36
|
requirement: !ruby/object:Gem::Requirement
|
65
37
|
requirements:
|
66
|
-
- -
|
38
|
+
- - ">="
|
67
39
|
- !ruby/object:Gem::Version
|
68
40
|
version: '0'
|
69
41
|
type: :runtime
|
70
42
|
prerelease: false
|
71
43
|
version_requirements: !ruby/object:Gem::Requirement
|
72
44
|
requirements:
|
73
|
-
- -
|
45
|
+
- - ">="
|
74
46
|
- !ruby/object:Gem::Version
|
75
47
|
version: '0'
|
76
|
-
- !ruby/object:Gem::Dependency
|
77
|
-
name: deprecation
|
78
|
-
requirement: !ruby/object:Gem::Requirement
|
79
|
-
requirements:
|
80
|
-
- - '>='
|
81
|
-
- !ruby/object:Gem::Version
|
82
|
-
version: 0.0.5
|
83
|
-
type: :runtime
|
84
|
-
prerelease: false
|
85
|
-
version_requirements: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - '>='
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: 0.0.5
|
90
48
|
- !ruby/object:Gem::Dependency
|
91
49
|
name: hydra-access-controls
|
92
50
|
requirement: !ruby/object:Gem::Requirement
|
93
51
|
requirements:
|
94
52
|
- - '='
|
95
53
|
- !ruby/object:Gem::Version
|
96
|
-
version: 7.0.0.
|
54
|
+
version: 7.0.0.pre3
|
97
55
|
type: :runtime
|
98
56
|
prerelease: false
|
99
57
|
version_requirements: !ruby/object:Gem::Requirement
|
100
58
|
requirements:
|
101
59
|
- - '='
|
102
60
|
- !ruby/object:Gem::Version
|
103
|
-
version: 7.0.0.
|
61
|
+
version: 7.0.0.pre3
|
104
62
|
- !ruby/object:Gem::Dependency
|
105
63
|
name: jettywrapper
|
106
64
|
requirement: !ruby/object:Gem::Requirement
|
107
65
|
requirements:
|
108
|
-
- -
|
66
|
+
- - ">="
|
109
67
|
- !ruby/object:Gem::Version
|
110
68
|
version: 1.4.1
|
111
69
|
type: :runtime
|
112
70
|
prerelease: false
|
113
71
|
version_requirements: !ruby/object:Gem::Requirement
|
114
72
|
requirements:
|
115
|
-
- -
|
73
|
+
- - ">="
|
116
74
|
- !ruby/object:Gem::Version
|
117
75
|
version: 1.4.1
|
118
76
|
- !ruby/object:Gem::Dependency
|
119
77
|
name: sqlite3
|
120
78
|
requirement: !ruby/object:Gem::Requirement
|
121
79
|
requirements:
|
122
|
-
- -
|
80
|
+
- - ">="
|
123
81
|
- !ruby/object:Gem::Version
|
124
82
|
version: '0'
|
125
83
|
type: :development
|
126
84
|
prerelease: false
|
127
85
|
version_requirements: !ruby/object:Gem::Requirement
|
128
86
|
requirements:
|
129
|
-
- -
|
87
|
+
- - ">="
|
130
88
|
- !ruby/object:Gem::Version
|
131
89
|
version: '0'
|
132
90
|
- !ruby/object:Gem::Dependency
|
133
91
|
name: yard
|
134
92
|
requirement: !ruby/object:Gem::Requirement
|
135
93
|
requirements:
|
136
|
-
- -
|
94
|
+
- - ">="
|
137
95
|
- !ruby/object:Gem::Version
|
138
96
|
version: '0'
|
139
97
|
type: :development
|
140
98
|
prerelease: false
|
141
99
|
version_requirements: !ruby/object:Gem::Requirement
|
142
100
|
requirements:
|
143
|
-
- -
|
101
|
+
- - ">="
|
144
102
|
- !ruby/object:Gem::Version
|
145
103
|
version: '0'
|
146
104
|
- !ruby/object:Gem::Dependency
|
147
105
|
name: rspec-rails
|
148
106
|
requirement: !ruby/object:Gem::Requirement
|
149
107
|
requirements:
|
150
|
-
- -
|
108
|
+
- - ">="
|
151
109
|
- !ruby/object:Gem::Version
|
152
110
|
version: '0'
|
153
111
|
type: :development
|
154
112
|
prerelease: false
|
155
113
|
version_requirements: !ruby/object:Gem::Requirement
|
156
114
|
requirements:
|
157
|
-
- -
|
115
|
+
- - ">="
|
158
116
|
- !ruby/object:Gem::Version
|
159
117
|
version: '0'
|
160
118
|
- !ruby/object:Gem::Dependency
|
161
119
|
name: factory_girl_rails
|
162
120
|
requirement: !ruby/object:Gem::Requirement
|
163
121
|
requirements:
|
164
|
-
- -
|
122
|
+
- - ">="
|
165
123
|
- !ruby/object:Gem::Version
|
166
124
|
version: '0'
|
167
125
|
type: :development
|
168
126
|
prerelease: false
|
169
127
|
version_requirements: !ruby/object:Gem::Requirement
|
170
128
|
requirements:
|
171
|
-
- -
|
129
|
+
- - ">="
|
172
130
|
- !ruby/object:Gem::Version
|
173
131
|
version: '0'
|
174
132
|
description: 'Hydra-Head is a Rails Engine containing the core code for a Hydra application.
|
@@ -180,7 +138,7 @@ executables: []
|
|
180
138
|
extensions: []
|
181
139
|
extra_rdoc_files: []
|
182
140
|
files:
|
183
|
-
- .gitignore
|
141
|
+
- ".gitignore"
|
184
142
|
- Rakefile
|
185
143
|
- app/controllers/concerns/hydra/controller.rb
|
186
144
|
- app/controllers/concerns/hydra/controller/controller_behavior.rb
|
@@ -262,17 +220,17 @@ require_paths:
|
|
262
220
|
- lib
|
263
221
|
required_ruby_version: !ruby/object:Gem::Requirement
|
264
222
|
requirements:
|
265
|
-
- -
|
223
|
+
- - ">="
|
266
224
|
- !ruby/object:Gem::Version
|
267
225
|
version: 1.9.3
|
268
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
269
227
|
requirements:
|
270
|
-
- -
|
228
|
+
- - ">"
|
271
229
|
- !ruby/object:Gem::Version
|
272
230
|
version: 1.3.1
|
273
231
|
requirements: []
|
274
232
|
rubyforge_project:
|
275
|
-
rubygems_version: 2.
|
233
|
+
rubygems_version: 2.2.2
|
276
234
|
signing_key:
|
277
235
|
specification_version: 4
|
278
236
|
summary: Hydra-Head Rails Engine (requires Rails3)
|