ebsco-eds 0.2.4.pre → 0.2.5.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ebsco/eds/configuration.rb +1 -1
- data/lib/ebsco/eds/options.rb +27 -3
- data/lib/ebsco/eds/record.rb +5 -1
- data/lib/ebsco/eds/results.rb +6 -2
- data/lib/ebsco/eds/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e370c38b63e3ff1410ce4cee4d50394d5f2df67
|
4
|
+
data.tar.gz: d22f2c176ffa0a2f26625a472662b6f9397b052f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35b21cfb0179fe336a2adc0a4a848e184689a0eadd4ebf14900d8d60a90b8d60951df8a361d950a11bdc21c8ee75b2c7e94e1e86337b8de6df26806661670834
|
7
|
+
data.tar.gz: e40c20c649c5a7fb5edddddf461ec34f2a340358f6a7c3f47cb79cc3b86f419af6343900e9ac3a91081d5660387c5a912dc0fb7865114abdac0dabb2630ce95b
|
data/lib/ebsco/eds/options.rb
CHANGED
@@ -22,6 +22,25 @@ module EBSCO
|
|
22
22
|
# end
|
23
23
|
# end
|
24
24
|
|
25
|
+
# blacklight year range slider input
|
26
|
+
# "range"=>{"pub_year_tisim"=>{"begin"=>"1970", "end"=>"1980"}}
|
27
|
+
if options.has_key?('range')
|
28
|
+
if options['range'].has_key?('pub_year_tisim')
|
29
|
+
begin_year = nil
|
30
|
+
end_year = nil
|
31
|
+
if options['range']['pub_year_tisim'].has_key?('begin')
|
32
|
+
begin_year = options['range']['pub_year_tisim']['begin']
|
33
|
+
end
|
34
|
+
if options['range']['pub_year_tisim'].has_key?('end')
|
35
|
+
end_year = options['range']['pub_year_tisim']['end']
|
36
|
+
end
|
37
|
+
unless begin_year.nil? or end_year.nil?
|
38
|
+
pub_year_tisim_range = begin_year + '-01/' + end_year + '-01'
|
39
|
+
@Actions.push "addlimiter(DT1:#{pub_year_tisim_range})"
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
25
44
|
options.each do |key, value|
|
26
45
|
|
27
46
|
case key
|
@@ -131,8 +150,8 @@ module EBSCO
|
|
131
150
|
end
|
132
151
|
end
|
133
152
|
|
134
|
-
if value.has_key?('
|
135
|
-
_list = value['
|
153
|
+
if value.has_key?('eds_publication_year_range_facet')
|
154
|
+
_list = value['eds_publication_year_range_facet']
|
136
155
|
_this_year = Date.today.year
|
137
156
|
_this_month = Date.today.month
|
138
157
|
_list.each do |item|
|
@@ -159,7 +178,12 @@ module EBSCO
|
|
159
178
|
end
|
160
179
|
end
|
161
180
|
|
162
|
-
|
181
|
+
if value.has_key?('eds_publication_year_facet')
|
182
|
+
year_list = value['eds_publication_year_facet']
|
183
|
+
year_list.each do |item|
|
184
|
+
@Actions.push "addfacetfilter(PublicationYear:#{item})"
|
185
|
+
end
|
186
|
+
end
|
163
187
|
|
164
188
|
end
|
165
189
|
end
|
data/lib/ebsco/eds/record.rb
CHANGED
@@ -747,7 +747,11 @@ module EBSCO
|
|
747
747
|
|
748
748
|
# dynamically add item metadata as 'eds_extra_ItemNameOrLabel'
|
749
749
|
def add_extra_item_accessors(item)
|
750
|
-
key = item['Name'] ? item['Name'] : item['Label'].gsub(/\s+/, '_')
|
750
|
+
key = item['Name'] ? item['Name'].gsub(/\s+/, '_') : item['Label'].gsub(/\s+/, '_')
|
751
|
+
# NumberOther isn't always unique, concatenate the label
|
752
|
+
if key == 'NumberOther' or key == 'Number_Other'
|
753
|
+
key = 'number_other_' + item['Label'].gsub(/\s+/, '_')
|
754
|
+
end
|
751
755
|
value = item['Data']
|
752
756
|
unless key.nil?
|
753
757
|
key = "eds_extras_#{key}"
|
data/lib/ebsco/eds/results.rb
CHANGED
@@ -130,7 +130,9 @@ module EBSCO
|
|
130
130
|
eds_library_location_facet = solr_facets('LocationLibrary')
|
131
131
|
eds_library_collection_facet = solr_facets('CollectionLibrary')
|
132
132
|
eds_author_university_facet = solr_facets('AuthorUniversity')
|
133
|
-
|
133
|
+
eds_publication_year_range_facet = solr_pub_date_facets
|
134
|
+
eds_publication_year_facet = solr_facets('PublicationYear')
|
135
|
+
eds_pub_year_tisim = solr_facets('PublicationYear')
|
134
136
|
facet = true
|
135
137
|
|
136
138
|
# solr response
|
@@ -163,6 +165,7 @@ module EBSCO
|
|
163
165
|
'eds_language_facet' => eds_language_facet,
|
164
166
|
'eds_subject_topic_facet' => eds_subject_topic_facet,
|
165
167
|
'eds_publication_year_facet' => eds_publication_year_facet,
|
168
|
+
'eds_publication_year_range_facet' => eds_publication_year_range_facet,
|
166
169
|
'eds_publisher_facet' => eds_publisher_facet,
|
167
170
|
'eds_journal_facet' => eds_journal_facet,
|
168
171
|
'eds_subjects_geographic_facet' => eds_subjects_geographic_facet,
|
@@ -170,7 +173,8 @@ module EBSCO
|
|
170
173
|
'eds_content_provider_facet' => eds_content_provider_facet,
|
171
174
|
'eds_library_location_facet' => eds_library_location_facet,
|
172
175
|
'eds_library_collection_facet' => eds_library_collection_facet,
|
173
|
-
'eds_author_university_facet' => eds_author_university_facet
|
176
|
+
'eds_author_university_facet' => eds_author_university_facet,
|
177
|
+
'pub_year_tisim' => eds_pub_year_tisim
|
174
178
|
}
|
175
179
|
}
|
176
180
|
}
|
data/lib/ebsco/eds/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ebsco-eds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bill McKinney
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-07-
|
12
|
+
date: 2017-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|