exlibris-primo 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Exlibris::Primo
2
2
  [![Build Status](https://api.travis-ci.org/scotdalton/exlibris-primo.png?branch=master)](https://travis-ci.org/scotdalton/exlibris-primo)
3
3
  [![Dependency Status](https://gemnasium.com/scotdalton/exlibris-primo.png)](https://gemnasium.com/scotdalton/exlibris-primo)
4
- [![Code Climate](https://codeclimate.com/badge.png)](https://codeclimate.com/github/scotdalton/exlibris-primo)
4
+ [![Code Climate](https://codeclimate.com/github/scotdalton/exlibris-primo.png)](https://codeclimate.com/github/scotdalton/exlibris-primo)
5
5
 
6
6
  Exlibris::Primo offers a set of classes for interacting with the ExLibris Primo APIs.
7
7
 
@@ -78,13 +78,13 @@ module Exlibris
78
78
  # Returns an array of self.
79
79
  # Should be overridden by source subclasses if appropriate.
80
80
  def expand
81
- return [self]
81
+ [self]
82
82
  end
83
83
 
84
- # Determine if we're de-duplicating.
85
- # Should be overridden by source subclasses if appropriate.
86
- def dedup?
87
- return false
84
+ # Returns self merged with the holding.
85
+ # No actual merging happens in the default implementation.
86
+ def merge!(holding)
87
+ self
88
88
  end
89
89
 
90
90
  # Return this holding as a new holdings subclass instance based on source
@@ -1,5 +1,5 @@
1
1
  module Exlibris
2
2
  module Primo
3
- VERSION = "1.0.6"
3
+ VERSION = "1.0.7"
4
4
  end
5
5
  end
data/test/holding_test.rb CHANGED
@@ -20,7 +20,10 @@ class HoldingTest < Test::Unit::TestCase
20
20
  assert_equal({}, holding.source_data)
21
21
  assert_equal(holding, holding.to_source)
22
22
  assert_equal([holding], holding.expand)
23
- assert((not holding.dedup?))
23
+ assert((not holding.eql?(Exlibris::Primo::Holding.new)))
24
+ assert(holding.eql?(holding))
25
+ assert(holding, holding.merge!(holding))
26
+ assert(holding.expand.include?(holding))
24
27
  }
25
28
  end
26
29
  end
@@ -35,7 +35,7 @@ module Source
35
35
  assert_equal "Library Decoded 2", aleph.library
36
36
  assert_equal "LOCAL01", aleph.local_base
37
37
  assert_equal([aleph], aleph.expand)
38
- assert((not aleph.dedup?))
38
+ assert((not aleph.eql?(Exlibris::Primo::Source::Aleph.new)))
39
39
  assert_equal "http://aleph.library.edu/F?func=item-global"+
40
40
  "&doc_library=USM01&local_base=LOCAL01&doc_number=002895625"+
41
41
  "&sub_library=AlephSubLibrary1", aleph.url
metadata CHANGED
@@ -1,184 +1,170 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: exlibris-primo
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.6
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 1
7
+ - 0
8
+ - 7
9
+ version: 1.0.7
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Scot Dalton
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2013-02-15 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: rake
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 10.0.3
16
+
17
+ date: 2013-03-04 00:00:00 -05:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
22
21
  type: :runtime
23
- prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
23
+ requirements:
27
24
  - - ~>
28
- - !ruby/object:Gem::Version
25
+ - !ruby/object:Gem::Version
26
+ segments:
27
+ - 10
28
+ - 0
29
+ - 3
29
30
  version: 10.0.3
30
- - !ruby/object:Gem::Dependency
31
- name: require_all
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: 1.2.1
38
- type: :runtime
31
+ name: rake
32
+ requirement: *id001
39
33
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
34
+ - !ruby/object:Gem::Dependency
35
+ type: :runtime
36
+ version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ requirements:
43
38
  - - ~>
44
- - !ruby/object:Gem::Version
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 1
42
+ - 2
43
+ - 1
45
44
  version: 1.2.1
46
- - !ruby/object:Gem::Dependency
47
- name: activesupport
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 3.2.0
54
- type: :runtime
45
+ name: require_all
46
+ requirement: *id002
55
47
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
48
+ - !ruby/object:Gem::Dependency
49
+ type: :runtime
50
+ version_requirements: &id003 !ruby/object:Gem::Requirement
51
+ requirements:
59
52
  - - ~>
60
- - !ruby/object:Gem::Version
53
+ - !ruby/object:Gem::Version
54
+ segments:
55
+ - 3
56
+ - 2
57
+ - 0
61
58
  version: 3.2.0
62
- - !ruby/object:Gem::Dependency
63
- name: nokogiri
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: 1.5.3
70
- type: :runtime
59
+ name: activesupport
60
+ requirement: *id003
71
61
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
62
+ - !ruby/object:Gem::Dependency
63
+ type: :runtime
64
+ version_requirements: &id004 !ruby/object:Gem::Requirement
65
+ requirements:
75
66
  - - ~>
76
- - !ruby/object:Gem::Version
67
+ - !ruby/object:Gem::Version
68
+ segments:
69
+ - 1
70
+ - 5
71
+ - 3
77
72
  version: 1.5.3
78
- - !ruby/object:Gem::Dependency
79
- name: json
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 1.7.5
86
- type: :runtime
73
+ name: nokogiri
74
+ requirement: *id004
87
75
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
89
- none: false
90
- requirements:
76
+ - !ruby/object:Gem::Dependency
77
+ type: :runtime
78
+ version_requirements: &id005 !ruby/object:Gem::Requirement
79
+ requirements:
91
80
  - - ~>
92
- - !ruby/object:Gem::Version
81
+ - !ruby/object:Gem::Version
82
+ segments:
83
+ - 1
84
+ - 7
85
+ - 5
93
86
  version: 1.7.5
94
- - !ruby/object:Gem::Dependency
95
- name: savon
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- version: 1.2.0
102
- type: :runtime
87
+ name: json
88
+ requirement: *id005
103
89
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
105
- none: false
106
- requirements:
90
+ - !ruby/object:Gem::Dependency
91
+ type: :runtime
92
+ version_requirements: &id006 !ruby/object:Gem::Requirement
93
+ requirements:
107
94
  - - ~>
108
- - !ruby/object:Gem::Version
95
+ - !ruby/object:Gem::Version
96
+ segments:
97
+ - 1
98
+ - 2
99
+ - 0
109
100
  version: 1.2.0
110
- - !ruby/object:Gem::Dependency
111
- name: iso-639
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- version: 0.1.0
118
- type: :runtime
101
+ name: savon
102
+ requirement: *id006
119
103
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- none: false
122
- requirements:
104
+ - !ruby/object:Gem::Dependency
105
+ type: :runtime
106
+ version_requirements: &id007 !ruby/object:Gem::Requirement
107
+ requirements:
123
108
  - - ~>
124
- - !ruby/object:Gem::Version
109
+ - !ruby/object:Gem::Version
110
+ segments:
111
+ - 0
112
+ - 1
113
+ - 0
125
114
  version: 0.1.0
126
- - !ruby/object:Gem::Dependency
127
- name: rdoc
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ! '>='
132
- - !ruby/object:Gem::Version
133
- version: '0'
134
- type: :development
115
+ name: iso-639
116
+ requirement: *id007
135
117
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
137
- none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
141
- version: '0'
142
- - !ruby/object:Gem::Dependency
143
- name: vcr
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ~>
148
- - !ruby/object:Gem::Version
149
- version: 2.4.0
118
+ - !ruby/object:Gem::Dependency
150
119
  type: :development
120
+ version_requirements: &id008 !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ segments:
125
+ - 0
126
+ version: "0"
127
+ name: rdoc
128
+ requirement: *id008
151
129
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
153
- none: false
154
- requirements:
130
+ - !ruby/object:Gem::Dependency
131
+ type: :development
132
+ version_requirements: &id009 !ruby/object:Gem::Requirement
133
+ requirements:
155
134
  - - ~>
156
- - !ruby/object:Gem::Version
135
+ - !ruby/object:Gem::Version
136
+ segments:
137
+ - 2
138
+ - 4
139
+ - 0
157
140
  version: 2.4.0
158
- - !ruby/object:Gem::Dependency
159
- name: webmock
160
- requirement: !ruby/object:Gem::Requirement
161
- none: false
162
- requirements:
163
- - - ~>
164
- - !ruby/object:Gem::Version
165
- version: 1.9.0
166
- type: :development
141
+ name: vcr
142
+ requirement: *id009
167
143
  prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
144
+ - !ruby/object:Gem::Dependency
145
+ type: :development
146
+ version_requirements: &id010 !ruby/object:Gem::Requirement
147
+ requirements:
171
148
  - - ~>
172
- - !ruby/object:Gem::Version
149
+ - !ruby/object:Gem::Version
150
+ segments:
151
+ - 1
152
+ - 9
153
+ - 0
173
154
  version: 1.9.0
174
- description: Library to work with Exlibris' Primo discovery system. Does not require
175
- Rails.
176
- email:
155
+ name: webmock
156
+ requirement: *id010
157
+ prerelease: false
158
+ description: Library to work with Exlibris' Primo discovery system. Does not require Rails.
159
+ email:
177
160
  - scotdalton@gmail.com
178
161
  executables: []
162
+
179
163
  extensions: []
164
+
180
165
  extra_rdoc_files: []
181
- files:
166
+
167
+ files:
182
168
  - lib/exlibris/primo/abstract.rb
183
169
  - lib/exlibris/primo/chain_gang/base.rb
184
170
  - lib/exlibris/primo/chain_gang/README.md
@@ -253,191 +239,37 @@ files:
253
239
  - MIT-LICENSE
254
240
  - Rakefile
255
241
  - README.md
256
- - test/bak/eshelf_test.rb.bak
257
- - test/bak/record_test.rb.bak
258
- - test/bak/searcher_test.rb.bak
259
- - test/bak/web_service_test.rb.bak
260
- - test/config_test.rb
261
- - test/eshelf_test.rb
262
- - test/exlibris-primo_test.rb
263
- - test/facet_test.rb
264
- - test/facet_value_test.rb
265
- - test/holding_test.rb
266
- - test/link_test.rb
267
- - test/pnx/dedup_mgr_test.rb
268
- - test/pnx/elements_test.rb
269
- - test/pnx/frbr_test.rb
270
- - test/pnx/holdings_test.rb
271
- - test/pnx/links_test.rb
272
- - test/pnx/openurl_test.rb
273
- - test/record_test.rb
274
- - test/review_test.rb
275
- - test/reviews_test.rb
276
- - test/search_test.rb
277
- - test/source/aleph_test.rb
278
- - test/support/config.yml
279
- - test/tag_test.rb
280
- - test/tags_test.rb
281
- - test/test_helper.rb
282
- - test/vcr_cassettes/client_action_no_arguments.yml
283
- - test/vcr_cassettes/client_get_all_my_reviews.yml
284
- - test/vcr_cassettes/client_get_all_my_tags.yml
285
- - test/vcr_cassettes/client_get_eshelf.yml
286
- - test/vcr_cassettes/client_get_record.yml
287
- - test/vcr_cassettes/client_get_reviews.yml
288
- - test/vcr_cassettes/client_get_tags.yml
289
- - test/vcr_cassettes/client_search_brief_isbn.yml
290
- - test/vcr_cassettes/client_search_brief_issn.yml
291
- - test/vcr_cassettes/client_too_many_arguments.yml
292
- - test/vcr_cassettes/eshelf.yml
293
- - test/vcr_cassettes/eshelf_add_folder.yml
294
- - test/vcr_cassettes/eshelf_add_record.yml
295
- - test/vcr_cassettes/eshelf_add_records.yml
296
- - test/vcr_cassettes/eshelf_basket_id.yml
297
- - test/vcr_cassettes/eshelf_records.yml
298
- - test/vcr_cassettes/eshelf_remove_folder.yml
299
- - test/vcr_cassettes/eshelf_remove_record.yml
300
- - test/vcr_cassettes/eshelf_remove_records.yml
301
- - test/vcr_cassettes/remote_record_call.yml
302
- - test/vcr_cassettes/remote_record_dedupmgr.yml
303
- - test/vcr_cassettes/request_add_folder_to_eshelf.yml
304
- - test/vcr_cassettes/request_add_to_eshelf.yml
305
- - test/vcr_cassettes/request_did_u_mean_enabled.yml
306
- - test/vcr_cassettes/request_full_view.yml
307
- - test/vcr_cassettes/request_get_eshelf.yml
308
- - test/vcr_cassettes/request_get_eshelf_structure.yml
309
- - test/vcr_cassettes/request_get_reviews.yml
310
- - test/vcr_cassettes/request_get_tags.yml
311
- - test/vcr_cassettes/request_remove_folder_from_eshelf.yml
312
- - test/vcr_cassettes/request_remove_from_eshelf.yml
313
- - test/vcr_cassettes/request_search_author.yml
314
- - test/vcr_cassettes/request_search_did_u_mean.yml
315
- - test/vcr_cassettes/request_search_genre.yml
316
- - test/vcr_cassettes/request_search_isbn.yml
317
- - test/vcr_cassettes/request_search_issn.yml
318
- - test/vcr_cassettes/request_search_locations.yml
319
- - test/vcr_cassettes/request_search_title.yml
320
- - test/vcr_cassettes/request_search_title_author_genre.yml
321
- - test/vcr_cassettes/response_add_folder_to_eshelf.yml
322
- - test/vcr_cassettes/response_add_review.yml
323
- - test/vcr_cassettes/response_add_tag.yml
324
- - test/vcr_cassettes/response_add_to_eshelf.yml
325
- - test/vcr_cassettes/response_did_u_mean_disabled.yml
326
- - test/vcr_cassettes/response_did_u_mean_enabled.yml
327
- - test/vcr_cassettes/response_full_view.yml
328
- - test/vcr_cassettes/response_get_all_my_reviews.yml
329
- - test/vcr_cassettes/response_get_all_my_tags.yml
330
- - test/vcr_cassettes/response_get_eshelf.yml
331
- - test/vcr_cassettes/response_get_eshelf_structure.yml
332
- - test/vcr_cassettes/response_get_reviews.yml
333
- - test/vcr_cassettes/response_get_reviews_by_rating.yml
334
- - test/vcr_cassettes/response_get_reviews_for_record.yml
335
- - test/vcr_cassettes/response_get_tags.yml
336
- - test/vcr_cassettes/response_get_tags_for_record.yml
337
- - test/vcr_cassettes/response_remove_folder_from_eshelf.yml
338
- - test/vcr_cassettes/response_remove_from_eshelf.yml
339
- - test/vcr_cassettes/response_remove_review.yml
340
- - test/vcr_cassettes/response_remove_tag.yml
341
- - test/vcr_cassettes/response_remove_user_tags.yml
342
- - test/vcr_cassettes/response_search.yml
343
- - test/vcr_cassettes/response_search_did_u_mean.yml
344
- - test/vcr_cassettes/reviews.yml
345
- - test/vcr_cassettes/reviews_add_review.yml
346
- - test/vcr_cassettes/reviews_check_empty_reviews_first.yml
347
- - test/vcr_cassettes/reviews_check_empty_reviews_last.yml
348
- - test/vcr_cassettes/reviews_rating.yml
349
- - test/vcr_cassettes/reviews_record.yml
350
- - test/vcr_cassettes/reviews_remove_review.yml
351
- - test/vcr_cassettes/reviews_reviews.yml
352
- - test/vcr_cassettes/reviews_user.yml
353
- - test/vcr_cassettes/search_chaining_author_title.yml
354
- - test/vcr_cassettes/search_chaining_contains_any.yml
355
- - test/vcr_cassettes/search_chaining_contains_author_starts_with_title.yml
356
- - test/vcr_cassettes/search_chaining_isbn.yml
357
- - test/vcr_cassettes/search_chaining_page_size_author.yml
358
- - test/vcr_cassettes/search_did_u_mean.yml
359
- - test/vcr_cassettes/search_enable_highlighting.yml
360
- - test/vcr_cassettes/search_isbn.yml
361
- - test/vcr_cassettes/search_languages.yml
362
- - test/vcr_cassettes/search_locations.yml
363
- - test/vcr_cassettes/search_record_id.yml
364
- - test/vcr_cassettes/search_record_id_chaining.yml
365
- - test/vcr_cassettes/search_sort_by.yml
366
- - test/vcr_cassettes/search_sort_by_locations.yml
367
- - test/vcr_cassettes/tags.yml
368
- - test/vcr_cassettes/tags_add_extra_tag.yml
369
- - test/vcr_cassettes/tags_add_tag.yml
370
- - test/vcr_cassettes/tags_add_tags.yml
371
- - test/vcr_cassettes/tags_check_1_tags.yml
372
- - test/vcr_cassettes/tags_check_2_tags.yml
373
- - test/vcr_cassettes/tags_check_empty_tags_first.yml
374
- - test/vcr_cassettes/tags_check_empty_tags_last.yml
375
- - test/vcr_cassettes/tags_remove_tag.yml
376
- - test/vcr_cassettes/tags_remove_tags.yml
377
- - test/vcr_cassettes/tags_remove_user_tags.yml
378
- - test/vcr_cassettes/tags_tags.yml
379
- - test/vcr_cassettes/tags_user.yml
380
- - test/web_service/client/abstract_test.rb
381
- - test/web_service/client/eshelf_test.rb
382
- - test/web_service/client/reviews_test.rb
383
- - test/web_service/client/savon_client_test.rb
384
- - test/web_service/client/search_benchmarks.rb
385
- - test/web_service/client/search_test.rb
386
- - test/web_service/client/soap_actions_test.rb
387
- - test/web_service/client/tags_test.rb
388
- - test/web_service/request/abstract_test.rb
389
- - test/web_service/request/base_elements_test.rb
390
- - test/web_service/request/build_xml_test.rb
391
- - test/web_service/request/client_test.rb
392
- - test/web_service/request/eshelf_test.rb
393
- - test/web_service/request/location_test.rb
394
- - test/web_service/request/query_term_test.rb
395
- - test/web_service/request/reviews_test.rb
396
- - test/web_service/request/search_test.rb
397
- - test/web_service/request/soap_action_test.rb
398
- - test/web_service/request/tags_test.rb
399
- - test/web_service/response/abstract_test.rb
400
- - test/web_service/response/did_u_mean_test.rb
401
- - test/web_service/response/error_test.rb
402
- - test/web_service/response/eshelf_test.rb
403
- - test/web_service/response/facets_test.rb
404
- - test/web_service/response/records_test.rb
405
- - test/web_service/response/reviews_test.rb
406
- - test/web_service/response/search_stats_test.rb
407
- - test/web_service/response/search_test.rb
408
- - test/web_service/response/tags_test.rb
409
- - test/xml_util_test.rb
242
+ has_rdoc: true
410
243
  homepage: https://github.com/scotdalton/exlibris-primo
411
244
  licenses: []
245
+
412
246
  post_install_message:
413
247
  rdoc_options: []
414
- require_paths:
248
+
249
+ require_paths:
415
250
  - lib
416
- required_ruby_version: !ruby/object:Gem::Requirement
417
- none: false
418
- requirements:
419
- - - ! '>='
420
- - !ruby/object:Gem::Version
421
- version: '0'
422
- segments:
251
+ required_ruby_version: !ruby/object:Gem::Requirement
252
+ requirements:
253
+ - - ">="
254
+ - !ruby/object:Gem::Version
255
+ segments:
423
256
  - 0
424
- hash: -1710299729139398631
425
- required_rubygems_version: !ruby/object:Gem::Requirement
426
- none: false
427
- requirements:
428
- - - ! '>='
429
- - !ruby/object:Gem::Version
430
- version: '0'
431
- segments:
257
+ version: "0"
258
+ required_rubygems_version: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - ">="
261
+ - !ruby/object:Gem::Version
262
+ segments:
432
263
  - 0
433
- hash: -1710299729139398631
264
+ version: "0"
434
265
  requirements: []
266
+
435
267
  rubyforge_project:
436
- rubygems_version: 1.8.24
268
+ rubygems_version: 1.3.6
437
269
  signing_key:
438
270
  specification_version: 3
439
271
  summary: Library to work with Exlibris' Primo discovery system.
440
- test_files:
272
+ test_files:
441
273
  - test/bak/eshelf_test.rb.bak
442
274
  - test/bak/record_test.rb.bak
443
275
  - test/bak/searcher_test.rb.bak