borrow_direct 1.1.0 → 1.2.0.pre1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +5 -13
  2. data/.travis.yml +6 -0
  3. data/Gemfile +2 -0
  4. data/README.md +19 -6
  5. data/bd_metrics/finditem_measure.rb +8 -1
  6. data/borrow_direct.gemspec +1 -1
  7. data/lib/borrow_direct/authentication.rb +16 -8
  8. data/lib/borrow_direct/defaults.rb +4 -1
  9. data/lib/borrow_direct/encryption.rb +34 -0
  10. data/lib/borrow_direct/error.rb +17 -0
  11. data/lib/borrow_direct/find_item.rb +32 -18
  12. data/lib/borrow_direct/pickup_location.rb +32 -0
  13. data/lib/borrow_direct/request.rb +30 -8
  14. data/lib/borrow_direct/request_item.rb +15 -7
  15. data/lib/borrow_direct/request_query.rb +18 -4
  16. data/lib/borrow_direct/version.rb +1 -1
  17. data/test/authentication_test.rb +40 -12
  18. data/test/encryption_test.rb +58 -0
  19. data/test/find_item_test.rb +66 -11
  20. data/test/request_item_test.rb +65 -8
  21. data/test/request_query_test.rb +23 -27
  22. data/test/request_test.rb +40 -27
  23. data/test/test_helper.rb +10 -1
  24. data/test/vcr_cassettes/Authentication/Makes_a_request_succesfully.yml +11 -23
  25. data/test/vcr_cassettes/Authentication/Raises_for_bad_library_symbol.yml +12 -23
  26. data/test/vcr_cassettes/Authentication/Raises_for_bad_patron_barcode.yml +12 -24
  27. data/test/vcr_cassettes/Authentication/get_auth_id/Raises_for_bad_api_key.yml +41 -0
  28. data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_library_symbol.yml +12 -23
  29. data/test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_patron_barcode.yml +12 -24
  30. data/test/vcr_cassettes/Authentication/get_auth_id/returns_an_auth_id_for_a_good_request.yml +11 -23
  31. data/test/vcr_cassettes/Authentication/get_auth_id/returns_auth_id_with_API_key_from_defaults.yml +40 -0
  32. data/test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/works.yml +11 -23
  33. data/test/vcr_cassettes/FindItem/_find_item_request/Raises_with_bad_api_key.yml +41 -0
  34. data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_locally_available_item.yml +47 -18
  35. data/test/vcr_cassettes/FindItem/_find_item_request/finds_a_requestable_item.yml +66 -18
  36. data/test/vcr_cassettes/FindItem/_find_item_request/finds_an_item_that_does_not_exist_in_BD.yml +66 -19
  37. data/test/vcr_cassettes/FindItem/_find_item_request/raises_proper_error_on_bad_AID.yml +40 -0
  38. data/test/vcr_cassettes/FindItem/_find_item_request/uses_manually_set_auth_id.yml +97 -0
  39. data/test/vcr_cassettes/FindItem/_find_item_request/with_expected_error_PUBFI002/returns_result.yml +46 -9
  40. data/test/vcr_cassettes/FindItem/_find_item_request/works_with_multiple_values.yml +66 -18
  41. data/test/vcr_cassettes/FindItem/find_with_Response/_pickup_location_data/returns_array_of_PickupLocations.yml +97 -0
  42. data/test/vcr_cassettes/FindItem/find_with_Response/has_an_auth_id.yml +66 -18
  43. data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_pickup_locations_when_BD_doesn_t_want_to_give_us_them.yml +46 -9
  44. data/test/vcr_cassettes/FindItem/find_with_Response/has_pickup_locations.yml +66 -18
  45. data/test/vcr_cassettes/FindItem/find_with_Response/knows_locally_available_.yml +47 -18
  46. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_BD_returns_PUBFI002.yml +46 -9
  47. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_does_not_exist_in_BD.yml +46 -19
  48. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_item_that_no_libraries_will_lend.yml +275 -18
  49. data/test/vcr_cassettes/FindItem/find_with_Response/not_requestable_for_locally_available_item.yml +47 -18
  50. data/test/vcr_cassettes/FindItem/find_with_Response/requestable_for_requestable_item.yml +66 -18
  51. data/test/vcr_cassettes/FindItem/find_with_Response/requestable_with_multiple_items_if_at_least_one_is_requestable.yml +66 -18
  52. data/test/vcr_cassettes/Request/authentication_id/automatically_fetches_one_when_needed.yml +47 -22
  53. data/test/vcr_cassettes/Request/authentication_id/can_refetch_when_instructed.yml +47 -22
  54. data/test/vcr_cassettes/Request/authentication_id/manually_set_one_will_be_used_without_fetch.yml +40 -0
  55. data/test/vcr_cassettes/Request/authentication_id/starts_out_nil.yml +40 -0
  56. data/test/vcr_cassettes/Request/authentication_id/takes_with_auth_id.yml +40 -0
  57. data/test/vcr_cassettes/Request/can_make_a_succesful_request_with_AID.yml +97 -0
  58. data/test/vcr_cassettes/Request/gets_BD_error_info.yml +49 -12
  59. data/test/vcr_cassettes/Request/gets_BD_error_info_from_a_bad_AID.yml +77 -0
  60. data/test/vcr_cassettes/Request/raises_exception_on_timeout_live.yml +40 -0
  61. data/test/vcr_cassettes/Request/raises_on_bad_path.yml +61 -24
  62. data/test/vcr_cassettes/Request/raises_on_bad_request_hash.yml +50 -35
  63. data/test/vcr_cassettes/Request/uses_timeout_for_HttpClient.yml +40 -0
  64. data/test/vcr_cassettes/Request/with_expected_errors/still_returns_result.yml +47 -10
  65. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_locally_available_item.yml +21 -33
  66. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_a_requestable_item.yml +20 -32
  67. data/test/vcr_cassettes/RequestItem/make_request/make_request_for_an_unrequestable_item.yml +21 -33
  68. data/test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI003.yml +77 -0
  69. data/test/vcr_cassettes/RequestItem/make_request/sets_an_auth_id.yml +77 -0
  70. data/test/vcr_cassettes/RequestItem/make_request_/raises_for_unrequestable.yml +21 -33
  71. data/test/vcr_cassettes/RequestItem/make_request_/returns_number_for_succesful_request.yml +20 -32
  72. data/test/vcr_cassettes/RequestItem/raises_proper_error_on_bad_AID.yml +40 -0
  73. data/test/vcr_cassettes/RequestItem/raw_RequestItem_sanity_check.yml +134 -0
  74. data/test/vcr_cassettes/RequestItem/raw_requests_an_unrequestable_item.yml +21 -33
  75. data/test/vcr_cassettes/RequestItem/uses_manually_set_auth_id.yml +20 -32
  76. data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_String_pickup_location.yml +78 -0
  77. data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_structured_PickupLocation.yml +77 -0
  78. data/test/vcr_cassettes/RequestQuery/raises_proper_error_on_bad_AID.yml +40 -0
  79. data/test/vcr_cassettes/RequestQuery/raw_request_query_request/returns_results.yml +117 -325
  80. data/test/vcr_cassettes/RequestQuery/raw_request_to_verify_the_BD_HTTP_API.yml +30 -325
  81. data/test/vcr_cassettes/RequestQuery/requests/fetches_default_records.yml +117 -328
  82. data/test/vcr_cassettes/RequestQuery/requests/fetches_full_records.yml +148 -425
  83. metadata +67 -38
  84. data/test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/.yml +0 -52
  85. data/test/vcr_cassettes/FindItem/find_with_Response/has_nil_auth_id_when_BD_doesn_t_want_to_give_us_one.yml +0 -40
  86. data/test/vcr_cassettes/Request/can_make_a_succesful_request.yml +0 -49
  87. data/test/vcr_cassettes/RequestItem/make_request/raises_for_unrequestable.yml +0 -91
  88. data/test/vcr_cassettes/RequestItem/make_request/returns_number_for_succesful_request.yml +0 -89
  89. data/test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI004.yml +0 -89
  90. data/test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/still_works.yml +0 -90
  91. data/test/vcr_cassettes/top_level_describe/an_inner_describe/.yml +0 -76
metadata CHANGED
@@ -1,103 +1,103 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: borrow_direct
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0.pre1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan Rochkind
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-31 00:00:00.000000000 Z
11
+ date: 2015-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '2.4'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '2.4'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '5.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest-vcr
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ! '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.0.2
62
- - - <
62
+ - - "<"
63
63
  - !ruby/object:Gem::Version
64
64
  version: '2'
65
65
  type: :development
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
- - - ! '>='
69
+ - - ">="
70
70
  - !ruby/object:Gem::Version
71
71
  version: 1.0.2
72
- - - <
72
+ - - "<"
73
73
  - !ruby/object:Gem::Version
74
74
  version: '2'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: vcr
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
- - - ~>
79
+ - - "~>"
80
80
  - !ruby/object:Gem::Version
81
81
  version: '2.9'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - ~>
86
+ - - "~>"
87
87
  - !ruby/object:Gem::Version
88
88
  version: '2.9'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: webmock
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
- - - ~>
93
+ - - "~>"
94
94
  - !ruby/object:Gem::Version
95
95
  version: '1.11'
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
- - - ~>
100
+ - - "~>"
101
101
  - !ruby/object:Gem::Version
102
102
  version: '1.11'
103
103
  description:
@@ -107,7 +107,8 @@ executables: []
107
107
  extensions: []
108
108
  extra_rdoc_files: []
109
109
  files:
110
- - .gitignore
110
+ - ".gitignore"
111
+ - ".travis.yml"
111
112
  - Gemfile
112
113
  - LICENSE.txt
113
114
  - README.md
@@ -121,15 +122,18 @@ files:
121
122
  - lib/borrow_direct.rb
122
123
  - lib/borrow_direct/authentication.rb
123
124
  - lib/borrow_direct/defaults.rb
125
+ - lib/borrow_direct/encryption.rb
124
126
  - lib/borrow_direct/error.rb
125
127
  - lib/borrow_direct/find_item.rb
126
128
  - lib/borrow_direct/generate_query.rb
129
+ - lib/borrow_direct/pickup_location.rb
127
130
  - lib/borrow_direct/request.rb
128
131
  - lib/borrow_direct/request_item.rb
129
132
  - lib/borrow_direct/request_query.rb
130
133
  - lib/borrow_direct/util.rb
131
134
  - lib/borrow_direct/version.rb
132
135
  - test/authentication_test.rb
136
+ - test/encryption_test.rb
133
137
  - test/find_item_test.rb
134
138
  - test/generate_query_test.rb
135
139
  - test/request_item_test.rb
@@ -142,18 +146,22 @@ files:
142
146
  - test/vcr_cassettes/Authentication/Makes_a_request_succesfully.yml
143
147
  - test/vcr_cassettes/Authentication/Raises_for_bad_library_symbol.yml
144
148
  - test/vcr_cassettes/Authentication/Raises_for_bad_patron_barcode.yml
149
+ - test/vcr_cassettes/Authentication/get_auth_id/Raises_for_bad_api_key.yml
145
150
  - test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_library_symbol.yml
146
151
  - test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_patron_barcode.yml
147
152
  - test/vcr_cassettes/Authentication/get_auth_id/returns_an_auth_id_for_a_good_request.yml
148
- - test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/.yml
153
+ - test/vcr_cassettes/Authentication/get_auth_id/returns_auth_id_with_API_key_from_defaults.yml
149
154
  - test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/works.yml
155
+ - test/vcr_cassettes/FindItem/_find_item_request/Raises_with_bad_api_key.yml
150
156
  - test/vcr_cassettes/FindItem/_find_item_request/finds_a_locally_available_item.yml
151
157
  - test/vcr_cassettes/FindItem/_find_item_request/finds_a_requestable_item.yml
152
158
  - test/vcr_cassettes/FindItem/_find_item_request/finds_an_item_that_does_not_exist_in_BD.yml
159
+ - test/vcr_cassettes/FindItem/_find_item_request/raises_proper_error_on_bad_AID.yml
160
+ - test/vcr_cassettes/FindItem/_find_item_request/uses_manually_set_auth_id.yml
153
161
  - test/vcr_cassettes/FindItem/_find_item_request/with_expected_error_PUBFI002/returns_result.yml
154
162
  - test/vcr_cassettes/FindItem/_find_item_request/works_with_multiple_values.yml
163
+ - test/vcr_cassettes/FindItem/find_with_Response/_pickup_location_data/returns_array_of_PickupLocations.yml
155
164
  - test/vcr_cassettes/FindItem/find_with_Response/has_an_auth_id.yml
156
- - test/vcr_cassettes/FindItem/find_with_Response/has_nil_auth_id_when_BD_doesn_t_want_to_give_us_one.yml
157
165
  - test/vcr_cassettes/FindItem/find_with_Response/has_nil_pickup_locations_when_BD_doesn_t_want_to_give_us_them.yml
158
166
  - test/vcr_cassettes/FindItem/find_with_Response/has_pickup_locations.yml
159
167
  - test/vcr_cassettes/FindItem/find_with_Response/knows_locally_available_.yml
@@ -165,28 +173,36 @@ files:
165
173
  - test/vcr_cassettes/FindItem/find_with_Response/requestable_with_multiple_items_if_at_least_one_is_requestable.yml
166
174
  - test/vcr_cassettes/Request/authentication_id/automatically_fetches_one_when_needed.yml
167
175
  - test/vcr_cassettes/Request/authentication_id/can_refetch_when_instructed.yml
168
- - test/vcr_cassettes/Request/can_make_a_succesful_request.yml
176
+ - test/vcr_cassettes/Request/authentication_id/manually_set_one_will_be_used_without_fetch.yml
177
+ - test/vcr_cassettes/Request/authentication_id/starts_out_nil.yml
178
+ - test/vcr_cassettes/Request/authentication_id/takes_with_auth_id.yml
179
+ - test/vcr_cassettes/Request/can_make_a_succesful_request_with_AID.yml
169
180
  - test/vcr_cassettes/Request/gets_BD_error_info.yml
181
+ - test/vcr_cassettes/Request/gets_BD_error_info_from_a_bad_AID.yml
182
+ - test/vcr_cassettes/Request/raises_exception_on_timeout_live.yml
170
183
  - test/vcr_cassettes/Request/raises_on_bad_path.yml
171
184
  - test/vcr_cassettes/Request/raises_on_bad_request_hash.yml
185
+ - test/vcr_cassettes/Request/uses_timeout_for_HttpClient.yml
172
186
  - test/vcr_cassettes/Request/with_expected_errors/still_returns_result.yml
173
187
  - test/vcr_cassettes/RequestItem/make_request/make_request_for_a_locally_available_item.yml
174
188
  - test/vcr_cassettes/RequestItem/make_request/make_request_for_a_requestable_item.yml
175
189
  - test/vcr_cassettes/RequestItem/make_request/make_request_for_an_unrequestable_item.yml
176
- - test/vcr_cassettes/RequestItem/make_request/raises_for_unrequestable.yml
177
- - test/vcr_cassettes/RequestItem/make_request/returns_number_for_succesful_request.yml
178
- - test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI004.yml
190
+ - test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI003.yml
191
+ - test/vcr_cassettes/RequestItem/make_request/sets_an_auth_id.yml
179
192
  - test/vcr_cassettes/RequestItem/make_request_/raises_for_unrequestable.yml
180
193
  - test/vcr_cassettes/RequestItem/make_request_/returns_number_for_succesful_request.yml
194
+ - test/vcr_cassettes/RequestItem/raises_proper_error_on_bad_AID.yml
195
+ - test/vcr_cassettes/RequestItem/raw_RequestItem_sanity_check.yml
181
196
  - test/vcr_cassettes/RequestItem/raw_requests_an_unrequestable_item.yml
182
197
  - test/vcr_cassettes/RequestItem/uses_manually_set_auth_id.yml
183
- - test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/still_works.yml
198
+ - test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_String_pickup_location.yml
199
+ - test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_structured_PickupLocation.yml
200
+ - test/vcr_cassettes/RequestQuery/raises_proper_error_on_bad_AID.yml
184
201
  - test/vcr_cassettes/RequestQuery/raw_request_query_request/returns_results.yml
185
202
  - test/vcr_cassettes/RequestQuery/raw_request_to_verify_the_BD_HTTP_API.yml
186
203
  - test/vcr_cassettes/RequestQuery/requests/fetches_default_records.yml
187
204
  - test/vcr_cassettes/RequestQuery/requests/fetches_full_records.yml
188
- - test/vcr_cassettes/top_level_describe/an_inner_describe/.yml
189
- homepage: ''
205
+ homepage: https://github.com/jrochkind/borrow_direct
190
206
  licenses:
191
207
  - MIT
192
208
  metadata: {}
@@ -196,22 +212,23 @@ require_paths:
196
212
  - lib
197
213
  required_ruby_version: !ruby/object:Gem::Requirement
198
214
  requirements:
199
- - - ! '>='
215
+ - - ">="
200
216
  - !ruby/object:Gem::Version
201
217
  version: '0'
202
218
  required_rubygems_version: !ruby/object:Gem::Requirement
203
219
  requirements:
204
- - - ! '>='
220
+ - - ">"
205
221
  - !ruby/object:Gem::Version
206
- version: '0'
222
+ version: 1.3.1
207
223
  requirements: []
208
224
  rubyforge_project:
209
- rubygems_version: 2.4.4
225
+ rubygems_version: 2.4.5
210
226
  signing_key:
211
227
  specification_version: 4
212
228
  summary: Ruby tools for interacting with the Borrow Direct consortial services
213
229
  test_files:
214
230
  - test/authentication_test.rb
231
+ - test/encryption_test.rb
215
232
  - test/find_item_test.rb
216
233
  - test/generate_query_test.rb
217
234
  - test/request_item_test.rb
@@ -224,18 +241,22 @@ test_files:
224
241
  - test/vcr_cassettes/Authentication/Makes_a_request_succesfully.yml
225
242
  - test/vcr_cassettes/Authentication/Raises_for_bad_library_symbol.yml
226
243
  - test/vcr_cassettes/Authentication/Raises_for_bad_patron_barcode.yml
244
+ - test/vcr_cassettes/Authentication/get_auth_id/Raises_for_bad_api_key.yml
227
245
  - test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_library_symbol.yml
228
246
  - test/vcr_cassettes/Authentication/get_auth_id/raises_for_a_bad_patron_barcode.yml
229
247
  - test/vcr_cassettes/Authentication/get_auth_id/returns_an_auth_id_for_a_good_request.yml
230
- - test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/.yml
248
+ - test/vcr_cassettes/Authentication/get_auth_id/returns_auth_id_with_API_key_from_defaults.yml
231
249
  - test/vcr_cassettes/Authentication/raw_request_to_verify_HTTP_api/works.yml
250
+ - test/vcr_cassettes/FindItem/_find_item_request/Raises_with_bad_api_key.yml
232
251
  - test/vcr_cassettes/FindItem/_find_item_request/finds_a_locally_available_item.yml
233
252
  - test/vcr_cassettes/FindItem/_find_item_request/finds_a_requestable_item.yml
234
253
  - test/vcr_cassettes/FindItem/_find_item_request/finds_an_item_that_does_not_exist_in_BD.yml
254
+ - test/vcr_cassettes/FindItem/_find_item_request/raises_proper_error_on_bad_AID.yml
255
+ - test/vcr_cassettes/FindItem/_find_item_request/uses_manually_set_auth_id.yml
235
256
  - test/vcr_cassettes/FindItem/_find_item_request/with_expected_error_PUBFI002/returns_result.yml
236
257
  - test/vcr_cassettes/FindItem/_find_item_request/works_with_multiple_values.yml
258
+ - test/vcr_cassettes/FindItem/find_with_Response/_pickup_location_data/returns_array_of_PickupLocations.yml
237
259
  - test/vcr_cassettes/FindItem/find_with_Response/has_an_auth_id.yml
238
- - test/vcr_cassettes/FindItem/find_with_Response/has_nil_auth_id_when_BD_doesn_t_want_to_give_us_one.yml
239
260
  - test/vcr_cassettes/FindItem/find_with_Response/has_nil_pickup_locations_when_BD_doesn_t_want_to_give_us_them.yml
240
261
  - test/vcr_cassettes/FindItem/find_with_Response/has_pickup_locations.yml
241
262
  - test/vcr_cassettes/FindItem/find_with_Response/knows_locally_available_.yml
@@ -247,25 +268,33 @@ test_files:
247
268
  - test/vcr_cassettes/FindItem/find_with_Response/requestable_with_multiple_items_if_at_least_one_is_requestable.yml
248
269
  - test/vcr_cassettes/Request/authentication_id/automatically_fetches_one_when_needed.yml
249
270
  - test/vcr_cassettes/Request/authentication_id/can_refetch_when_instructed.yml
250
- - test/vcr_cassettes/Request/can_make_a_succesful_request.yml
271
+ - test/vcr_cassettes/Request/authentication_id/manually_set_one_will_be_used_without_fetch.yml
272
+ - test/vcr_cassettes/Request/authentication_id/starts_out_nil.yml
273
+ - test/vcr_cassettes/Request/authentication_id/takes_with_auth_id.yml
274
+ - test/vcr_cassettes/Request/can_make_a_succesful_request_with_AID.yml
251
275
  - test/vcr_cassettes/Request/gets_BD_error_info.yml
276
+ - test/vcr_cassettes/Request/gets_BD_error_info_from_a_bad_AID.yml
277
+ - test/vcr_cassettes/Request/raises_exception_on_timeout_live.yml
252
278
  - test/vcr_cassettes/Request/raises_on_bad_path.yml
253
279
  - test/vcr_cassettes/Request/raises_on_bad_request_hash.yml
280
+ - test/vcr_cassettes/Request/uses_timeout_for_HttpClient.yml
254
281
  - test/vcr_cassettes/Request/with_expected_errors/still_returns_result.yml
255
282
  - test/vcr_cassettes/RequestItem/make_request/make_request_for_a_locally_available_item.yml
256
283
  - test/vcr_cassettes/RequestItem/make_request/make_request_for_a_requestable_item.yml
257
284
  - test/vcr_cassettes/RequestItem/make_request/make_request_for_an_unrequestable_item.yml
258
- - test/vcr_cassettes/RequestItem/make_request/raises_for_unrequestable.yml
259
- - test/vcr_cassettes/RequestItem/make_request/returns_number_for_succesful_request.yml
260
- - test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI004.yml
285
+ - test/vcr_cassettes/RequestItem/make_request/says_no_for_item_that_BD_returns_PUBRI003.yml
286
+ - test/vcr_cassettes/RequestItem/make_request/sets_an_auth_id.yml
261
287
  - test/vcr_cassettes/RequestItem/make_request_/raises_for_unrequestable.yml
262
288
  - test/vcr_cassettes/RequestItem/make_request_/returns_number_for_succesful_request.yml
289
+ - test/vcr_cassettes/RequestItem/raises_proper_error_on_bad_AID.yml
290
+ - test/vcr_cassettes/RequestItem/raw_RequestItem_sanity_check.yml
263
291
  - test/vcr_cassettes/RequestItem/raw_requests_an_unrequestable_item.yml
264
292
  - test/vcr_cassettes/RequestItem/uses_manually_set_auth_id.yml
265
- - test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/still_works.yml
293
+ - test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_String_pickup_location.yml
294
+ - test/vcr_cassettes/RequestItem/with_pickup_location_and_requestable_item/works_with_structured_PickupLocation.yml
295
+ - test/vcr_cassettes/RequestQuery/raises_proper_error_on_bad_AID.yml
266
296
  - test/vcr_cassettes/RequestQuery/raw_request_query_request/returns_results.yml
267
297
  - test/vcr_cassettes/RequestQuery/raw_request_to_verify_the_BD_HTTP_API.yml
268
298
  - test/vcr_cassettes/RequestQuery/requests/fetches_default_records.yml
269
299
  - test/vcr_cassettes/RequestQuery/requests/fetches_full_records.yml
270
- - test/vcr_cassettes/top_level_describe/an_inner_describe/.yml
271
300
  has_rdoc:
@@ -1,52 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
- body:
7
- encoding: UTF-8
8
- string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
- headers:
10
- User-Agent:
11
- - ruby borrow_direct gem (0.0.1) https://github.com/jrochkind/borrow_direct
12
- Accept:
13
- - ! '*/*'
14
- Date:
15
- - Tue, 21 Oct 2014 17:12:22 GMT
16
- Content-Type:
17
- - application/json
18
- Accept-Language:
19
- - en
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Server:
26
- - nginx/1.4.1
27
- Date:
28
- - Tue, 21 Oct 2014 17:12:23 GMT
29
- Content-Type:
30
- - application/json;charset=UTF-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- Set-Cookie:
36
- - visited=yes
37
- Expires:
38
- - Thu, 01 Jan 1970 00:00:00 GMT
39
- - Thu, 01 Jan 1970 00:00:00 GMT
40
- Content-Language:
41
- - en
42
- Pragma:
43
- - no-cache
44
- Cache-Control:
45
- - no-cache, no-store, max-age=0
46
- body:
47
- encoding: US-ASCII
48
- string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"CSN-4e1Y046kC14NZxZBbUYLP40","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
- Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
- http_version:
51
- recorded_at: Tue, 21 Oct 2014 17:12:24 GMT
52
- recorded_with: VCR 2.9.3
@@ -1,40 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://bdtest.relais-host.com/dws/item/available
6
- body:
7
- encoding: UTF-8
8
- string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"0109836413"}]}'
9
- headers:
10
- User-Agent:
11
- - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
- Accept:
13
- - ! '*/*'
14
- Date:
15
- - Tue, 21 Oct 2014 17:06:34 GMT
16
- Content-Type:
17
- - application/json
18
- Accept-Language:
19
- - en
20
- response:
21
- status:
22
- code: 404
23
- message: Not Found
24
- headers:
25
- Server:
26
- - nginx/1.4.1
27
- Date:
28
- - Tue, 21 Oct 2014 17:06:37 GMT
29
- Content-Type:
30
- - application/json;charset=UTF-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- body:
36
- encoding: US-ASCII
37
- string: ! '{"Error":{"ErrorNumber":"PUBFI002","ErrorMessage":"No result"}}'
38
- http_version:
39
- recorded_at: Tue, 21 Oct 2014 17:06:37 GMT
40
- recorded_with: VCR 2.9.3
@@ -1,49 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://bdtest.relais-host.com/dws/item/available
6
- body:
7
- encoding: UTF-8
8
- string: ! '{"PartnershipId":"BD","Credentials":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Barcode":"DUMMY_BD_PATRON"},"ExactSearch":[{"Type":"ISBN","Value":"9810743734"}]}'
9
- headers:
10
- User-Agent:
11
- - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
- Accept:
13
- - ! '*/*'
14
- Date:
15
- - Tue, 21 Oct 2014 17:05:58 GMT
16
- Content-Type:
17
- - application/json
18
- Accept-Language:
19
- - en
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Server:
26
- - nginx/1.4.1
27
- Date:
28
- - Tue, 21 Oct 2014 17:06:01 GMT
29
- Content-Type:
30
- - application/json;charset=UTF-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- body:
36
- encoding: US-ASCII
37
- string: ! '{"Item":{"Available":true,"SearchTerm":"isbn=9810743734","AuthorizationId":"d_u5EiN_dfK87HMDmeuCzSFqcp0","RequestLink":{"ButtonLink":"AddRequest","ButtonLabel":"Request","RequestMessage":"Request
38
- this item"},"PickupLocations":{"PickupLocation":["*Milton S. Eisenhower Library","APL
39
- - EP STUDENTS - Ed Center","APL STAFF - Room 5-17","Arthur Friedheim Library","Columbia
40
- Center","Harbor East","Harrison Medical Library-Bayview","Institute of the
41
- History of Medicine","JH Medical Campus Office (faculty and staff)","JHMI
42
- Pickup - Armstrong 306","JHMI Pickup - BSPH E4643","JHMI Pickup - Hampton
43
- House 9th floor","JHMI Pickup - PCTB 115-116","JHMI Pickup - School of Nursing
44
- 313","JHU Homewood Office (faculty and grad students)","Montgomery Library
45
- Resource Center","SAIS Library","Washington Library Resource Center","Welch
46
- Medical Library","Wilmer Friedenwald Library"]}}}'
47
- http_version:
48
- recorded_at: Tue, 21 Oct 2014 17:06:01 GMT
49
- recorded_with: VCR 2.9.3
@@ -1,91 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
- body:
7
- encoding: UTF-8
8
- string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
- headers:
10
- User-Agent:
11
- - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
- Accept:
13
- - ! '*/*'
14
- Date:
15
- - Tue, 21 Oct 2014 17:05:42 GMT
16
- Content-Type:
17
- - application/json
18
- Accept-Language:
19
- - en
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Server:
26
- - nginx/1.4.1
27
- Date:
28
- - Tue, 21 Oct 2014 17:05:44 GMT
29
- Content-Type:
30
- - application/json;charset=UTF-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- Set-Cookie:
36
- - visited=yes
37
- Expires:
38
- - Thu, 01 Jan 1970 00:00:00 GMT
39
- - Thu, 01 Jan 1970 00:00:00 GMT
40
- Content-Language:
41
- - en
42
- Pragma:
43
- - no-cache
44
- Cache-Control:
45
- - no-cache, no-store, max-age=0
46
- body:
47
- encoding: US-ASCII
48
- string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"mHVG8a1xWjUEVhUSxmlJSVFoaLY","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
- Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
- http_version:
51
- recorded_at: Tue, 21 Oct 2014 17:05:44 GMT
52
- - request:
53
- method: post
54
- uri: https://bdtest.relais-host.com/dws/item/add
55
- body:
56
- encoding: UTF-8
57
- string: ! '{"PartnershipId":"BD","AuthorizationId":"mHVG8a1xWjUEVhUSxmlJSVFoaLY","PickupLocation":null,"ExactSearch":[{"Type":"ISBN","Value":"1441190090"}]}'
58
- headers:
59
- User-Agent:
60
- - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
61
- Accept:
62
- - ! '*/*'
63
- Date:
64
- - Tue, 21 Oct 2014 17:05:44 GMT
65
- Content-Type:
66
- - application/json
67
- Accept-Language:
68
- - en
69
- response:
70
- status:
71
- code: 200
72
- message: OK
73
- headers:
74
- Server:
75
- - nginx/1.4.1
76
- Date:
77
- - Tue, 21 Oct 2014 17:05:44 GMT
78
- Content-Type:
79
- - application/json;charset=UTF-8
80
- Transfer-Encoding:
81
- - chunked
82
- Connection:
83
- - keep-alive
84
- body:
85
- encoding: US-ASCII
86
- string: ! '{"Request":{"RequestLink":{"ButtonLabel":"Request","ButtonLink":"http://findit.library.jhu.edu/resolve?genre=book","RequestMessage":"Borrow
87
- Direct cannot fill this request at this time. Please request through Interlibrary
88
- Loan."}}}'
89
- http_version:
90
- recorded_at: Tue, 21 Oct 2014 17:05:44 GMT
91
- recorded_with: VCR 2.9.3
@@ -1,89 +0,0 @@
1
- ---
2
- http_interactions:
3
- - request:
4
- method: post
5
- uri: https://bdtest.relais-host.com/portal-service/user/authentication/patron
6
- body:
7
- encoding: UTF-8
8
- string: ! '{"AuthenticationInformation":{"LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","PatronId":"DUMMY_BD_PATRON"}}'
9
- headers:
10
- User-Agent:
11
- - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
12
- Accept:
13
- - ! '*/*'
14
- Date:
15
- - Tue, 21 Oct 2014 17:05:39 GMT
16
- Content-Type:
17
- - application/json
18
- Accept-Language:
19
- - en
20
- response:
21
- status:
22
- code: 200
23
- message: OK
24
- headers:
25
- Server:
26
- - nginx/1.4.1
27
- Date:
28
- - Tue, 21 Oct 2014 17:05:40 GMT
29
- Content-Type:
30
- - application/json;charset=UTF-8
31
- Transfer-Encoding:
32
- - chunked
33
- Connection:
34
- - keep-alive
35
- Set-Cookie:
36
- - visited=yes
37
- Expires:
38
- - Thu, 01 Jan 1970 00:00:00 GMT
39
- - Thu, 01 Jan 1970 00:00:00 GMT
40
- Content-Language:
41
- - en
42
- Pragma:
43
- - no-cache
44
- Cache-Control:
45
- - no-cache, no-store, max-age=0
46
- body:
47
- encoding: US-ASCII
48
- string: ! '{"Authentication":{"AuthnUserInfo":{"AId":"9F_-6PA7WHD6mT0obUgcOVRTXGo","LibrarySymbol":"DUMMY_BD_LIBRARY_SYMBOL","Iso639_2_LangCode":"ENG","UserLogin":"DUMMY_BD_PATRON","FirstName":"Jonathan","LastName":"Rochkind","AllowLoanAddRequest":true,"AllowCopyAddRequest":false,"AllowSelDelivLoanChange":true,"AllowSelDelivCopyChange":false,"ILSProfile":{"EmailAddress":"jonathan@dnil.net","Telephone":"4105168886","AddressInformation":{"Address1":"Library
49
- Systems","Address2":"MSE Library\r\nHomewood Campus"}}}}}'
50
- http_version:
51
- recorded_at: Tue, 21 Oct 2014 17:05:40 GMT
52
- - request:
53
- method: post
54
- uri: https://bdtest.relais-host.com/dws/item/add
55
- body:
56
- encoding: UTF-8
57
- string: ! '{"PartnershipId":"BD","AuthorizationId":"9F_-6PA7WHD6mT0obUgcOVRTXGo","PickupLocation":null,"ExactSearch":[{"Type":"ISBN","Value":"9797994864"}]}'
58
- headers:
59
- User-Agent:
60
- - ruby borrow_direct gem 0.0.1 (HTTPClient 2.5.1) https://github.com/jrochkind/borrow_direct
61
- Accept:
62
- - ! '*/*'
63
- Date:
64
- - Tue, 21 Oct 2014 17:05:40 GMT
65
- Content-Type:
66
- - application/json
67
- Accept-Language:
68
- - en
69
- response:
70
- status:
71
- code: 200
72
- message: OK
73
- headers:
74
- Server:
75
- - nginx/1.4.1
76
- Date:
77
- - Tue, 21 Oct 2014 17:05:42 GMT
78
- Content-Type:
79
- - application/json;charset=UTF-8
80
- Transfer-Encoding:
81
- - chunked
82
- Connection:
83
- - keep-alive
84
- body:
85
- encoding: US-ASCII
86
- string: ! '{"Request":{"RequestNumber":"JHU-99000780"}}'
87
- http_version:
88
- recorded_at: Tue, 21 Oct 2014 17:05:42 GMT
89
- recorded_with: VCR 2.9.3