ebsco-eds 0.2.0.pre → 0.2.1.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: 0ec5b5c854dfdf57d04d9488a7ef07de40711f46
4
- data.tar.gz: f05a30ba9788834a16d85924188fd012f402ad45
3
+ metadata.gz: 25a25ab8a3564b039177b6e8e31643b8c493c848
4
+ data.tar.gz: 52f896544dbe0b8a99ca7510d08f9af73dc35330
5
5
  SHA512:
6
- metadata.gz: 9991eae7323bacd2151f17ed9ad4ea57a89c6898553ca0e47ae16599c25b8d1e03503e0cd4a8445eddd668bfa9c0412434f94f411d2db84bdf17e491624b3cac
7
- data.tar.gz: 657d974a39dc5d75ca716f1691e134f0c251fee8284d6c0a881564cfa86974721ab700b5b7914fdf9cd88c1d4c909a3cf099bfba0fb60823ba24ae3fec1ef31d
6
+ metadata.gz: baead98ec09d3201c15268a022d85e6a24ca540d4423983a1ffcebff4cc26c1dc003e428d16fd667ca0b2f555bacc160c69c59231f68215114b5a54eb49935a6
7
+ data.tar.gz: 90c110da70bada5e6c91d78b4171733755ef25e834579a7f2b97cb53fecbdd2f8729e1325422042418a85bbf341fa2cc81ee234d0efe3e9870883c17296aad3a
data/.env.test CHANGED
@@ -1,6 +1,6 @@
1
- EDS_PROFILE=eds-api
2
- EDS_USER=billmckinn
3
- EDS_PASS=4n~r1me86y
1
+ EDS_PROFILE=edsapi
2
+ EDS_USER=user
3
+ EDS_PASS=secret
4
4
  EDS_AUTH=user
5
5
  EDS_GUEST=n
6
6
  EDS_ORG=none
data/README.md CHANGED
@@ -6,7 +6,6 @@ A Ruby interface to the EBSCO Discovery Services API.
6
6
  [![codecov](https://codecov.io/gh/ebsco/edsapi-ruby/branch/master/graph/badge.svg)](https://codecov.io/gh/ebsco/edsapi-ruby/branch/master)
7
7
  [![Dependency Status](https://gemnasium.com/badges/github.com/ebsco/edsapi-ruby.svg)](https://gemnasium.com/github.com/ebsco/edsapi-ruby)
8
8
  [![Gem Version](https://img.shields.io/gem/v/ebsco-eds.svg?style=flat)](http://rubygems.org/gems/ebsco-eds)
9
- [![Gitter](https://badges.gitter.im/ebsco/edsapi-ruby.svg)](https://gitter.im/ebsco/edsapi-ruby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
10
9
 
11
10
  ## Dependencies
12
11
 
@@ -700,6 +700,7 @@ module EBSCO
700
700
  end
701
701
 
702
702
  def to_solr
703
+ item_hash = to_attr_hash
703
704
  {
704
705
  'responseHeader' => {
705
706
  'status' => 0
@@ -707,7 +708,7 @@ module EBSCO
707
708
  'response' => {
708
709
  'numFound' => 1,
709
710
  'start' => 0,
710
- 'docs' => to_attr_hash
711
+ 'docs' => [item_hash]
711
712
  }
712
713
  }
713
714
  end
@@ -100,18 +100,33 @@ module EBSCO
100
100
  # these config options can be overridden by environment vars
101
101
  @auth_type = (ENV.has_key? 'EDS_AUTH') ? ENV['EDS_AUTH'] : @config[:auth]
102
102
  @org = (ENV.has_key? 'EDS_ORG') ? ENV['EDS_ORG'] : @config[:org]
103
- @debug = (ENV.has_key? 'EDS_DEBUG') ? ENV['EDS_DEBUG'] : @config[:debug]
104
- @use_cache = (ENV.has_key? 'EDS_USE_CACHE') ? ENV['EDS_USE_CACHE'] : @config[:use_cache]
105
103
  @cache_dir = (ENV.has_key? 'EDS_CACHE_DIR') ? ENV['EDS_CACHE_DIR'] : @config[:eds_cache_dir]
106
104
 
107
105
  (ENV.has_key? 'EDS_GUEST') ?
108
- if %w(n N no No).include?(ENV['EDS_GUEST'])
106
+ if %w(n N no No false False).include?(ENV['EDS_GUEST'])
109
107
  @guest = false
110
108
  else
111
109
  @guest = true
112
110
  end :
113
111
  @guest = @config[:guest]
114
112
 
113
+ (ENV.has_key? 'EDS_USE_CACHE') ?
114
+ if %w(n N no No false False).include?(ENV['EDS_USE_CACHE'])
115
+ @use_cache = false
116
+ else
117
+ @use_cache = true
118
+ end :
119
+ @use_cache = @config[:use_cache]
120
+
121
+ (ENV.has_key? 'EDS_DEBUG') ?
122
+ if %w(y Y yes Yes true True).include?(ENV['EDS_DEBUG'])
123
+ @debug = true
124
+ else
125
+ @debug = false
126
+ end :
127
+ @debug = @config[:debug]
128
+
129
+
115
130
  # use cache for auth token and info calls?
116
131
  if @use_cache
117
132
  cache_dir = File.join(@cache_dir, 'faraday_eds_cache')
@@ -1,5 +1,5 @@
1
1
  module EBSCO
2
2
  module EDS
3
- VERSION = '0.2.0.pre'
3
+ VERSION = '0.2.1.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.0.pre
4
+ version: 0.2.1.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-07 00:00:00.000000000 Z
12
+ date: 2017-07-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday