gbip 0.8.2 → 0.8.3
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.
- data/CHANGELOG +6 -0
- data/Rakefile +8 -68
- data/examples/gbip.rb +0 -1
- data/lib/gbip.rb +2 -5
- data/lib/gbip/pos.rb +3 -3
- data/lib/gbip/title.rb +1 -1
- data/{specs → spec}/pos_class_spec.rb +23 -23
- data/{specs → spec}/spec_helper.rb +5 -1
- metadata +97 -30
- data/specs/responses/invalid_account.txt +0 -1
- data/specs/responses/invalid_bad_data.txt +0 -1
- data/specs/responses/invalid_login.txt +0 -1
- data/specs/responses/invalid_request.txt +0 -1
- data/specs/responses/invalid_system_unavailable.txt +0 -1
- data/specs/responses/multiple_response.txt +0 -1
- data/specs/responses/no_result.txt +0 -1
- data/specs/responses/no_warehouses.txt +0 -1
- data/specs/responses/single_result.txt +0 -1
- data/specs/responses/single_result2.txt +0 -1
data/CHANGELOG
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
v0.8.3 (19th November 2010)
|
2
|
+
- No functional changes
|
3
|
+
- updated to use bundler to manage the load path during development
|
4
|
+
- switch from depending on the deprecated rbook-isbn gem to the
|
5
|
+
isbn10 and ean13 gems
|
6
|
+
|
1
7
|
v0.8.2 (25th July 2009)
|
2
8
|
- Add GBIP::Title#to_hash()
|
3
9
|
|
data/Rakefile
CHANGED
@@ -1,48 +1,20 @@
|
|
1
|
+
require "rubygems"
|
2
|
+
require "bundler"
|
3
|
+
Bundler.setup
|
4
|
+
|
1
5
|
require 'rake'
|
2
|
-
require 'rake/clean'
|
3
6
|
require 'rake/rdoctask'
|
4
7
|
require 'rake/testtask'
|
5
|
-
require
|
6
|
-
require 'spec/rake/spectask'
|
7
|
-
|
8
|
-
PKG_VERSION = "0.8.2"
|
9
|
-
PKG_NAME = "gbip"
|
10
|
-
PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
|
11
|
-
RUBYFORGE_PROJECT = 'rbook'
|
12
|
-
RUBYFORGE_USER = 'yob'
|
13
|
-
|
14
|
-
CLEAN.include "**/.*.sw*"
|
8
|
+
require 'rspec/core/rake_task'
|
15
9
|
|
16
10
|
desc "Default Task"
|
17
11
|
task :default => [ :spec ]
|
18
12
|
|
19
|
-
desc "Cruise Control Tasks"
|
20
|
-
task :cruise => [ :spec, :spec_report, :doc ]
|
21
|
-
|
22
13
|
# run all rspecs
|
23
14
|
desc "Run all rspec files"
|
24
|
-
|
25
|
-
t.
|
26
|
-
t.
|
27
|
-
t.rcov_dir = (ENV['CC_BUILD_ARTIFACTS'] || 'doc') + "/rcov"
|
28
|
-
t.rcov_opts = ["--exclude","spec.*\.rb"]
|
29
|
-
end
|
30
|
-
|
31
|
-
# generate specdocs
|
32
|
-
desc "Generate Specdocs"
|
33
|
-
Spec::Rake::SpecTask.new("specdocs") do |t|
|
34
|
-
t.spec_files = FileList['specs/**/*.rb']
|
35
|
-
t.spec_opts = ["--format", "rdoc"]
|
36
|
-
t.out = (ENV['CC_BUILD_ARTIFACTS'] || 'doc') + '/specdoc.rd'
|
37
|
-
end
|
38
|
-
|
39
|
-
# generate failing spec report
|
40
|
-
desc "Generate failing spec report"
|
41
|
-
Spec::Rake::SpecTask.new("spec_report") do |t|
|
42
|
-
t.spec_files = FileList['specs/**/*.rb']
|
43
|
-
t.spec_opts = ["--format", "html", "--diff"]
|
44
|
-
t.out = (ENV['CC_BUILD_ARTIFACTS'] || 'doc') + '/spec_report.html'
|
45
|
-
t.fail_on_error = false
|
15
|
+
RSpec::Core::RakeTask.new("spec") do |t|
|
16
|
+
t.rspec_opts = ["--color", "--format progress"]
|
17
|
+
t.ruby_opts = "-w"
|
46
18
|
end
|
47
19
|
|
48
20
|
# Genereate the RDoc documentation
|
@@ -57,35 +29,3 @@ Rake::RDocTask.new("doc") do |rdoc|
|
|
57
29
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
58
30
|
rdoc.options << "--inline-source"
|
59
31
|
end
|
60
|
-
|
61
|
-
spec = Gem::Specification.new do |spec|
|
62
|
-
spec.name = PKG_NAME
|
63
|
-
spec.version = PKG_VERSION
|
64
|
-
spec.platform = Gem::Platform::RUBY
|
65
|
-
spec.summary = "A library for access the globalbooksinprint.com API"
|
66
|
-
spec.files = Dir.glob("{examples,lib,specs}/**/**/*") +
|
67
|
-
["Rakefile", "CHANGELOG"]
|
68
|
-
|
69
|
-
spec.require_path = "lib"
|
70
|
-
spec.test_files = Dir[ "specs/**/*.rb" ]
|
71
|
-
spec.has_rdoc = true
|
72
|
-
spec.extra_rdoc_files = %w{README COPYING LICENSE CHANGELOG}
|
73
|
-
spec.rdoc_options << '--title' << 'gbip Documentation' <<
|
74
|
-
'--main' << 'README' << '-q'
|
75
|
-
spec.add_dependency('rbook-isbn', '>= 1.0')
|
76
|
-
spec.author = "James Healy"
|
77
|
-
spec.email = "jimmy@deefa.com"
|
78
|
-
spec.rubyforge_project = "rbook"
|
79
|
-
spec.homepage = "http://rbook.rubyforge.org/"
|
80
|
-
spec.description = <<END_DESC
|
81
|
-
gbip is a small library to interact with the
|
82
|
-
globalbooksinprint.com API. The API is based
|
83
|
-
on raw TCP sockets.
|
84
|
-
END_DESC
|
85
|
-
end
|
86
|
-
|
87
|
-
desc "Generate a gem for rbook"
|
88
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
89
|
-
pkg.need_tar = true
|
90
|
-
end
|
91
|
-
|
data/examples/gbip.rb
CHANGED
data/lib/gbip.rb
CHANGED
@@ -1,14 +1,11 @@
|
|
1
|
-
|
1
|
+
require 'isbn10'
|
2
|
+
require 'ean13'
|
2
3
|
|
3
4
|
# load the files that form this library
|
4
5
|
require 'gbip/pos'
|
5
6
|
require 'gbip/title'
|
6
7
|
require 'gbip/warehouse'
|
7
8
|
|
8
|
-
# load rubygems
|
9
|
-
require 'rubygems'
|
10
|
-
require 'rbook/isbn'
|
11
|
-
|
12
9
|
# Ruby classes for searching the globalbooksinprint.com API. This is a
|
13
10
|
# commercial service and requires a registered account to access. More
|
14
11
|
# information on the service can be found at the website.
|
data/lib/gbip/pos.rb
CHANGED
@@ -5,7 +5,7 @@ require 'timeout'
|
|
5
5
|
module GBIP
|
6
6
|
|
7
7
|
# Provides easy access to the globalbooksinprint.com search API.
|
8
|
-
#
|
8
|
+
# docs for GBIP has basic usage examples.
|
9
9
|
class POS
|
10
10
|
|
11
11
|
# don't think we really need these
|
@@ -36,8 +36,8 @@ module GBIP
|
|
36
36
|
|
37
37
|
options = {:timeout => 10}.merge(options)
|
38
38
|
|
39
|
-
isbn =
|
40
|
-
return default_return unless
|
39
|
+
isbn = ISBN10.new(isbn.to_s).to_ean || isbn.to_s
|
40
|
+
return default_return unless EAN13.valid?(isbn)
|
41
41
|
|
42
42
|
request_format = "POS"
|
43
43
|
account_type = "3"
|
data/lib/gbip/title.rb
CHANGED
@@ -20,7 +20,7 @@ module GBIP
|
|
20
20
|
|
21
21
|
self.market = arr[2].strip
|
22
22
|
self.title = arr[3].strip
|
23
|
-
self.isbn =
|
23
|
+
self.isbn = ISBN10.new(arr[4].strip).to_ean || arr[4].strip
|
24
24
|
self.binding = arr[5].strip
|
25
25
|
self.status = arr[6].strip
|
26
26
|
self.edition = arr[7].strip
|
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../lib')
|
|
3
3
|
require 'gbip'
|
4
4
|
require File.dirname(__FILE__) + "/spec_helper"
|
5
5
|
|
6
|
-
|
6
|
+
describe "A new POS object" do
|
7
7
|
|
8
8
|
before(:all) do
|
9
9
|
@username = "user"
|
@@ -16,7 +16,7 @@ context "A new POS object" do
|
|
16
16
|
# :first searches
|
17
17
|
#####################
|
18
18
|
|
19
|
-
|
19
|
+
it "should raise an exception when an invalid request is made" do
|
20
20
|
# Mock TCPSocket to return an invalid request error code
|
21
21
|
data = File.read(File.dirname(__FILE__) + "/responses/invalid_account.txt").strip
|
22
22
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -26,7 +26,7 @@ context "A new POS object" do
|
|
26
26
|
lambda { pos.find(:first, @isbn10) }.should raise_error(GBIP::InvalidRequestError)
|
27
27
|
end
|
28
28
|
|
29
|
-
|
29
|
+
it "should raise an exception when an invalid username or password is supplied" do
|
30
30
|
# Mock TCPSocket to return an invalid login error code
|
31
31
|
data = File.read(File.dirname(__FILE__) + "/responses/invalid_login.txt").strip
|
32
32
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -36,7 +36,7 @@ context "A new POS object" do
|
|
36
36
|
lambda { pos.find(:first, @isbn10) }.should raise_error(GBIP::InvalidLoginError)
|
37
37
|
end
|
38
38
|
|
39
|
-
|
39
|
+
it "should raise an exception when an bad data is requested" do
|
40
40
|
# Mock TCPSocket to return a bad data error code
|
41
41
|
data = File.read(File.dirname(__FILE__) + "/responses/invalid_bad_data.txt").strip
|
42
42
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -46,7 +46,7 @@ context "A new POS object" do
|
|
46
46
|
lambda { pos.find(:first, @isbn10) }.should raise_error(GBIP::InvalidRequestError)
|
47
47
|
end
|
48
48
|
|
49
|
-
|
49
|
+
it "should raise an exception when an invalid request version is used" do
|
50
50
|
# Mock TCPSocket to return an invalid request version error code
|
51
51
|
data = File.read(File.dirname(__FILE__) + "/responses/invalid_request.txt").strip
|
52
52
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -56,7 +56,7 @@ context "A new POS object" do
|
|
56
56
|
lambda { pos.find(:first, @isbn10) }.should raise_error(GBIP::InvalidRequestError)
|
57
57
|
end
|
58
58
|
|
59
|
-
|
59
|
+
it "should raise an exception when a the GBIP API system is unavailable" do
|
60
60
|
# Mock TCPSocket to return a system unavailable error code
|
61
61
|
data = File.read(File.dirname(__FILE__) + "/responses/invalid_system_unavailable.txt").strip
|
62
62
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -66,7 +66,7 @@ context "A new POS object" do
|
|
66
66
|
lambda { pos.find(:first, @isbn10) }.should raise_error(GBIP::SystemUnavailableError)
|
67
67
|
end
|
68
68
|
|
69
|
-
|
69
|
+
it "should return a GBIP::Title object when queried for a single valid ISBN10" do
|
70
70
|
# Mock TCPSocket to return a single matching title
|
71
71
|
data = File.read(File.dirname(__FILE__) + "/responses/single_result.txt").strip
|
72
72
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -82,7 +82,7 @@ context "A new POS object" do
|
|
82
82
|
socket.should have_received(:print)
|
83
83
|
end
|
84
84
|
|
85
|
-
|
85
|
+
it "should return a GBIP::Title object when queried for a single valid ISBN13" do
|
86
86
|
# Mock TCPSocket to return a single matching title
|
87
87
|
data = File.read(File.dirname(__FILE__) + "/responses/single_result.txt").strip
|
88
88
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -96,7 +96,7 @@ context "A new POS object" do
|
|
96
96
|
socket.should have_received(:print)
|
97
97
|
end
|
98
98
|
|
99
|
-
|
99
|
+
it "should return a GBIP::Title object when the response contains an extra #" do
|
100
100
|
# Mock TCPSocket to return a single matching title that uses a # for its currency
|
101
101
|
# sign, as well as a record seperator
|
102
102
|
data = File.read(File.dirname(__FILE__) + "/responses/single_result2.txt").strip
|
@@ -109,7 +109,7 @@ context "A new POS object" do
|
|
109
109
|
result.title.should eql("Pro EDI in BizTalk Server 2006 R2:Electronic Document Interchange Solutions")
|
110
110
|
end
|
111
111
|
|
112
|
-
|
112
|
+
it "should return a GBIP::Title object when querying for a single valid ISBN10 that has no warehouse data" do
|
113
113
|
# Mock TCPSocket to return a single matching title that lists no warehouses
|
114
114
|
data = File.read(File.dirname(__FILE__) + "/responses/no_warehouses.txt").strip
|
115
115
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -121,7 +121,7 @@ context "A new POS object" do
|
|
121
121
|
result.warehouses.should be_empty
|
122
122
|
end
|
123
123
|
|
124
|
-
|
124
|
+
it "should return nil when a single ISBN10 not recognised by GBIP is requested" do
|
125
125
|
# Mock TCPSocket to return a valid response with no matching titles
|
126
126
|
data = File.read(File.dirname(__FILE__) + "/responses/no_result.txt").strip
|
127
127
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -132,7 +132,7 @@ context "A new POS object" do
|
|
132
132
|
result.should eql(nil)
|
133
133
|
end
|
134
134
|
|
135
|
-
|
135
|
+
it "should return nil when a single ISBN13 not recognised by GBIP is requested" do
|
136
136
|
# Mock TCPSocket to return a valid response with no matching titles
|
137
137
|
data = File.read(File.dirname(__FILE__) + "/responses/no_result.txt").strip
|
138
138
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -143,7 +143,7 @@ context "A new POS object" do
|
|
143
143
|
result.should eql(nil)
|
144
144
|
end
|
145
145
|
|
146
|
-
|
146
|
+
it "should return nil when any object is supplied as an ISBN when searching for :first" do
|
147
147
|
pos = GBIP::POS.new(@username, @password)
|
148
148
|
result = pos.find(:first, nil)
|
149
149
|
result.should eql(nil)
|
@@ -155,7 +155,7 @@ context "A new POS object" do
|
|
155
155
|
result.should eql(nil)
|
156
156
|
end
|
157
157
|
|
158
|
-
|
158
|
+
it "should perform a successful query if the ISBN is provided as a number" do
|
159
159
|
# Mock TCPSocket to return a valid response with no matching titles
|
160
160
|
data = File.read(File.dirname(__FILE__) + "/responses/single_result.txt").strip
|
161
161
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -166,7 +166,7 @@ context "A new POS object" do
|
|
166
166
|
result.should be_a_kind_of(GBIP::Title)
|
167
167
|
end
|
168
168
|
|
169
|
-
|
169
|
+
it "should raise an exception if no reponse is received in a certain amount of time" do
|
170
170
|
# Mock TCPSocket to take 5 seconds to generate a response
|
171
171
|
socket = TCPSocket.stub_instance(:print => true, :close => true)
|
172
172
|
socket.stub_method(:gets) do
|
@@ -181,7 +181,7 @@ context "A new POS object" do
|
|
181
181
|
#####################
|
182
182
|
# :all searches
|
183
183
|
#####################
|
184
|
-
|
184
|
+
it "should return a non-empty Array when queried for a single valid ISBN10" do
|
185
185
|
# Mock TCPSocket to return a valid response with a single result
|
186
186
|
data = File.read(File.dirname(__FILE__) + "/responses/single_result.txt").strip
|
187
187
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -193,7 +193,7 @@ context "A new POS object" do
|
|
193
193
|
result.should_not be_empty
|
194
194
|
end
|
195
195
|
|
196
|
-
|
196
|
+
it "should return a non-empty Array when queried for a single valid ISBN13" do
|
197
197
|
# Mock TCPSocket to return a valid response with a single result
|
198
198
|
data = File.read(File.dirname(__FILE__) + "/responses/single_result.txt").strip
|
199
199
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -205,7 +205,7 @@ context "A new POS object" do
|
|
205
205
|
result.should_not be_empty
|
206
206
|
end
|
207
207
|
|
208
|
-
|
208
|
+
it "should return an empty Array when a single ISBN10 not recognised by GBIP is requested" do
|
209
209
|
# Mock TCPSocket to return a valid response with no matches
|
210
210
|
data = File.read(File.dirname(__FILE__) + "/responses/no_result.txt").strip
|
211
211
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -217,7 +217,7 @@ context "A new POS object" do
|
|
217
217
|
result.should be_empty
|
218
218
|
end
|
219
219
|
|
220
|
-
|
220
|
+
it "should return an empty Array when a single ISBN13 not recognised by GBIP is requested" do
|
221
221
|
# Mock TCPSocket to return a valid response with no matches
|
222
222
|
data = File.read(File.dirname(__FILE__) + "/responses/no_result.txt").strip
|
223
223
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -229,7 +229,7 @@ context "A new POS object" do
|
|
229
229
|
result.should be_empty
|
230
230
|
end
|
231
231
|
|
232
|
-
|
232
|
+
it "should return an Array with multiple items when a query returns multiple matches" do
|
233
233
|
# Mock TCPSocket to return a valid response with no matches
|
234
234
|
data = File.read(File.dirname(__FILE__) + "/responses/multiple_response.txt").strip
|
235
235
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -241,7 +241,7 @@ context "A new POS object" do
|
|
241
241
|
result.size.should eql(3)
|
242
242
|
end
|
243
243
|
|
244
|
-
|
244
|
+
it "should return an empty array when any object is supplied as an ISBN when searching for :all" do
|
245
245
|
pos = GBIP::POS.new(@username, @password)
|
246
246
|
result = pos.find(:all, nil)
|
247
247
|
result.should be_a_kind_of(Array)
|
@@ -256,7 +256,7 @@ context "A new POS object" do
|
|
256
256
|
result.should be_empty
|
257
257
|
end
|
258
258
|
|
259
|
-
|
259
|
+
it "should perform a successful query if the ISBN is provided as a number to an :all search" do
|
260
260
|
# Mock TCPSocket to return a valid response with a single result
|
261
261
|
data = File.read(File.dirname(__FILE__) + "/responses/single_result.txt").strip
|
262
262
|
socket = TCPSocket.stub_instance(:print => true, :close => true, :gets => data)
|
@@ -271,7 +271,7 @@ context "A new POS object" do
|
|
271
271
|
#####################
|
272
272
|
# invalid searches
|
273
273
|
#####################
|
274
|
-
|
274
|
+
it "should raise an exception when an invalid search type is supplied" do
|
275
275
|
pos = GBIP::POS.new(@username, @password)
|
276
276
|
lambda { pos.find(nil, @isbn10) }.should raise_error(ArgumentError)
|
277
277
|
lambda { pos.find(:last, @isbn10) }.should raise_error(ArgumentError)
|
metadata
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gbip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 57
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 8
|
9
|
+
- 3
|
10
|
+
version: 0.8.3
|
5
11
|
platform: ruby
|
6
12
|
authors:
|
7
13
|
- James Healy
|
@@ -9,20 +15,85 @@ autorequire:
|
|
9
15
|
bindir: bin
|
10
16
|
cert_chain: []
|
11
17
|
|
12
|
-
date:
|
18
|
+
date: 2010-11-19 00:00:00 -05:00
|
13
19
|
default_executable:
|
14
20
|
dependencies:
|
15
21
|
- !ruby/object:Gem::Dependency
|
16
|
-
name:
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
name: rake
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
20
26
|
requirements:
|
21
27
|
- - ">="
|
22
28
|
- !ruby/object:Gem::Version
|
23
|
-
|
24
|
-
|
25
|
-
|
29
|
+
hash: 3
|
30
|
+
segments:
|
31
|
+
- 0
|
32
|
+
version: "0"
|
33
|
+
type: :development
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: rspec
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ~>
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 1
|
44
|
+
segments:
|
45
|
+
- 2
|
46
|
+
- 1
|
47
|
+
version: "2.1"
|
48
|
+
type: :development
|
49
|
+
version_requirements: *id002
|
50
|
+
- !ruby/object:Gem::Dependency
|
51
|
+
name: not_a_mock
|
52
|
+
prerelease: false
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
54
|
+
none: false
|
55
|
+
requirements:
|
56
|
+
- - ~>
|
57
|
+
- !ruby/object:Gem::Version
|
58
|
+
hash: 21
|
59
|
+
segments:
|
60
|
+
- 1
|
61
|
+
- 0
|
62
|
+
- 1
|
63
|
+
version: 1.0.1
|
64
|
+
type: :development
|
65
|
+
version_requirements: *id003
|
66
|
+
- !ruby/object:Gem::Dependency
|
67
|
+
name: isbn10
|
68
|
+
prerelease: false
|
69
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
+
none: false
|
71
|
+
requirements:
|
72
|
+
- - ~>
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
hash: 11
|
75
|
+
segments:
|
76
|
+
- 1
|
77
|
+
- 2
|
78
|
+
version: "1.2"
|
79
|
+
type: :runtime
|
80
|
+
version_requirements: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
name: ean13
|
83
|
+
prerelease: false
|
84
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
85
|
+
none: false
|
86
|
+
requirements:
|
87
|
+
- - ~>
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
hash: 7
|
90
|
+
segments:
|
91
|
+
- 1
|
92
|
+
- 4
|
93
|
+
version: "1.4"
|
94
|
+
type: :runtime
|
95
|
+
version_requirements: *id005
|
96
|
+
description: " gbip is a small library to interact with the\n globalbooksinprint.com API. The API is based\n on raw TCP sockets, none of this fancy HTTP stuff.\n"
|
26
97
|
email: jimmy@deefa.com
|
27
98
|
executables: []
|
28
99
|
|
@@ -35,29 +106,19 @@ extra_rdoc_files:
|
|
35
106
|
- CHANGELOG
|
36
107
|
files:
|
37
108
|
- examples/gbip.rb
|
38
|
-
- lib/gbip.rb
|
39
|
-
- lib/gbip/pos.rb
|
40
109
|
- lib/gbip/title.rb
|
110
|
+
- lib/gbip/pos.rb
|
41
111
|
- lib/gbip/warehouse.rb
|
42
|
-
-
|
43
|
-
- specs/responses/invalid_login.txt
|
44
|
-
- specs/responses/no_result.txt
|
45
|
-
- specs/responses/no_warehouses.txt
|
46
|
-
- specs/responses/single_result.txt
|
47
|
-
- specs/responses/single_result2.txt
|
48
|
-
- specs/responses/invalid_account.txt
|
49
|
-
- specs/responses/invalid_bad_data.txt
|
50
|
-
- specs/responses/invalid_request.txt
|
51
|
-
- specs/responses/invalid_system_unavailable.txt
|
52
|
-
- specs/responses/multiple_response.txt
|
53
|
-
- specs/spec_helper.rb
|
112
|
+
- lib/gbip.rb
|
54
113
|
- Rakefile
|
55
114
|
- CHANGELOG
|
56
115
|
- README
|
57
116
|
- COPYING
|
58
117
|
- LICENSE
|
118
|
+
- spec/spec_helper.rb
|
119
|
+
- spec/pos_class_spec.rb
|
59
120
|
has_rdoc: true
|
60
|
-
homepage:
|
121
|
+
homepage: https://github.com/yob/gbip/
|
61
122
|
licenses: []
|
62
123
|
|
63
124
|
post_install_message:
|
@@ -70,24 +131,30 @@ rdoc_options:
|
|
70
131
|
require_paths:
|
71
132
|
- lib
|
72
133
|
required_ruby_version: !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
73
135
|
requirements:
|
74
136
|
- - ">="
|
75
137
|
- !ruby/object:Gem::Version
|
138
|
+
hash: 3
|
139
|
+
segments:
|
140
|
+
- 0
|
76
141
|
version: "0"
|
77
|
-
version:
|
78
142
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
143
|
+
none: false
|
79
144
|
requirements:
|
80
145
|
- - ">="
|
81
146
|
- !ruby/object:Gem::Version
|
147
|
+
hash: 3
|
148
|
+
segments:
|
149
|
+
- 0
|
82
150
|
version: "0"
|
83
|
-
version:
|
84
151
|
requirements: []
|
85
152
|
|
86
|
-
rubyforge_project:
|
87
|
-
rubygems_version: 1.3.
|
153
|
+
rubyforge_project:
|
154
|
+
rubygems_version: 1.3.7
|
88
155
|
signing_key:
|
89
156
|
specification_version: 3
|
90
157
|
summary: A library for access the globalbooksinprint.com API
|
91
158
|
test_files:
|
92
|
-
-
|
93
|
-
-
|
159
|
+
- spec/spec_helper.rb
|
160
|
+
- spec/pos_class_spec.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
5
|
@@ -1 +0,0 @@
|
|
1
|
-
7
|
@@ -1 +0,0 @@
|
|
1
|
-
66
|
@@ -1 +0,0 @@
|
|
1
|
-
8
|
@@ -1 +0,0 @@
|
|
1
|
-
9
|
@@ -1 +0,0 @@
|
|
1
|
-
3 rainbowbook 3 # 57073276 1 AUS Hallucinogens and Your Neurons:The Incredibly Disgusting Story 978-0-8239-3391-4 Library Binding Active Record Cefrey, Holly Rosen Publishing Group, Incorporated, The 032000 29.95 UNITED STATES 22896 $ DRUG ABUSE_JUVENILE LITERATURE JUVENILE NONFICTION / Health & Daily Living / Substance Abuse PERSONAL & SOCIAL ISSUES: DRUGS & ADDICTION (CHILDREN'S/YA) ING 1 Ingram Book Company, La Vergne, TN Available for order 0 06/10/2009# 51552044 1 USA Hallucinogens and Your Neurons:The Incredibly Disgusting Story 978-0-8239-3391-4 Library Binding Active Record Cefrey, Holly Rosen Publishing Group, Incorporated, The 012005 25.25 UNITED STATES 22896 $ DRUG ABUSE_JUVENILE LITERATURE JUVENILE NONFICTION / Health & Daily Living / Substance Abuse DRUG ABUSE PERSONAL & SOCIAL ISSUES: DRUGS & ADDICTION (CHILDREN'S/YA) ING 1 Ingram Book Company, La Vergne, TN Available for order 0 06/10/2009# 53231792 1 CAN Hallucinogens and Your Neurons:The Incredibly Disgusting Story 978-0-8239-3391-4 Library Binding Active Record Cefrey, Holly Rosen Publishing Group, Incorporated, The 2000 28.45 UNITED STATES 22896 $ DRUG ABUSE_JUVENILE LITERATURE JUVENILE NONFICTION / Health & Daily Living / Substance Abuse PERSONAL & SOCIAL ISSUES: DRUGS & ADDICTION (CHILDREN'S/YA) ING 1 Ingram Book Company, La Vergne, TN Available for order 0 06/10/2009
|
@@ -1 +0,0 @@
|
|
1
|
-
3 rainbowbook 0 # 3
|
@@ -1 +0,0 @@
|
|
1
|
-
3 rainbowbook 3 # 64970973 1 AUS Roar of the Lion 978-0-7322-8272-1 UK-Trade Paper Out of Print Coates, Frank HarperCollins Publishers Australia 042007 32.99 AUSTRALIA 402956 $ FICTION FICTION / General FICTION & RELATED ITEMS 0
|
@@ -1 +0,0 @@
|
|
1
|
-
3 rainbowbook 3 # 63006879 1 USA Affluenza:When Too Much Is Never Enough 978-1-74114-671-4 Perfect Active Record Hamilton, Clive Allen & Unwin 042006 14.95 AUSTRALIA 33545 $ CONSUMER STUDIES SOCIAL SCIENCE / General SOCIETY & SOCIAL SCIENCES BDT,BNT,GRD,ING 7 Brodart Company, Williamsport, PA Available for order 0 09/25/2008 Baker & Taylor Books, Bridgewater, NJ 1 10/01/2008 Baker & Taylor Books, Commerce, GA 0 10/01/2008 Baker & Taylor Books, Momence, IL 2 6 10/01/2008 Baker & Taylor Books, Reno, NV 6 10/01/2008 Gardners Books Limited, E. Sussex Available for order 0 10/01/2008 Ingram Book Company, La Vergne, TN Available for order 0 10/01/2008
|
@@ -1 +0,0 @@
|
|
1
|
-
3 rainbowbook 2 # 66797534 1 GBR Pro EDI in BizTalk Server 2006 R2:Electronic Document Interchange Solutions 978-1-59059-935-8 Trade Paper Active Record Deshev, Hristo Apress L. P. 112007 33.99 UNITED STATES 152887 # DATA TRANSMISSION SYSTEMS COMPUTERS / Data Transmission Systems / General COMPUTER NETWORKING & COMMUNICATIONS BLK,BNT,CLD,ING,POL 8 Blackwell, Lake Oswego, OR In stock 0 10/07/2008 Baker & Taylor Books, Bridgewater, NJ 0 10/12/2008 Baker & Taylor Books, Commerce, GA 5 0 10/12/2008 Baker & Taylor Books, Momence, IL 2 4 10/12/2008 Baker & Taylor Books, Reno, NV 0 10/12/2008 Cromland, Allentown, PA Available for order 0 10/10/2008 Ingram Book Company, La Vergne, TN Available for order 0 10/12/2008 Powells.com, Portland, OR In stock 0 02/01/2008
|