ebsco-eds 0.2.4.pre → 0.2.5.pre

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: 17261b862dc61e3ae40c37af9e2295fa8b80535b
4
- data.tar.gz: ca92bc59097acbbff9c81bd944c3756e8cbe7502
3
+ metadata.gz: 9e370c38b63e3ff1410ce4cee4d50394d5f2df67
4
+ data.tar.gz: d22f2c176ffa0a2f26625a472662b6f9397b052f
5
5
  SHA512:
6
- metadata.gz: 000f02fb42908901ad9a96f2169a14b307a63729e0f7699560f4e9e051241a75e7e23c25b13e6ab4057f56c19bb3b2829bdaa029a2f8b76d1698b2f6a2760697
7
- data.tar.gz: 592205483df11ca0468397da5602f6973ca242625ca80b9399221932dcb9107d6577cfa032f29652fc6550ff0c751e4185b43bfc59c08da03bb522a9feab3674
6
+ metadata.gz: 35b21cfb0179fe336a2adc0a4a848e184689a0eadd4ebf14900d8d60a90b8d60951df8a361d950a11bdc21c8ee75b2c7e94e1e86337b8de6df26806661670834
7
+ data.tar.gz: e40c20c649c5a7fb5edddddf461ec34f2a340358f6a7c3f47cb79cc3b86f419af6343900e9ac3a91081d5660387c5a912dc0fb7865114abdac0dabb2630ce95b
@@ -34,7 +34,7 @@ module EBSCO
34
34
  :use_cache => true,
35
35
  :eds_cache_dir => ENV['TMPDIR'] || '/tmp',
36
36
  :timeout => 60,
37
- :open_timeout => 2
37
+ :open_timeout => 6
38
38
  }
39
39
  @valid_config_keys = @config.keys
40
40
  end
@@ -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?('eds_publication_year_facet')
135
- _list = value['eds_publication_year_facet']
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
- else
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
@@ -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}"
@@ -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
- eds_publication_year_facet = solr_pub_date_facets
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
  }
@@ -1,5 +1,5 @@
1
1
  module EBSCO
2
2
  module EDS
3
- VERSION = '0.2.4.pre'
3
+ VERSION = '0.2.5.pre'
4
4
  end
5
5
  end
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.pre
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-20 00:00:00.000000000 Z
12
+ date: 2017-07-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday