voyager_oracle_api 0.3.5 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/status.rb +24 -17
  3. metadata +3 -4
  4. data/voyager_api.gemspec +0 -115
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.5
1
+ 1.0.0
data/lib/status.rb CHANGED
@@ -38,7 +38,14 @@ module Voyager
38
38
  statuses
39
39
  end
40
40
 
41
+
42
+ # available statuses
43
+
41
44
  # 1 Not Charged
45
+ # 11 Discharged
46
+
47
+ # not available statuses
48
+
42
49
  # 2 Charged
43
50
  # 3 Renewed
44
51
  # 4 Overdue
@@ -48,21 +55,24 @@ module Voyager
48
55
  # 8 In Transit
49
56
  # 9 In Transit Discharged no longer used but appear in records
50
57
  # 10 In Transit On Hold no longer used but appear in records
51
- # 11 Discharged
58
+ # 9 + 10 converted to 8 in GetHoldingsService
52
59
  # 12 Missing
53
60
  # 13 Lost--Library Applied
54
61
  # 14 Lost--System Applied
55
- # 15 Claims Returned x
56
- # 16 Damaged x
57
- # 17 Withdrawn skip item
58
62
  # 18 At Bindery
59
- # 19 Cataloging Review x
60
- # 20 Circulation Review x
61
63
  # 21 Scheduled
62
64
  # 22 In Process
63
65
  # 23 Call Slip Request
64
66
  # 24 Short Loan Request
65
67
  # 25 Remote Storage Request
68
+
69
+ # not used to determine status in Voyager application or apis
70
+
71
+ # 15 Claims Returned x
72
+ # 16 Damaged x
73
+ # 17 Withdrawn x
74
+ # 19 Cataloging Review x
75
+ # 20 Circulation Review x
66
76
 
67
77
  def determine_status(items)
68
78
 
@@ -72,17 +82,14 @@ module Voyager
72
82
  ucnt = 0 # count of unavailable items
73
83
 
74
84
  items.each_pair do |itemid,statuses|
75
- # skip withdrawn
76
- unless statuses.include?(17)
77
- icnt += 1
78
- # the overwhelming majority of items have only one status
79
- if statuses.length == 1
80
- ucnt += 1 unless [1,9,11].any? {|code| statuses.include?(code)}
81
- else
82
- # some unavalable statuses can be in combination with 1, 9 and 11 so we test for them first
83
- if [2,3,4,5,6,7,8,10,12,13,14,18,21,22,23,24,25].any? {|code| statuses.include?(code)}
84
- ucnt += 1
85
- end
85
+ icnt += 1
86
+ # the overwhelming majority of items have only one status
87
+ if statuses.length == 1
88
+ ucnt += 1 unless [1,11].any? {|code| statuses.include?(code)}
89
+ else
90
+ # some unavalable statuses can be in combination with 1 and 11 so we test for them first
91
+ if [2,3,4,5,6,7,8,9,10,12,13,14,18,21,22,23,24,25].any? {|code| statuses.include?(code)}
92
+ ucnt += 1
86
93
  end
87
94
  end
88
95
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: voyager_oracle_api
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.3.5
5
+ version: 1.0.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - James Stuart
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2012-10-04 00:00:00 Z
14
+ date: 2012-10-18 00:00:00 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: activesupport
@@ -210,7 +210,6 @@ files:
210
210
  - test/test_fixtures.rb
211
211
  - test/test_simple.rb
212
212
  - test/test_voyager_connection.rb
213
- - voyager_api.gemspec
214
213
  - voyager_oracle_api.gemspec
215
214
  homepage: http://github.com/cul/voyager_oracle_api
216
215
  licenses:
@@ -225,7 +224,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
225
224
  requirements:
226
225
  - - ">="
227
226
  - !ruby/object:Gem::Version
228
- hash: 1040777007
227
+ hash: 1065477551
229
228
  segments:
230
229
  - 0
231
230
  version: "0"
data/voyager_api.gemspec DELETED
@@ -1,115 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{voyager_api}
8
- s.version = "0.1.2"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{James Stuart}, %q{Gary Bertchume}]
12
- s.date = %q{2011-09-13}
13
- s.description = %q{Middleware gem for Voyager 7 API calls, specificially holdings information }
14
- s.email = %q{github@jamesstuart.org}
15
- s.extra_rdoc_files = [
16
- "LICENSE.txt",
17
- "README.rdoc"
18
- ]
19
- s.files = [
20
- ".document",
21
- ".rvmrc.07.27.2011-15:02:08",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "Guardfile",
25
- "LICENSE.txt",
26
- "README.rdoc",
27
- "Rakefile",
28
- "VERSION",
29
- "lib/holdings/collection.rb",
30
- "lib/holdings/item.rb",
31
- "lib/holdings/order.rb",
32
- "lib/holdings/record.rb",
33
- "lib/voyager_api.rb",
34
- "lib/voyager_connection.rb",
35
- "test/fixtures/fixtures_readme",
36
- "test/fixtures/holdings_289196.xml",
37
- "test/fixtures/holdings_3708764.xml",
38
- "test/fixtures/holdings_4191079.xml",
39
- "test/fixtures/holdings_4949188.xml",
40
- "test/fixtures/holdings_4949188_2.xml",
41
- "test/fixtures/holdings_526843.xml",
42
- "test/fixtures/holdings_5351573.xml",
43
- "test/fixtures/holdings_5656993.xml",
44
- "test/fixtures/holdings_6269409.xml",
45
- "test/fixtures/holdings_7140519.xml",
46
- "test/fixtures/holdings_7471326.xml",
47
- "test/fixtures/holdings_7658449.xml",
48
- "test/fixtures/holdings_7658454.xml",
49
- "test/fixtures/holdings_7784963.xml",
50
- "test/fixtures/holdings_8189127.xml",
51
- "test/fixtures/holdings_8267323.xml",
52
- "test/fixtures/holdings_8615744.xml",
53
- "test/fixtures/holdings_8661671.xml",
54
- "test/fixtures/holdings_8828760.xml",
55
- "test/fixtures/holdings_8889994.xml",
56
- "test/fixtures/holdings_8891001.xml",
57
- "test/fixtures/holdings_8891001_2.xml",
58
- "test/fixtures/holdings_8918502.xml",
59
- "test/helper.rb",
60
- "test/holdings/test_collection.rb",
61
- "test/holdings/test_collection_output.rb",
62
- "test/holdings/test_holdings_test_case.rb",
63
- "test/holdings/test_item.rb",
64
- "test/holdings/test_order.rb",
65
- "test/holdings/test_record.rb",
66
- "test/test_voyager_api.rb",
67
- "test/test_voyager_connection.rb",
68
- "voyager_api.gemspec"
69
- ]
70
- s.homepage = %q{http://github.com/cul/voyager_api}
71
- s.licenses = [%q{MIT}]
72
- s.require_paths = [%q{lib}]
73
- s.rubygems_version = %q{1.8.6}
74
- s.summary = %q{Columbia University Voyager 7 API wrapper}
75
-
76
- if s.respond_to? :specification_version then
77
- s.specification_version = 3
78
-
79
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
80
- s.add_runtime_dependency(%q<httpclient>, [">= 0"])
81
- s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
82
- s.add_development_dependency(%q<minitest>, [">= 0"])
83
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
84
- s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
85
- s.add_development_dependency(%q<rcov>, [">= 0"])
86
- s.add_development_dependency(%q<guard-minitest>, [">= 0"])
87
- s.add_development_dependency(%q<rb-fsevent>, [">= 0"])
88
- s.add_development_dependency(%q<mocha>, [">= 0"])
89
- s.add_development_dependency(%q<growl>, [">= 0"])
90
- else
91
- s.add_dependency(%q<httpclient>, [">= 0"])
92
- s.add_dependency(%q<nokogiri>, [">= 0"])
93
- s.add_dependency(%q<minitest>, [">= 0"])
94
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
95
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
96
- s.add_dependency(%q<rcov>, [">= 0"])
97
- s.add_dependency(%q<guard-minitest>, [">= 0"])
98
- s.add_dependency(%q<rb-fsevent>, [">= 0"])
99
- s.add_dependency(%q<mocha>, [">= 0"])
100
- s.add_dependency(%q<growl>, [">= 0"])
101
- end
102
- else
103
- s.add_dependency(%q<httpclient>, [">= 0"])
104
- s.add_dependency(%q<nokogiri>, [">= 0"])
105
- s.add_dependency(%q<minitest>, [">= 0"])
106
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
107
- s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
108
- s.add_dependency(%q<rcov>, [">= 0"])
109
- s.add_dependency(%q<guard-minitest>, [">= 0"])
110
- s.add_dependency(%q<rb-fsevent>, [">= 0"])
111
- s.add_dependency(%q<mocha>, [">= 0"])
112
- s.add_dependency(%q<growl>, [">= 0"])
113
- end
114
- end
115
-