zoom 0.4.1 → 0.5.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.
- checksums.yaml +7 -0
- data/{README → README.md} +23 -15
- data/Rakefile +14 -32
- data/{src → ext}/extconf.rb +2 -2
- data/{src → ext}/rbzoom.c +0 -0
- data/{src → ext}/rbzoom.h +1 -1
- data/{src → ext}/rbzoomconnection.c +1 -1
- data/{src → ext}/rbzoomoptions.c +7 -7
- data/{src → ext}/rbzoompackage.c +0 -0
- data/{src → ext}/rbzoomquery.c +0 -0
- data/{src → ext}/rbzoomrecord.c +0 -0
- data/{src → ext}/rbzoomresultset.c +0 -0
- data/sample/needle.rb +0 -0
- data/test/package_test.rb +1 -1
- metadata +67 -72
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5cc917df48a740c61b506944639422020d440f74
|
4
|
+
data.tar.gz: c37090cea4cea9d83bfb2c89df1cf3c222aea696
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e51a635b8f76439a6815f241ab12429f41199e8e5eaff86c8a2337d60422576919e62d67862aedd5f04004bb9fdbd8f2f1f671c274ede2cd0ecb4e1fb08a0d7d
|
7
|
+
data.tar.gz: 77ce043e0001f2621f0b95501697210e6300ecf36050dc22cd0d15da865bcdd462609a9a09b8b93cb266188af2e3d0724d110e3946b508d3c1e2dd83533633f8
|
data/{README → README.md}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
Ruby/ZOOM
|
2
2
|
=========
|
3
3
|
|
4
4
|
Ruby/ZOOM provides a Ruby binding to the Z39.50 Object-Orientation Model
|
@@ -13,7 +13,8 @@ any ZOOM compliant implementation.
|
|
13
13
|
Ruby/ZOOM is free-software, covered by the GNU Lesser General Public License
|
14
14
|
and provided without any warranties of any kind.
|
15
15
|
|
16
|
-
|
16
|
+
Requirements
|
17
|
+
------------
|
17
18
|
|
18
19
|
Ruby: http://www.ruby-lang.org/
|
19
20
|
YAZ (*): http://www.indexdata.dk/yaz/
|
@@ -22,24 +23,28 @@ and provided without any warranties of any kind.
|
|
22
23
|
script before building YAZ. Ruby/ZOOM requires a YAZ shared library
|
23
24
|
and YAZ does not build it by default.
|
24
25
|
|
25
|
-
|
26
|
+
Build from Source
|
27
|
+
-------
|
26
28
|
|
27
|
-
0.
|
28
|
-
1. install YAZ
|
29
|
-
2. gem install ruby-zoom
|
30
|
-
|
31
|
-
== Build from Source
|
32
|
-
|
33
|
-
0. checkout out code from svn at rubyforge
|
29
|
+
0. checkout out code from git at github
|
34
30
|
1. install Rake
|
35
31
|
2. rake
|
36
32
|
3. gem install pkg/zoom-*.gem
|
37
33
|
|
38
|
-
|
34
|
+
Build from Source using bundler
|
35
|
+
-----------------
|
36
|
+
|
37
|
+
0. add to your Gemfile:
|
38
|
+
gem 'zoom', :git => 'https://github.com/bricestacey/ruby-zoom.git'
|
39
|
+
1. bundle
|
40
|
+
|
41
|
+
Samples
|
42
|
+
-------
|
39
43
|
|
40
44
|
Some programming examples are available in the `sample' directory.
|
41
45
|
|
42
|
-
|
46
|
+
Canonical Sample Program
|
47
|
+
------------------------
|
43
48
|
|
44
49
|
To give a flavour of the Ruby binding, here is ZOOM's equivalent of the
|
45
50
|
``Hello World'' program: a tiny Z39.50 client that fetches and displays
|
@@ -56,7 +61,8 @@ and provided without any warranties of any kind.
|
|
56
61
|
p rset[0]
|
57
62
|
end
|
58
63
|
|
59
|
-
|
64
|
+
ZOOM Extended Services
|
65
|
+
----------------------
|
60
66
|
|
61
67
|
With release 0.4.1 extended services support has been added which allows
|
62
68
|
create, update and delete of records. This only works for XML.
|
@@ -76,7 +82,8 @@ and provided without any warranties of any kind.
|
|
76
82
|
end
|
77
83
|
|
78
84
|
|
79
|
-
|
85
|
+
Copying
|
86
|
+
-------
|
80
87
|
|
81
88
|
Copyright (c) 2005 Laurent Sansonetti <lrz@chopine.be>
|
82
89
|
|
@@ -84,6 +91,7 @@ and provided without any warranties of any kind.
|
|
84
91
|
You can distribute/modify this program under the terms of
|
85
92
|
the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
|
86
93
|
|
87
|
-
|
94
|
+
Project Website
|
95
|
+
---------------
|
88
96
|
|
89
97
|
http://ruby-zoom.rubyforge.org
|
data/Rakefile
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
RUBY_ZOOM_VERSION = '0.4.1'
|
2
1
|
|
3
2
|
require 'rubygems'
|
4
3
|
require 'rake'
|
5
4
|
require 'rake/clean'
|
6
5
|
require 'rake/testtask'
|
7
|
-
require '
|
6
|
+
require 'rdoc/task'
|
8
7
|
require 'rake/packagetask'
|
9
|
-
require '
|
8
|
+
require 'rubygems/package_task'
|
9
|
+
require 'rubygems'
|
10
10
|
require 'mkmf'
|
11
11
|
|
12
12
|
CLEAN.include '**/*.o'
|
@@ -19,47 +19,29 @@ task :default => [:build, :test, :package] do |t|
|
|
19
19
|
end
|
20
20
|
|
21
21
|
task :build => [:clean] do |t|
|
22
|
-
Dir.chdir('
|
22
|
+
Dir.chdir('ext') do
|
23
23
|
system('ruby', 'extconf.rb')
|
24
24
|
system('make')
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
+
task :package do
|
29
|
+
system('gem build zoom.gemspec')
|
30
|
+
end
|
31
|
+
|
28
32
|
Rake::TestTask.new('test') do |t|
|
29
|
-
t.
|
33
|
+
t.test_files = FileList['test/*_test.rb']
|
34
|
+
t.ruby_opts = ['-r test/unit', '-I ext', '-r zoom']
|
30
35
|
t.verbose = true
|
31
|
-
t.ruby_opts = ['-r test/unit', '-I src', '-r zoom']
|
32
36
|
end
|
33
37
|
|
34
38
|
Rake::TestTask.new('live_test') do |t|
|
35
|
-
t.
|
39
|
+
t.test_files = FileList['test/*_live.rb']
|
40
|
+
t.ruby_opts = ['-r test/unit', '-I ext', '-r zoom']
|
36
41
|
t.verbose = true
|
37
|
-
t.ruby_opts = ['-r test/unit', '-I src', '-r zoom']
|
38
|
-
end
|
39
|
-
|
40
|
-
spec = Gem::Specification.new do |s|
|
41
|
-
s.name = 'zoom'
|
42
|
-
s.version = RUBY_ZOOM_VERSION
|
43
|
-
s.homepage = 'http://ruby-zoom.rubyforge.org'
|
44
|
-
s.platform = Gem::Platform::RUBY
|
45
|
-
s.summary = 'Ruby/ZOOM provides a Ruby binding to the Z40.50 Object-Orientation Model (ZOOM), an abstract object-oriented programming interface to a subset of the services specified by the Z39.50 standard, also known as the international standard ISO 23950. This version introduces ZOOM Extended Services.'
|
46
|
-
s.autorequire = 'zoom'
|
47
|
-
s.files =
|
48
|
-
Dir.glob('src/*.c') +
|
49
|
-
Dir.glob('src/*.h') +
|
50
|
-
Dir.glob('src/*.rb') +
|
51
|
-
Dir.glob('test/**/*') +
|
52
|
-
Dir.glob('sample/**/*') +
|
53
|
-
['README', 'ChangeLog', 'Rakefile']
|
54
|
-
s.extensions = 'src/extconf.rb'
|
55
|
-
end
|
56
|
-
|
57
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
58
|
-
pkg.need_zip = true
|
59
|
-
pkg.need_tar = true
|
60
42
|
end
|
61
43
|
|
62
44
|
Rake::RDocTask.new do |rd|
|
63
|
-
rd.main = "README"
|
64
|
-
rd.rdoc_files.include("README", "
|
45
|
+
rd.main = "README.md"
|
46
|
+
rd.rdoc_files.include("README.md", "ext/*.c")
|
65
47
|
end
|
data/{src → ext}/extconf.rb
RENAMED
@@ -2,12 +2,12 @@ require 'mkmf'
|
|
2
2
|
|
3
3
|
unless system('yaz-config')
|
4
4
|
$stderr.puts 'yaz does not appear to be installed'
|
5
|
-
|
5
|
+
exit
|
6
6
|
end
|
7
7
|
|
8
8
|
unless have_header('yaz/zoom.h')
|
9
9
|
$stderr.puts 'yaz zoom header not available'
|
10
|
-
|
10
|
+
exit
|
11
11
|
end
|
12
12
|
|
13
13
|
$CFLAGS << " #{`yaz-config --cflags`} "
|
data/{src → ext}/rbzoom.c
RENAMED
File without changes
|
data/{src → ext}/rbzoom.h
RENAMED
@@ -53,7 +53,7 @@ void rbz_connection_check(VALUE obj);
|
|
53
53
|
|
54
54
|
/* useful macros */
|
55
55
|
#if !defined (RVAL2CSTR)
|
56
|
-
# define RVAL2CSTR(x) (NIL_P (x) ? NULL :
|
56
|
+
# define RVAL2CSTR(x) (NIL_P (x) ? NULL : RSTRING_PTR(x))
|
57
57
|
#endif
|
58
58
|
#if !defined (CSTR2RVAL)
|
59
59
|
# define CSTR2RVAL(x) (x == NULL ? Qnil : rb_str_new2(x))
|
data/{src → ext}/rbzoomoptions.c
RENAMED
@@ -32,10 +32,10 @@ ruby_hash_to_zoom_options (VALUE hash)
|
|
32
32
|
options = ZOOM_options_create ();
|
33
33
|
|
34
34
|
ary = rb_funcall (hash, rb_intern ("to_a"), 0);
|
35
|
-
for (i = 0; i <
|
36
|
-
pair =
|
37
|
-
key =
|
38
|
-
value =
|
35
|
+
for (i = 0; i < RARRAY_LEN(ary); i++) {
|
36
|
+
pair = RARRAY_PTR(ary)[i];
|
37
|
+
key = RARRAY_PTR(pair)[0];
|
38
|
+
value = RARRAY_PTR(pair)[1];
|
39
39
|
|
40
40
|
switch (TYPE (value)) {
|
41
41
|
case T_TRUE:
|
@@ -68,7 +68,7 @@ ruby_hash_to_zoom_options (VALUE hash)
|
|
68
68
|
VALUE
|
69
69
|
zoom_option_value_to_ruby_value (const char *value)
|
70
70
|
{
|
71
|
-
int i;
|
71
|
+
unsigned int i;
|
72
72
|
|
73
73
|
if (value == NULL)
|
74
74
|
return Qnil;
|
@@ -86,8 +86,8 @@ define_zoom_option (VALUE klass, const char *option)
|
|
86
86
|
char code [1024];
|
87
87
|
char rubyname [128];
|
88
88
|
char c;
|
89
|
-
int i;
|
90
|
-
int j;
|
89
|
+
unsigned int i;
|
90
|
+
unsigned int j;
|
91
91
|
|
92
92
|
/* rubyfy the option name */
|
93
93
|
for (i = 0, j = 0; i < strlen (option) && j < sizeof rubyname; i++, j++) {
|
data/{src → ext}/rbzoompackage.c
RENAMED
File without changes
|
data/{src → ext}/rbzoomquery.c
RENAMED
File without changes
|
data/{src → ext}/rbzoomrecord.c
RENAMED
File without changes
|
File without changes
|
data/sample/needle.rb
CHANGED
File without changes
|
data/test/package_test.rb
CHANGED
@@ -31,7 +31,7 @@ class TestPackage < Test::Unit::TestCase
|
|
31
31
|
#option correlationInfo.note
|
32
32
|
p = @connection.package
|
33
33
|
assert(p.respond_to?('correlation_info_note'))
|
34
|
-
assert(
|
34
|
+
assert(p.respond_to?('correlation_info_note='))
|
35
35
|
assert_equal(true, p.respond_to?('set_correlation_info_note'))
|
36
36
|
|
37
37
|
p.correlation_info_note = 'correlation_info_note value'
|
metadata
CHANGED
@@ -1,88 +1,83 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.9.4
|
3
|
-
specification_version: 1
|
1
|
+
--- !ruby/object:Gem::Specification
|
4
2
|
name: zoom
|
5
|
-
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
-
|
11
|
-
email:
|
12
|
-
homepage: http://ruby-zoom.rubyforge.org
|
13
|
-
rubyforge_project:
|
14
|
-
description:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Laurent Sansonetti
|
8
|
+
- Ed Summers
|
15
9
|
autorequire: zoom
|
16
|
-
default_executable:
|
17
10
|
bindir: bin
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
-
|
33
|
-
-
|
34
|
-
-
|
35
|
-
-
|
36
|
-
-
|
37
|
-
-
|
38
|
-
-
|
39
|
-
-
|
40
|
-
-
|
41
|
-
-
|
42
|
-
- test/record.dat
|
43
|
-
- test/search_test.rb
|
44
|
-
- test/search_batch_test.rb
|
45
|
-
- test/thread_test.rb
|
11
|
+
cert_chain: []
|
12
|
+
date: 2015-08-15 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description:
|
15
|
+
email:
|
16
|
+
executables: []
|
17
|
+
extensions:
|
18
|
+
- ext/extconf.rb
|
19
|
+
extra_rdoc_files: []
|
20
|
+
files:
|
21
|
+
- ChangeLog
|
22
|
+
- README.md
|
23
|
+
- Rakefile
|
24
|
+
- ext/extconf.rb
|
25
|
+
- ext/rbzoom.c
|
26
|
+
- ext/rbzoom.h
|
27
|
+
- ext/rbzoomconnection.c
|
28
|
+
- ext/rbzoomoptions.c
|
29
|
+
- ext/rbzoompackage.c
|
30
|
+
- ext/rbzoomquery.c
|
31
|
+
- ext/rbzoomrecord.c
|
32
|
+
- ext/rbzoomresultset.c
|
33
|
+
- sample/hello.rb
|
34
|
+
- sample/needle.rb
|
46
35
|
- test/package_live.rb
|
47
36
|
- test/package_test.rb
|
48
|
-
- test/record.txt
|
49
37
|
- test/record-update.xml
|
38
|
+
- test/record.dat
|
39
|
+
- test/record.txt
|
50
40
|
- test/record.xml
|
51
|
-
- test/
|
52
|
-
- test/
|
53
|
-
- test/
|
54
|
-
- test/zebra/
|
55
|
-
- test/zebra/
|
56
|
-
- test/zebra/lock
|
57
|
-
- test/zebra/zebra.cfg
|
41
|
+
- test/search_batch_test.rb
|
42
|
+
- test/search_test.rb
|
43
|
+
- test/thread_test.rb
|
44
|
+
- test/zebra/key/empty_file
|
45
|
+
- test/zebra/lock/empty_file
|
58
46
|
- test/zebra/records/programming_ruby.xml
|
59
47
|
- test/zebra/records/programming_ruby_update.xml
|
60
48
|
- test/zebra/register/empty_file
|
61
49
|
- test/zebra/shadow/empty_file
|
62
|
-
- test/zebra/tab/string.chr
|
63
|
-
- test/zebra/tab/record.abs
|
64
50
|
- test/zebra/tab/bib1.att
|
65
51
|
- test/zebra/tab/default.idx
|
66
|
-
- test/zebra/tab/usmarc.mar
|
67
52
|
- test/zebra/tab/numeric.chr
|
68
|
-
- test/zebra/
|
69
|
-
- test/zebra/
|
70
|
-
-
|
71
|
-
-
|
72
|
-
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
53
|
+
- test/zebra/tab/record.abs
|
54
|
+
- test/zebra/tab/string.chr
|
55
|
+
- test/zebra/tab/usmarc.mar
|
56
|
+
- test/zebra/zebra.cfg
|
57
|
+
homepage: http://ruby-zoom.rubyforge.org
|
58
|
+
licenses: []
|
59
|
+
metadata: {}
|
60
|
+
post_install_message:
|
77
61
|
rdoc_options: []
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
62
|
+
require_paths:
|
63
|
+
- lib
|
64
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
|
+
requirements:
|
71
|
+
- - ">="
|
72
|
+
- !ruby/object:Gem::Version
|
73
|
+
version: '0'
|
85
74
|
requirements: []
|
86
|
-
|
87
|
-
|
88
|
-
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 2.4.5
|
77
|
+
signing_key:
|
78
|
+
specification_version: 4
|
79
|
+
summary: Ruby/ZOOM provides a Ruby binding to the Z39.50 Object-Orientation Model
|
80
|
+
(ZOOM), an abstract object-oriented programming interface to a subset of the services
|
81
|
+
specified by the Z39.50 standard, also known as the international standard ISO 23950. This
|
82
|
+
version introduces ZOOM Extended Services.
|
83
|
+
test_files: []
|