ebsco-eds 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d8ec6d777c85fef521a67238023b3e0937d4ff49
4
- data.tar.gz: 5453f3c0172702a6c87fb87d3866201ec5a85626
3
+ metadata.gz: 623b81079a6dd743fc4fe392364d27349a780860
4
+ data.tar.gz: d4aae67d364928d8e90ed76e1e89bc595b66633b
5
5
  SHA512:
6
- metadata.gz: 0021370a3baab1801082da79eca7eff99ad5eefd380428a8beb41c047185c13479a085b5dae952b5753cac3976a12a7d144e19518d2d879f537d12f4b3480399
7
- data.tar.gz: e26bfccfb66542304ea54fe859b11dc65967d86fb15d5eafd2d8a9f7e4136fe08019375b5bf92d3cea73e160da517e2607be85bae6ae033105e60bdadf72f87e
6
+ metadata.gz: '0962c36f6e6e9c6df244d9dec9589911b82b9cb5287b74e35070d5a1a80a6e6434d378a28769cdcd8f91b6e32340cbc99668e6ba5c571056a6c9b746cb6fbe85'
7
+ data.tar.gz: 71f3cf8e55486123ffdbec5b7962fbf38fb128a64c859997fe38bc6f2a83c0979b0dd1228c9bb8f5eff27da0b4ea27025c1fb6b0e8e42ea369def3cc6f9ca6c0
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.0.5] - 2018-11-02
8
+ ### Fixed
9
+ - Fixed a bug where fulltext html becomes nil after sanitizing. [#85](https://github.com/ebsco/edsapi-ruby/issues/85)
10
+ - Fixed a bug where the url protocol is missing from fulltext custom links. [#86](https://github.com/ebsco/edsapi-ruby/issues/86)
11
+
12
+
7
13
  ## [1.0.4] - 2018-10-29
8
14
  ### Fixed
9
15
  - List retrieval returns a repeating list of just the first record.
@@ -75,6 +81,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
75
81
  ### Added
76
82
  - Adds KW (keywords) and SH (subject heading) to solr search fields
77
83
 
84
+ [1.0.5]: https://github.com/ebsco/edsapi-ruby/compare/1.0.4...1.0.5
78
85
  [1.0.4]: https://github.com/ebsco/edsapi-ruby/compare/1.0.3...1.0.4
79
86
  [1.0.3]: https://github.com/ebsco/edsapi-ruby/compare/1.0.2...1.0.3
80
87
  [1.0.2]: https://github.com/ebsco/edsapi-ruby/compare/1.0.1...1.0.2
@@ -421,6 +421,14 @@ module EBSCO
421
421
  fulltext_links.first || {}
422
422
  end
423
423
 
424
+ # add protocol if needed
425
+ def add_protocol(url)
426
+ unless url[/\Ahttp:\/\//] || url[/\Ahttps:\/\//]
427
+ url = "https://#{url}"
428
+ end
429
+ url
430
+ end
431
+
424
432
  # All available fulltext links.
425
433
  def fulltext_links
426
434
 
@@ -514,6 +522,7 @@ module EBSCO
514
522
  if ft_customlinks.count > 0
515
523
  ft_customlinks.each do |ft_customlink|
516
524
  link_url = ft_customlink['Url']
525
+ link_url = add_protocol(link_url)
517
526
  link_label = ft_customlink['Text']
518
527
  link_icon = ft_customlink['Icon']
519
528
  links.push({url: link_url, label: link_label, icon: link_icon, type: 'customlink-fulltext', expires: false})
@@ -530,6 +539,7 @@ module EBSCO
530
539
  if other_customlinks.count > 0
531
540
  other_customlinks.each do |other_customlink|
532
541
  link_url = other_customlink['Url']
542
+ link_url = add_protocol(link_url)
533
543
  link_label = other_customlink['Text']
534
544
  link_icon = other_customlink['Icon']
535
545
  links.push({url: link_url, label: link_label, icon: link_icon, type: 'customlink-other', expires: false})
@@ -947,8 +957,8 @@ module EBSCO
947
957
  # need to double-unescape data with an ephtml section
948
958
  if html =~ /<ephtml>/
949
959
  html = CGI.unescapeHTML(html)
950
- html = html.gsub!(/\\"/, '"')
951
- html = html.gsub!(/\\n /, '')
960
+ html = html.gsub(/\\"/, '"')
961
+ html = html.gsub(/\\n /, '')
952
962
  end
953
963
 
954
964
  Sanitize.fragment(html, sanitize_config)
@@ -1,5 +1,5 @@
1
1
  module EBSCO
2
2
  module EDS
3
- VERSION = '1.0.4'
3
+ VERSION = '1.0.5'
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: 1.0.4
4
+ version: 1.0.5
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: 2018-10-29 00:00:00.000000000 Z
12
+ date: 2018-11-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday