ebsco-eds 0.1.4.pre → 0.1.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 +4 -4
- data/lib/ebsco/eds/configuration.rb +1 -1
- data/lib/ebsco/eds/record.rb +11 -2
- data/lib/ebsco/eds/session.rb +1 -1
- 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: ec63c449b1c3d1612d06c0a0a73bd90432874f73
|
4
|
+
data.tar.gz: 87603246bc6eb5626573ec2fb379226b499833ba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11986f47c3b40fb28fa8b8f48b3c425673806dd29aa403c3fdad859f4b6c65b82fb4ff77034160e9528b487751887f3380345b74b74e57915af25a412c52bf77
|
7
|
+
data.tar.gz: 1cf9dd0fe39e19cef7d59c7cd1a90f3e8ccfff3a08594429b542f97ce2ef2945c63c3f43b0436e05c84aadbf609f8e0ef9eae639cff20b3f41cf8c9b63177bde
|
@@ -26,7 +26,7 @@ module EBSCO
|
|
26
26
|
:search_url => '/edsapi/rest/Search',
|
27
27
|
:retrieve_url => '/edsapi/rest/Retrieve',
|
28
28
|
:user_agent => 'EBSCO EDS GEM v0.0.1',
|
29
|
-
:interface_id => '
|
29
|
+
:interface_id => 'edsapi_ruby_gem',
|
30
30
|
:log => 'faraday.log',
|
31
31
|
:max_attempts => 2,
|
32
32
|
:max_results_per_page => 100,
|
data/lib/ebsco/eds/record.rb
CHANGED
@@ -320,7 +320,12 @@ module EBSCO
|
|
320
320
|
end
|
321
321
|
|
322
322
|
# The first fulltext link.
|
323
|
-
def fulltext_link
|
323
|
+
def fulltext_link(type = 'first')
|
324
|
+
fulltext_links.each do |link|
|
325
|
+
if link[:type] == type
|
326
|
+
return link
|
327
|
+
end
|
328
|
+
end
|
324
329
|
fulltext_links.first || {}
|
325
330
|
end
|
326
331
|
|
@@ -404,7 +409,7 @@ module EBSCO
|
|
404
409
|
link_label = 'Linked Full Text'
|
405
410
|
link_icon = 'Linked Full Text Icon'
|
406
411
|
link_url = ebscolink['Url'] || 'detail'
|
407
|
-
links.push({url: link_url, label: link_label, icon: link_icon, type: 'smartlinks
|
412
|
+
links.push({url: link_url, label: link_label, icon: link_icon, type: 'smartlinks'})
|
408
413
|
end
|
409
414
|
end
|
410
415
|
end
|
@@ -876,6 +881,10 @@ module EBSCO
|
|
876
881
|
if cover_medium_url
|
877
882
|
hash['cover_medium_url'] = cover_medium_url
|
878
883
|
end
|
884
|
+
if all_links
|
885
|
+
puts 'ALL LINKS: ' + all_links.inspect
|
886
|
+
hash['fulltext_link'] = { 'id' => database_id + '__' + safe_an, 'links' => all_links}
|
887
|
+
end
|
879
888
|
# generate bibtex entry if it hasn't been done already
|
880
889
|
if @bibtex.key == 'unknown-a'
|
881
890
|
@bibtex = retrieve_bibtex
|
data/lib/ebsco/eds/session.rb
CHANGED
@@ -692,7 +692,7 @@ module EBSCO
|
|
692
692
|
# user auth
|
693
693
|
else
|
694
694
|
resp = do_request(:post, path: @config[:uid_auth_url], payload:
|
695
|
-
{ UserId: @user, Password: @pass })
|
695
|
+
{ UserId: @user, Password: @pass, InterfaceId: @config[:interface_id] })
|
696
696
|
end
|
697
697
|
end
|
698
698
|
@auth_token = resp['AuthToken']
|
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.1.
|
4
|
+
version: 0.1.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-
|
12
|
+
date: 2017-05-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|