voyager_api 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
@@ -46,8 +46,8 @@
46
46
  short_message: 'Requests: %REQS'
47
47
  long_message: 'Requests: %REQS'
48
48
  5r:
49
- short_message: 'Checked out, due %DATE (Requests: %REQS)'
50
- long_message: 'Checked out, due %DATE (Requests: %REQS). Try Borrow Direct or ILL.'
49
+ short_message: 'Requests: %REQS'
50
+ long_message: 'Requests: %REQS. Try Borrow Direct or ILL.'
51
51
  services:
52
52
  - borrow_direct
53
53
  - ill
@@ -55,8 +55,8 @@
55
55
  short_message: 'Requests: %REQS'
56
56
  long_message: 'Requests: %REQS'
57
57
  6r:
58
- short_message: 'Checked out, due %DATE (Requests: %REQS)'
59
- long_message: 'Checked out, due %DATE (Requests: %REQS). Try Borrow Direct or ILL.'
58
+ short_message: 'Requests: %REQS'
59
+ long_message: 'Requests: %REQS. Try Borrow Direct or ILL.'
60
60
  services:
61
61
  - borrow_direct
62
62
  - ill
data/lib/holdings/item.rb CHANGED
@@ -115,15 +115,13 @@ module Voyager
115
115
  #
116
116
  def determine_status(records,item_count)
117
117
 
118
- # this may need to be refined
119
- # statusCode = 1 in first (and only) record means nothing has a item status set
120
118
  # assume available
121
119
  status = 'available'
122
- # if statusCode > 1 some item status is set so some item is not available; 11 (returned) is the exception
123
- if records.first[:statusCode].to_i > 1 && records.first[:statusCode].to_i != 11
124
- # if the number of records (item:itemRecord nodes) with statusCodes > 1 equals the total number of items
125
- # everything is unavailable; otherwise, only some items are unavailable
126
- if records.length == item_count.to_i
120
+ unavailable = 0
121
+ # if statusCode > 1 some item status is set so some item may not be available; 11 (returned) is the exception
122
+ records.each { |record| unavailable += 1 if record[:statusCode].to_i > 1 && record[:statusCode].to_i != 11 }
123
+ unless unavailable == 0
124
+ if unavailable == item_count.to_i
127
125
  status = 'not_available'
128
126
  else
129
127
  status = 'some_available'
@@ -0,0 +1,2 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <ser:voyagerServiceData xmlns:ser="http://www.endinfosys.com/Voyager/serviceParameters"><ser:serviceData xsi:type="hol:holdingsCollectionType" xmlns:hol="http://www.endinfosys.com/Voyager/holdings" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><hol:holdingsRecord><hol:bibRecord bibId="299492" dpsFlag="N"><hol:marcRecord><slim:leader xmlns:slim="http://www.loc.gov/MARC21/slim">01514cam a2200361 4500</slim:leader><slim:controlfield tag="001" xmlns:slim="http://www.loc.gov/MARC21/slim">299492</slim:controlfield><slim:controlfield tag="005" xmlns:slim="http://www.loc.gov/MARC21/slim">20100225175846.0</slim:controlfield><slim:controlfield tag="008" xmlns:slim="http://www.loc.gov/MARC21/slim">850204m19691975vauc b 000 0 eng </slim:controlfield><slim:datafield ind2=" " ind1=" " tag="010" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a"> 68008536 //r852</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="020" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">0813902584 (v. 1)</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="020" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">0813906660 (v. 3)</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="035" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">(OCoLC)590</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="035" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">(OCoLC)ocm00000590</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="035" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">(CStRLIN)NYCG85-B11003</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="035" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="9">ABH4249CU</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="035" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">(NNC)299492</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="040" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">DLC</slim:subfield><slim:subfield code="c">DLC</slim:subfield><slim:subfield code="d">OCoLC</slim:subfield><slim:subfield code="d">MH</slim:subfield><slim:subfield code="d">CStRLIN</slim:subfield><slim:subfield code="d">NNC</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1="0" tag="050" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">PS1449</slim:subfield><slim:subfield code="b">.C85 1969</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="082" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">813/.4</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="090" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">PS1449</slim:subfield><slim:subfield code="b">.C85 1969</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1="1" tag="100" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">Crane, Stephen,</slim:subfield><slim:subfield code="d">1871-1900.</slim:subfield></slim:datafield><slim:datafield ind2="0" ind1="1" tag="240" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">Works.</slim:subfield><slim:subfield code="f">1969</slim:subfield></slim:datafield><slim:datafield ind2="4" ind1="1" tag="245" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">The University of Virginia edition of the works of Stephen Crane.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="260" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">Charlottesville :</slim:subfield><slim:subfield code="b">University Press of Virginia,</slim:subfield><slim:subfield code="c">1969-1975.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="300" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">10 v.</slim:subfield><slim:subfield code="b">fronts.</slim:subfield><slim:subfield code="c">25 cm.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="500" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">Half title; each vol. has also special t.p.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="500" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">Title on spine: The works of Stephen Crane.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="504" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">Bibliographical footnotes.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1="0" tag="505" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">v. 1. Bowery tales: Maggie. George's mother.--v. 2. The red badge of courage.--v. 3. The third violet. Active service.--v. 4. The O'Ruddy.--v. 5. Tales of adventure.--v. 6. Tales of war.--v. 7. Tales of Whilomville: The monster. His new mittens. Whilomville stories.--v. 8. Tales, sketches, and reports.--v. 9. Reports of war: War dispatches. Great battles of the world.--v. 10. Poems and literary remains.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1="2" tag="710" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">University of Virginia.</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="900" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">AUTH</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1="2" tag="948" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">20050919</slim:subfield><slim:subfield code="b">a</slim:subfield><slim:subfield code="c">rch2</slim:subfield><slim:subfield code="d">MPS</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1=" " tag="965" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">(NNC)RECONB185</slim:subfield></slim:datafield></hol:marcRecord><hol:bibData name="databaseCode">LOCAL</hol:bibData><hol:bibData name="databaseName">Local Database</hol:bibData><hol:bibData name="createDate">2003-05-05 00:00:00</hol:bibData><hol:bibData name="updateDate">2010-02-25 17:58:46</hol:bibData><hol:bibData name="suppressInOpac">N</hol:bibData><hol:bibData name="exportOK">N</hol:bibData><hol:bibData name="exportOKDate" xsi:nil="true"/><hol:bibData name="exportOperatorId" xsi:nil="true"/><hol:bibData name="createLocation" xsi:nil="true"/><hol:bibData name="updateLocation" xsi:nil="true"/><hol:bibData name="exportOKLocation" xsi:nil="true"/><hol:bibData name="owningLibrary" id="1">COLUMBIA</hol:bibData></hol:bibRecord><hol:mfhdCollection><mfhd:mfhdRecord bibId="299492" mfhdId="405749" xmlns:mfhd="http://www.endinfosys.com/Voyager/mfhd"><mfhd:marcRecord><slim:leader xmlns:slim="http://www.loc.gov/MARC21/slim">00286ny a22001333 4500</slim:leader><slim:controlfield tag="001" xmlns:slim="http://www.loc.gov/MARC21/slim">405749</slim:controlfield><slim:controlfield tag="004" xmlns:slim="http://www.loc.gov/MARC21/slim">299492</slim:controlfield><slim:controlfield tag="005" xmlns:slim="http://www.loc.gov/MARC21/slim">20030428150038.0</slim:controlfield><slim:controlfield tag="008" xmlns:slim="http://www.loc.gov/MARC21/slim">901019|| | | ||eng </slim:controlfield><slim:datafield ind2=" " ind1="1" tag="014" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">ABH4249CU002</slim:subfield></slim:datafield><slim:datafield ind2=" " ind1="0" tag="014" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="9">001021781</slim:subfield></slim:datafield><slim:datafield ind2="1" ind1="0" tag="852" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="b">bar</slim:subfield><slim:subfield code="h">PS1449.C85</slim:subfield><slim:subfield code="i">1969</slim:subfield></slim:datafield><slim:datafield ind2="0" ind1="3" tag="866" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="8">0</slim:subfield><slim:subfield code="a">v.1-10</slim:subfield></slim:datafield><slim:datafield ind2="0" ind1="3" tag="866" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="8">0</slim:subfield><slim:subfield code="a">1969-1975</slim:subfield></slim:datafield></mfhd:marcRecord><mfhd:mfhdData name="databaseCode">LOCAL</mfhd:mfhdData><mfhd:mfhdData name="databaseName">Local Database</mfhd:mfhdData><mfhd:mfhdData name="mfhdStubFlag">0</mfhd:mfhdData><mfhd:mfhdData name="createOperatorId">load</mfhd:mfhdData><mfhd:mfhdData name="updateOperatorId" xsi:nil="true"/><mfhd:mfhdData name="createDate">2003-05-06 00:00:00</mfhd:mfhdData><mfhd:mfhdData name="updateDate" xsi:nil="true"/><mfhd:mfhdData name="createLocation" xsi:nil="true"/><mfhd:mfhdData name="updateLocation" xsi:nil="true"/><mfhd:mfhdData name="suppressInOpac">N</mfhd:mfhdData><mfhd:mfhdData name="exportOK" xsi:nil="true"/><mfhd:mfhdData name="sourceModule" xsi:nil="true"/><mfhd:mfhdData name="callNumber">PS1449.C85 1969</mfhd:mfhdData><mfhd:mfhdData name="locationCode" id="19">bar</mfhd:mfhdData><mfhd:mfhdData name="locationName" xsi:nil="true"/><mfhd:mfhdData name="locationDisplayName">Barnard</mfhd:mfhdData><mfhd:mfhdData name="locationSpineLabel">BARNARD</mfhd:mfhdData><mfhd:mfhdData name="owningLibrary" id="1">COLUMBIA</mfhd:mfhdData><mfhd:itemCollection><item:itemCount xmlns:item="http://www.endinfosys.com/Voyager/item">10</item:itemCount><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">1</item:itemData><item:itemData name="statusDate" xsi:nil="true"/><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode" xsi:nil="true"/><item:itemData name="lastName" xsi:nil="true"/><item:itemData name="firstName" xsi:nil="true"/><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration" xsi:nil="true"/><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemLocation xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemLocationData name="tmpLoc" xsi:nil="true"/><item:itemLocationData name="tempLocation">Barnard</item:itemLocationData><item:itemLocationData name="itemEnum" xsi:nil="true"/><item:itemLocationData name="itemChron" xsi:nil="true"/><item:itemLocationData name="itemYear" xsi:nil="true"/><item:itemLocationData name="itemCaption" xsi:nil="true"/><item:itemLocationData name="itemFreeText" xsi:nil="true"/><item:itemLocationData name="itemCopyNumber" xsi:nil="true"/></item:itemLocation></mfhd:itemCollection></mfhd:mfhdRecord><mfhd:mfhdRecord bibId="299492" mfhdId="405748" xmlns:mfhd="http://www.endinfosys.com/Voyager/mfhd"><mfhd:marcRecord><slim:leader xmlns:slim="http://www.loc.gov/MARC21/slim">00231cv a2200109z 4500</slim:leader><slim:controlfield tag="001" xmlns:slim="http://www.loc.gov/MARC21/slim">405748</slim:controlfield><slim:controlfield tag="004" xmlns:slim="http://www.loc.gov/MARC21/slim">299492</slim:controlfield><slim:controlfield tag="005" xmlns:slim="http://www.loc.gov/MARC21/slim">20130414131538.0</slim:controlfield><slim:controlfield tag="008" xmlns:slim="http://www.loc.gov/MARC21/slim">0304284u 0 0001uu 0000000</slim:controlfield><slim:datafield ind2=" " ind1="1" tag="014" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="a">ABH4249CU001</slim:subfield></slim:datafield><slim:datafield ind2="1" ind1="0" tag="852" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="b">glx</slim:subfield><slim:subfield code="h">PS1449.C85</slim:subfield><slim:subfield code="i">1969</slim:subfield></slim:datafield><slim:datafield ind2="1" ind1="4" tag="866" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="8">0</slim:subfield><slim:subfield code="a">v.1-10</slim:subfield></slim:datafield></mfhd:marcRecord><mfhd:mfhdData name="databaseCode">LOCAL</mfhd:mfhdData><mfhd:mfhdData name="databaseName">Local Database</mfhd:mfhdData><mfhd:mfhdData name="mfhdStubFlag">0</mfhd:mfhdData><mfhd:mfhdData name="createOperatorId">load</mfhd:mfhdData><mfhd:mfhdData name="updateOperatorId">jjf44</mfhd:mfhdData><mfhd:mfhdData name="createDate">2003-05-06 00:00:00</mfhd:mfhdData><mfhd:mfhdData name="updateDate">2013-04-14 13:15:38</mfhd:mfhdData><mfhd:mfhdData name="createLocation" xsi:nil="true"/><mfhd:mfhdData name="updateLocation">CATCUL</mfhd:mfhdData><mfhd:mfhdData name="suppressInOpac">N</mfhd:mfhdData><mfhd:mfhdData name="exportOK" xsi:nil="true"/><mfhd:mfhdData name="sourceModule">C</mfhd:mfhdData><mfhd:mfhdData name="callNumber">PS1449.C85 1969</mfhd:mfhdData><mfhd:mfhdData name="locationCode" id="143">glx</mfhd:mfhdData><mfhd:mfhdData name="locationName" xsi:nil="true"/><mfhd:mfhdData name="locationDisplayName">Butler Stacks (Enter at the Butler Circulation Desk)</mfhd:mfhdData><mfhd:mfhdData name="locationSpineLabel">BUTLSTAX</mfhd:mfhdData><mfhd:mfhdData name="owningLibrary" id="1">COLUMBIA</mfhd:mfhdData><mfhd:itemCollection><item:itemCount xmlns:item="http://www.endinfosys.com/Voyager/item">10</item:itemCount><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">11</item:itemData><item:itemData name="statusDate">2013-04-14 13:13:11</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode" xsi:nil="true"/><item:itemData name="lastName" xsi:nil="true"/><item:itemData name="firstName" xsi:nil="true"/><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.10</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">11</item:itemData><item:itemData name="statusDate">2013-04-14 13:12:52</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode" xsi:nil="true"/><item:itemData name="lastName" xsi:nil="true"/><item:itemData name="firstName" xsi:nil="true"/><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.6</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">11</item:itemData><item:itemData name="statusDate">2013-04-14 13:12:37</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode" xsi:nil="true"/><item:itemData name="lastName" xsi:nil="true"/><item:itemData name="firstName" xsi:nil="true"/><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.3</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">11</item:itemData><item:itemData name="statusDate">2013-04-14 13:13:05</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode" xsi:nil="true"/><item:itemData name="lastName" xsi:nil="true"/><item:itemData name="firstName" xsi:nil="true"/><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.9</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.4</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.7</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemLocation xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemLocationData name="tmpLoc" xsi:nil="true"/><item:itemLocationData name="tempLocation">Butler Stacks (Enter at the Butler Circulation Desk)</item:itemLocationData><item:itemLocationData name="itemEnum" xsi:nil="true"/><item:itemLocationData name="itemChron" xsi:nil="true"/><item:itemLocationData name="itemYear" xsi:nil="true"/><item:itemLocationData name="itemCaption" xsi:nil="true"/><item:itemLocationData name="itemFreeText" xsi:nil="true"/><item:itemLocationData name="itemCopyNumber" xsi:nil="true"/></item:itemLocation></mfhd:itemCollection></mfhd:mfhdRecord><mfhd:mfhdRecord bibId="299492" mfhdId="6254088" xmlns:mfhd="http://www.endinfosys.com/Voyager/mfhd"><mfhd:marcRecord><slim:leader xmlns:slim="http://www.loc.gov/MARC21/slim">00212cv a22000974 4500</slim:leader><slim:controlfield tag="001" xmlns:slim="http://www.loc.gov/MARC21/slim">6254088</slim:controlfield><slim:controlfield tag="004" xmlns:slim="http://www.loc.gov/MARC21/slim">299492</slim:controlfield><slim:controlfield tag="005" xmlns:slim="http://www.loc.gov/MARC21/slim">20130414125947.0</slim:controlfield><slim:controlfield tag="008" xmlns:slim="http://www.loc.gov/MARC21/slim">0508184p 8 2001aa 0000000</slim:controlfield><slim:datafield ind2="1" ind1="0" tag="852" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="b">ushi</slim:subfield><slim:subfield code="h">PS1449</slim:subfield><slim:subfield code="i">.C85 1969</slim:subfield></slim:datafield><slim:datafield ind2="1" ind1="4" tag="866" xmlns:slim="http://www.loc.gov/MARC21/slim"><slim:subfield code="8">0</slim:subfield><slim:subfield code="a">v.1-4, v.6-10</slim:subfield></slim:datafield></mfhd:marcRecord><mfhd:mfhdData name="databaseCode">LOCAL</mfhd:mfhdData><mfhd:mfhdData name="databaseName">Local Database</mfhd:mfhdData><mfhd:mfhdData name="mfhdStubFlag">0</mfhd:mfhdData><mfhd:mfhdData name="createOperatorId">(SYS: ACQ)</mfhd:mfhdData><mfhd:mfhdData name="updateOperatorId">jjf44</mfhd:mfhdData><mfhd:mfhdData name="createDate">2005-08-18 15:46:57</mfhd:mfhdData><mfhd:mfhdData name="updateDate">2013-04-14 12:59:47</mfhd:mfhdData><mfhd:mfhdData name="createLocation" xsi:nil="true"/><mfhd:mfhdData name="updateLocation">CATCUL</mfhd:mfhdData><mfhd:mfhdData name="suppressInOpac">N</mfhd:mfhdData><mfhd:mfhdData name="exportOK">N</mfhd:mfhdData><mfhd:mfhdData name="sourceModule">C</mfhd:mfhdData><mfhd:mfhdData name="callNumber">PS1449 .C85 1969</mfhd:mfhdData><mfhd:mfhdData name="locationCode" id="384">ushi</mfhd:mfhdData><mfhd:mfhdData name="locationName" xsi:nil="true"/><mfhd:mfhdData name="locationDisplayName">US History &amp; Literature Reading Rm, 502 Butler (Non-Circ)</mfhd:mfhdData><mfhd:mfhdData name="locationSpineLabel">USHIST LIT</mfhd:mfhdData><mfhd:mfhdData name="owningLibrary" id="1">COLUMBIA</mfhd:mfhdData><mfhd:itemCollection><item:itemCount xmlns:item="http://www.endinfosys.com/Voyager/item">9</item:itemCount><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.1</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.3</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.4</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.6</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.7</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.8</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.9</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.2</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemRecord xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemData name="statusCode">2</item:itemData><item:itemData name="statusDate">2013-06-13 23:00:00</item:itemData><item:itemData name="holdLocation" xsi:nil="true"/><item:itemData name="requestCount">0</item:itemData><item:itemData name="patronGroupCode">MIS </item:itemData><item:itemData name="lastName">Unavailable. Try Borrow </item:itemData><item:itemData name="firstName">Direct or ILL. </item:itemData><item:itemData name="todaysDate">2013-04-16 10:33:39</item:itemData><item:itemData name="enumeration">v.10</item:itemData><item:itemData name="chronology" xsi:nil="true"/><item:itemData name="year" xsi:nil="true"/><item:itemData name="caption" xsi:nil="true"/><item:itemData name="text" xsi:nil="true"/><item:itemData name="copyNumber" xsi:nil="true"/><item:itemData name="callNumber"/></item:itemRecord><item:itemLocation xmlns:item="http://www.endinfosys.com/Voyager/item"><item:itemLocationData name="tmpLoc" xsi:nil="true"/><item:itemLocationData name="tempLocation">US History &amp; Literature Reading Rm, 502 Butler (Non-Circ)</item:itemLocationData><item:itemLocationData name="itemEnum" xsi:nil="true"/><item:itemLocationData name="itemChron" xsi:nil="true"/><item:itemLocationData name="itemYear" xsi:nil="true"/><item:itemLocationData name="itemCaption" xsi:nil="true"/><item:itemLocationData name="itemFreeText" xsi:nil="true"/><item:itemLocationData name="itemCopyNumber" xsi:nil="true"/></item:itemLocation></mfhd:itemCollection></mfhd:mfhdRecord></hol:mfhdCollection></hol:holdingsRecord></ser:serviceData></ser:voyagerServiceData>
@@ -73,5 +73,12 @@ class TestItem < HoldingsTestCase
73
73
  assert_equal 'no.21 (2010) In Process 2011-02-18. Place an In Process item request.', record.item_status[:messages].first[:long_message], 'status 22 in process'
74
74
  end
75
75
 
76
+ def test_determine_status
77
+ record = load_fixture("holdings_299492.xml").records
78
+ assert_equal 'available', record[0].item_status[:status]
79
+ assert_equal 'some_available', record[1].item_status[:status]
80
+ assert_equal 'not_available', record[2].item_status[:status]
81
+ end
82
+
76
83
  end
77
84
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voyager_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-04-12 00:00:00.000000000Z
13
+ date: 2013-04-18 00:00:00.000000000Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
17
- requirement: &2152683280 !ruby/object:Gem::Requirement
17
+ requirement: &2153268760 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2152683280
25
+ version_requirements: *2153268760
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: i18n
28
- requirement: &2152682380 !ruby/object:Gem::Requirement
28
+ requirement: &2153267220 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2152682380
36
+ version_requirements: *2153267220
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: httpclient
39
- requirement: &2152681520 !ruby/object:Gem::Requirement
39
+ requirement: &2153253800 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2152681520
47
+ version_requirements: *2153253800
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: nokogiri
50
- requirement: &2152680440 !ruby/object:Gem::Requirement
50
+ requirement: &2153253040 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *2152680440
58
+ version_requirements: *2153253040
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: minitest
61
- requirement: &2152679160 !ruby/object:Gem::Requirement
61
+ requirement: &2153252400 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: '0'
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2152679160
69
+ version_requirements: *2153252400
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: bundler
72
- requirement: &2152677840 !ruby/object:Gem::Requirement
72
+ requirement: &2153251660 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ~>
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.0.0
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2152677840
80
+ version_requirements: *2153251660
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: jeweler
83
- requirement: &2152676780 !ruby/object:Gem::Requirement
83
+ requirement: &2153251060 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ~>
@@ -88,10 +88,10 @@ dependencies:
88
88
  version: 1.6.4
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *2152676780
91
+ version_requirements: *2153251060
92
92
  - !ruby/object:Gem::Dependency
93
93
  name: rcov
94
- requirement: &2152675460 !ruby/object:Gem::Requirement
94
+ requirement: &2153250360 !ruby/object:Gem::Requirement
95
95
  none: false
96
96
  requirements:
97
97
  - - ! '>='
@@ -99,10 +99,10 @@ dependencies:
99
99
  version: '0'
100
100
  type: :development
101
101
  prerelease: false
102
- version_requirements: *2152675460
102
+ version_requirements: *2153250360
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: guard-minitest
105
- requirement: &2152674120 !ruby/object:Gem::Requirement
105
+ requirement: &2153249480 !ruby/object:Gem::Requirement
106
106
  none: false
107
107
  requirements:
108
108
  - - ! '>='
@@ -110,10 +110,10 @@ dependencies:
110
110
  version: '0'
111
111
  type: :development
112
112
  prerelease: false
113
- version_requirements: *2152674120
113
+ version_requirements: *2153249480
114
114
  - !ruby/object:Gem::Dependency
115
115
  name: rb-fsevent
116
- requirement: &2152666280 !ruby/object:Gem::Requirement
116
+ requirement: &2153248880 !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements:
119
119
  - - ! '>='
@@ -121,10 +121,10 @@ dependencies:
121
121
  version: '0'
122
122
  type: :development
123
123
  prerelease: false
124
- version_requirements: *2152666280
124
+ version_requirements: *2153248880
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: mocha
127
- requirement: &2152665040 !ruby/object:Gem::Requirement
127
+ requirement: &2153247920 !ruby/object:Gem::Requirement
128
128
  none: false
129
129
  requirements:
130
130
  - - ! '>='
@@ -132,10 +132,10 @@ dependencies:
132
132
  version: '0'
133
133
  type: :development
134
134
  prerelease: false
135
- version_requirements: *2152665040
135
+ version_requirements: *2153247920
136
136
  - !ruby/object:Gem::Dependency
137
137
  name: growl
138
- requirement: &2152663940 !ruby/object:Gem::Requirement
138
+ requirement: &2153247200 !ruby/object:Gem::Requirement
139
139
  none: false
140
140
  requirements:
141
141
  - - ! '>='
@@ -143,7 +143,7 @@ dependencies:
143
143
  version: '0'
144
144
  type: :development
145
145
  prerelease: false
146
- version_requirements: *2152663940
146
+ version_requirements: *2153247200
147
147
  description: ! 'Middleware gem for Voyager 7 API calls, specificially holdings information '
148
148
  email: github@jamesstuart.org
149
149
  executables: []
@@ -177,6 +177,7 @@ files:
177
177
  - test/fixtures/holdings_1717646.xml
178
178
  - test/fixtures/holdings_2606957.xml
179
179
  - test/fixtures/holdings_289196.xml
180
+ - test/fixtures/holdings_299492.xml
180
181
  - test/fixtures/holdings_3708764.xml
181
182
  - test/fixtures/holdings_4191079.xml
182
183
  - test/fixtures/holdings_4949188.xml
@@ -234,7 +235,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
234
235
  version: '0'
235
236
  segments:
236
237
  - 0
237
- hash: 4365427497241977956
238
+ hash: 4064712130275143839
238
239
  required_rubygems_version: !ruby/object:Gem::Requirement
239
240
  none: false
240
241
  requirements: