zoom 0.4.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -1,4 +1,4 @@
1
- = Ruby/ZOOM
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
- == Requirements
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
- == Install
26
+ Build from Source
27
+ -------
26
28
 
27
- 0. install Ruby
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
- == Samples
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
- == Canonical Sample Program
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
- == ZOOM Extended Services
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
- == Copying
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
- == Project Website
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 'rake/rdoctask'
6
+ require 'rdoc/task'
8
7
  require 'rake/packagetask'
9
- require 'rake/gempackagetask'
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('src') do
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.pattern = ['test/*_test.rb']
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.pattern = 'test/*_live.rb'
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", "src/*.c")
45
+ rd.main = "README.md"
46
+ rd.rdoc_files.include("README.md", "ext/*.c")
65
47
  end
@@ -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
- break
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
- break
10
+ exit
11
11
  end
12
12
 
13
13
  $CFLAGS << " #{`yaz-config --cflags`} "
File without changes
@@ -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 : STR2CSTR(x))
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))
@@ -285,7 +285,7 @@ rbz_connection_package(VALUE self)
285
285
  {
286
286
  ZOOM_connection connection;
287
287
  ZOOM_options options;
288
- ZOOM_package package;
288
+ VALUE package;
289
289
 
290
290
  connection = rbz_connection_get (self);
291
291
  options = ZOOM_options_create ();
@@ -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 < RARRAY (ary)->len; i++) {
36
- pair = RARRAY (ary)->ptr[i];
37
- key = RARRAY (pair)->ptr[0];
38
- value = RARRAY (pair)->ptr[1];
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++) {
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -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(true, p.respond_to?('correlation_info_note='))
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.4.1
7
- date: 2007-11-20 00:00:00 -05:00
8
- 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.
9
- require_paths:
10
- - lib
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
- has_rdoc: false
19
- required_ruby_version: !ruby/object:Gem::Version::Requirement
20
- requirements:
21
- - - ">"
22
- - !ruby/object:Gem::Version
23
- version: 0.0.0
24
- version:
25
- platform: ruby
26
- signing_key:
27
- cert_chain:
28
- post_install_message:
29
- authors: []
30
-
31
- files:
32
- - src/rbzoomquery.c
33
- - src/rbzoomresultset.c
34
- - src/rbzoomoptions.c
35
- - src/rbzoompackage.c
36
- - src/rbzoomrecord.c
37
- - src/rbzoom.c
38
- - src/rbzoomconnection.c
39
- - src/rbzoom.h
40
- - src/extconf.rb
41
- - test/zebra
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/zebra/records
52
- - test/zebra/register
53
- - test/zebra/shadow
54
- - test/zebra/tab
55
- - test/zebra/key
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/key/empty_file
69
- - test/zebra/lock/empty_file
70
- - sample/hello.rb
71
- - sample/needle.rb
72
- - README
73
- - ChangeLog
74
- - Rakefile
75
- test_files: []
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
- extra_rdoc_files: []
80
-
81
- executables: []
82
-
83
- extensions:
84
- - src/extconf.rb
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
- dependencies: []
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: []