zoom 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,176 +1,167 @@
1
- 2007-08-12 Walter McGinnis <walter at katipo dot co dot nz>
2
- * v0.4.0 - checking in support of ZOOM::Connection#package
3
-
4
- * creating a .4 version of gem
5
-
6
- * AUTHORS
7
- - added Walter McGinnis
8
-
9
- * ChangeLog
10
- - this entry
11
-
12
- 2007-08-11 Nicolai Moles-Benfell <n.molesbenfell@gmail.com>
13
- * AUTHORS
14
- - added Nicolai Moles-Benfell
15
- - added Walter McGinnis
16
-
17
- * src/rbzoomoptions.c:
18
- Added support for rubyfying option names that contain hyphens or full stops.
19
-
20
- * src/rbzoomconnection.c:
21
- Added ZOOM::Connection#package, a factory method that returns an instance of a ZOOM::Package object.
22
-
23
- Added.
24
- * src/rbzoompackage.c:
25
-
26
-
27
-
28
- v0.3.0 Tue Jul 10 11:57:40 EDT 2007
29
- - new format for this file
1
+ v0.4.1 Tue Nov 20 08:05:53 EST 2007
2
+ - record retrieval has changed with batch_download branch merged into trunk.
3
+ this allows for records to be downloaded in a batch and tries to fall back
4
+ to record at a time download if batch download fails.
5
+ - removed second definition of databaseName from rbzoompackage.c
6
+ - added RDoc style documentation to C source
7
+ - added tests for batch retrieval and a connection within a Thread
8
+
9
+ v0.4.0 - checking in support of ZOOM::Connection#package
10
+ - creating a .4 version of gem
11
+ - added Walter McGinnis, Nicolai Moles-Benfell To Authors
12
+ - src/rbzoomoptions.c: Added support for rubyfying option names that
13
+ contain hyphens or full stops.
14
+ - src/rbzoomconnection.c: Added ZOOM::Connection#package, a factory method
15
+ that returns an instance of a ZOOM::Package object.
16
+ - added src/rbzoompackage.c:
17
+
18
+ v0.3.0 Tue Jul 10 11:57:40 EDT 2007
19
+ - new format for this file, all changes are summarized under a version
20
+ no need to recreate commit messages in a text file when svn can tell us them
30
21
  - added Rakefile
31
22
  - applied patch from Jason Ronallo to enable raw method on records
32
23
  - added test suite
33
24
  - created gem for rubyforge
34
25
 
35
26
  2007-05-05 Ed Summers <ehs@pobox.com>
36
- * AUTHORS
37
- - added Ed Summers
27
+ - added Ed Summers
28
+ - src/lib/* removed marc.rb since it isn't used and conflicts with the marc
29
+ gem
38
30
 
39
- * src/lib/*
40
- - removed marc.rb since it isn't used and conflicts with the marc gem
31
+ # Older format preserved for posterity ...
41
32
 
42
33
  2006-09-21 Laurent Sansonetti <lrz@chopine.be>
43
34
 
44
- * ChangeLog,
45
- README,
46
- src/**/*.{c,h,rb}:
35
+ * ChangeLog,
36
+ README,
37
+ src/**/*.{c,h,rb}:
47
38
 
48
- s/gnome.org/chopine.be/g.
39
+ s/gnome.org/chopine.be/g.
49
40
 
50
41
  2006-09-21 Devin Bayer <devin@freeshell.org>
51
42
 
52
- * .cvsignore:
43
+ * .cvsignore:
53
44
 
54
- Ignores zoom.bundle.
45
+ Ignores zoom.bundle.
55
46
 
56
47
  * sample/needle.rb:
57
48
 
58
- Updated the needle demo application.
49
+ Updated the needle demo application.
59
50
 
60
51
  * src/rbzoomconnection.c:
61
52
 
62
- Do not fail when reading options.
53
+ Do not fail when reading options.
63
54
 
64
55
  2006-08-22 Laurent Sansonetti <lrz@chopine.be>
65
56
 
66
- * AUTHORS:
57
+ * AUTHORS:
67
58
 
68
- - Updated my e-mail address ;
69
- - Added Devin.
59
+ - Updated my e-mail address ;
60
+ - Added Devin.
70
61
 
71
62
  2006-08-22 Devin Bayer <devin@freeshell.org>
72
63
 
73
- * src/rbzoomrecord.c:
64
+ * src/rbzoomrecord.c:
74
65
 
75
- Added ZOOM::Record#raw, to grab a marc record in marc format.
66
+ Added ZOOM::Record#raw, to grab a marc record in marc format.
76
67
 
77
68
  2006-08-20 Devin Bayer <devin@freeshell.org>
78
69
 
79
- * sample/needle.rb:
70
+ * sample/needle.rb:
80
71
 
81
- Added new sample, contributed by Devin Bayer.
72
+ Added new sample, contributed by Devin Bayer.
82
73
 
83
74
  === Ruby/ZOOM 0.2.2 ===
84
75
 
85
76
  2005-11-08 Laurent Sansonetti <lrz@chopine.be>
86
77
 
87
- * README:
78
+ * README:
88
79
 
89
- Added a note about YAZ's --enable-shared problem.
80
+ Added a note about YAZ's --enable-shared problem.
90
81
 
91
- * AUTHORS:
82
+ * AUTHORS:
92
83
 
93
- Added Pascal and Matt.
84
+ Added Pascal and Matt.
94
85
 
95
86
  2005-11-08 Matt Vanderpol <matt@vanderpol.net>
96
87
 
97
- * src/rbzoomquery.c (.new_prefix, .new_cql):
88
+ * src/rbzoomquery.c (.new_prefix, .new_cql):
98
89
 
99
- Fixed constructors.
90
+ Fixed constructors.
100
91
 
101
92
  === Ruby/ZOOM 0.2.1 ===
102
93
 
103
94
  2005-09-23 Pascal Terjan <pterjan@linuxfr.org>
104
95
 
105
- * src/rbzoomoptions.c:
96
+ * src/rbzoomoptions.c:
106
97
 
107
- Fixes segfault when rubyfying the option name.
98
+ Fixes segfault when rubyfying the option name.
108
99
 
109
100
  === Ruby/ZOOM 0.2.0 ===
110
101
 
111
102
  2005-08-02 Laurent Sansonetti <lrz@chopine.be>
112
103
 
113
- * src/rbzoomresultset.rb (#[]):
104
+ * src/rbzoomresultset.rb (#[]):
114
105
 
115
- Retrieves the record one by one using ZOOM_resultset_record instead
116
- of getting them all in once with ZOOM_resultset_records (for a strange
117
- reason sometimes the resultset was not empty but ZOOM_resultset_records
118
- used to return empty records).
106
+ Retrieves the record one by one using ZOOM_resultset_record instead
107
+ of getting them all in once with ZOOM_resultset_records (for a strange
108
+ reason sometimes the resultset was not empty but ZOOM_resultset_records
109
+ used to return empty records).
119
110
 
120
111
  2005-07-19 Laurent Sansonetti <lrz@chopine.be>
121
112
 
122
- * src/lib/marc.rb:
113
+ * src/lib/marc.rb:
123
114
 
124
- Added an experimental MARC decoder.
115
+ Added an experimental MARC decoder.
125
116
 
126
117
  === Ruby/ZOOM 0.1.0 ===
127
118
 
128
119
  2005-03-18 Laurent Sansonetti <lrz@chopine.be>
129
120
 
130
- * COPYING.LIB,
131
- AUTHORS,
132
- README:
121
+ * COPYING.LIB,
122
+ AUTHORS,
123
+ README:
133
124
 
134
- Added.
125
+ Added.
135
126
 
136
- * src/rbzoomconnection.c,
137
- src/rbzoomquery.c:
127
+ * src/rbzoomconnection.c,
128
+ src/rbzoomquery.c:
138
129
 
139
- Fixed documentation.
130
+ Fixed documentation.
140
131
 
141
- * src/rbzoomresultset.c (#[]):
132
+ * src/rbzoomresultset.c (#[]):
142
133
 
143
- - Range objects are supported ;
144
- - Do not clone nil objects.
134
+ - Range objects are supported ;
135
+ - Do not clone nil objects.
145
136
 
146
137
  2005-03-17 Laurent Sansonetti <lrz@chopine.be>
147
138
 
148
- * doc/.cvsignore,
149
- doc/gendoc.sh:
139
+ * doc/.cvsignore,
140
+ doc/gendoc.sh:
150
141
 
151
- Added.
142
+ Added.
152
143
 
153
- * src/rbzoom.c,
154
- src/rbzoom.h,
155
- src/rbzoomconnection.c,
156
- src/rbzoomoptions.c,
157
- src/rbzoomquery.c,
158
- src/rbzoomrecord.c,
159
- src/rbzoomresultset.c:
144
+ * src/rbzoom.c,
145
+ src/rbzoom.h,
146
+ src/rbzoomconnection.c,
147
+ src/rbzoomoptions.c,
148
+ src/rbzoomquery.c,
149
+ src/rbzoomrecord.c,
150
+ src/rbzoomresultset.c:
160
151
 
161
- Added extdoc documentation + LGPL headers.
152
+ Added extdoc documentation + LGPL headers.
162
153
 
163
154
  2005-03-16 Laurent Sansonetti <lrz@chopine.be>
164
155
 
165
- * src/rbzoomrecord.c (#database, #syntax, #render, #xml):
156
+ * src/rbzoomrecord.c (#database, #syntax, #render, #xml):
166
157
 
167
- Added.
158
+ Added.
168
159
 
169
- * src/rbzoom.c,
170
- sample/hello.rb:
160
+ * src/rbzoom.c,
161
+ sample/hello.rb:
171
162
 
172
- Renamed the module name as 'ZOOM'.
163
+ Renamed the module name as 'ZOOM'.
173
164
 
174
165
  2005-03-14 Laurent Sansonetti <lrz@chopine.be>
175
166
 
176
- Initial RubyForge revision.
167
+ Initial RubyForge revision.
data/README CHANGED
@@ -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,8 +13,7 @@ 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
17
- ------------
16
+ == Requirements
18
17
 
19
18
  Ruby: http://www.ruby-lang.org/
20
19
  YAZ (*): http://www.indexdata.dk/yaz/
@@ -23,28 +22,61 @@ Requirements
23
22
  script before building YAZ. Ruby/ZOOM requires a YAZ shared library
24
23
  and YAZ does not build it by default.
25
24
 
26
- Install
27
- -------
25
+ == Install
28
26
 
29
27
  0. install Ruby
30
28
  1. install YAZ
31
29
  2. gem install ruby-zoom
32
30
 
33
- Build from Source
34
- -----------------
31
+ == Build from Source
35
32
 
36
- 0. checkout out code from cvs at rubyforge
33
+ 0. checkout out code from svn at rubyforge
37
34
  1. install Rake
38
35
  2. rake
39
- 5. gem install pkg/zoom-*.gem
36
+ 3. gem install pkg/zoom-*.gem
40
37
 
41
- Samples
42
- -------
38
+ == Samples
43
39
 
44
40
  Some programming examples are available in the `sample' directory.
45
41
 
46
- Copying
47
- -------
42
+ == Canonical Sample Program
43
+
44
+ To give a flavour of the Ruby binding, here is ZOOM's equivalent of the
45
+ ``Hello World'' program: a tiny Z39.50 client that fetches and displays
46
+ the MARC record for Farlow & Brett Surman's The Complete Dinosaur from
47
+ the Library of Congress.
48
+
49
+
50
+ require 'zoom'
51
+
52
+ ZOOM::Connection.open('z3950.loc.gov', 7090) do |conn|
53
+ conn.database_name = 'Voyager'
54
+ conn.preferred_record_syntax = 'USMARC'
55
+ rset = conn.search('@attr 1=7 0253333490')
56
+ p rset[0]
57
+ end
58
+
59
+ == ZOOM Extended Services
60
+
61
+ With release 0.4.1 extended services support has been added which allows
62
+ create, update and delete of records. This only works for XML.
63
+ Here's an example adapted from the test suite.
64
+
65
+ require 'zoom'
66
+
67
+ new_record = File.read('programming_ruby.xml')
68
+
69
+ ZOOM::Connection.open('localhost:99999/test') do |conn|
70
+ p = conn.package
71
+ p.wait_action = 'waitIfPossible'
72
+ p.action = 'specialUpdate'
73
+ p.record = new_record
74
+ p.send('update')
75
+ p.send('commit')
76
+ end
77
+
78
+
79
+ == Copying
48
80
 
49
81
  Copyright (c) 2005 Laurent Sansonetti <lrz@chopine.be>
50
82
 
@@ -52,7 +84,6 @@ Copying
52
84
  You can distribute/modify this program under the terms of
53
85
  the GNU LESSER GENERAL PUBLIC LICENSE Version 2.1.
54
86
 
55
- Project Website
56
- ---------------
87
+ == Project Website
57
88
 
58
89
  http://ruby-zoom.rubyforge.org
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- RUBY_ZOOM_VERSION = '0.4.0'
1
+ RUBY_ZOOM_VERSION = '0.4.1'
2
2
 
3
3
  require 'rubygems'
4
4
  require 'rake'
@@ -26,7 +26,13 @@ task :build => [:clean] do |t|
26
26
  end
27
27
 
28
28
  Rake::TestTask.new('test') do |t|
29
- t.pattern = 'test/*_test.rb'
29
+ t.pattern = ['test/*_test.rb']
30
+ t.verbose = true
31
+ t.ruby_opts = ['-r test/unit', '-I src', '-r zoom']
32
+ end
33
+
34
+ Rake::TestTask.new('live_test') do |t|
35
+ t.pattern = 'test/*_live.rb'
30
36
  t.verbose = true
31
37
  t.ruby_opts = ['-r test/unit', '-I src', '-r zoom']
32
38
  end
@@ -52,3 +58,8 @@ Rake::GemPackageTask.new(spec) do |pkg|
52
58
  pkg.need_zip = true
53
59
  pkg.need_tar = true
54
60
  end
61
+
62
+ Rake::RDocTask.new do |rd|
63
+ rd.main = "README"
64
+ rd.rdoc_files.include("README", "src/*.c")
65
+ end
@@ -10,6 +10,7 @@
10
10
  # By Devin Bayer - Summer 2006 - Public Domain
11
11
  #
12
12
  #
13
+ require 'rubygems'
13
14
  require 'zoom'
14
15
  require 'net/http'
15
16
  Net::HTTP.version_1_2
@@ -18,6 +18,7 @@
18
18
 
19
19
  #include "rbzoom.h"
20
20
 
21
+
21
22
  void
22
23
  Init_zoom (void)
23
24
  {
@@ -18,7 +18,12 @@
18
18
 
19
19
  #include "rbzoom.h"
20
20
 
21
- /* Class: ZOOM::Connection
21
+ #ifdef MAKING_RDOC_HAPPY
22
+ mZoom = rb_define_module("ZOOM");
23
+ #endif
24
+
25
+
26
+ /* Document-class: ZOOM::Connection
22
27
  * The Connection object is a session with a target.
23
28
  */
24
29
  static VALUE cZoomConnection;
@@ -71,8 +76,11 @@ void rbz_connection_check(VALUE obj)
71
76
 
72
77
 
73
78
  /*
74
- * Class method: open(host, port=nil) { |conn| ... }
79
+ * call-seq:
80
+ * open(host, port=nil) { |conn| ... }
81
+ *
75
82
  * host: hostname of the target to connect to.
83
+ *
76
84
  * port: network port of the target to connect to.
77
85
  *
78
86
  * A convenience method that creates a new connection and attempts to
@@ -109,7 +117,8 @@ rbz_connection_open (int argc, VALUE *argv, VALUE self)
109
117
  }
110
118
 
111
119
  /*
112
- * Class method: new(options=nil)
120
+ * call-seq: new(options=nil)
121
+ *
113
122
  * options: options for the connection, as a Hash object.
114
123
  *
115
124
  * Creates a new connection object, but does not establish a network connection
@@ -140,8 +149,11 @@ rbz_connection_new (int argc, VALUE *argv, VALUE self)
140
149
  }
141
150
 
142
151
  /*
143
- * Method: connect(host, port=nil)
152
+ * call-seq:
153
+ * connect(host, port=nil)
154
+ *
144
155
  * host: hostname of the target to connect to.
156
+ *
145
157
  * port: network port of the target to connect to.
146
158
  *
147
159
  * Establishes a network connection to the target specified by the given
@@ -176,8 +188,11 @@ rbz_connection_connect (int argc, VALUE *argv, VALUE self)
176
188
  }
177
189
 
178
190
  /*
179
- * Method: set_option(key, value)
191
+ * call-seq:
192
+ * set_option(key, value)
193
+ *
180
194
  * key: the name of the option, as a string.
195
+ *
181
196
  * value: the value of this option (as a string, integer or boolean).
182
197
  *
183
198
  * Sets an option on the connection.
@@ -199,7 +214,9 @@ rbz_connection_set_option (VALUE self, VALUE key, VALUE val)
199
214
  }
200
215
 
201
216
  /*
202
- * Method: get_option(key)
217
+ * call-seq:
218
+ * get_option(key)
219
+ *
203
220
  * key: the name of the option, as a string.
204
221
  *
205
222
  * Gets the value of a connection's option.
@@ -220,7 +237,9 @@ rbz_connection_get_option (VALUE self, VALUE key)
220
237
  }
221
238
 
222
239
  /*
223
- * Method: search(criterion)
240
+ * call-seq:
241
+ * search(criterion)
242
+ *
224
243
  * criterion: the search criterion, either as a ZOOM::Query object or as a string,
225
244
  * representing a PQF query.
226
245
  *
@@ -254,14 +273,12 @@ rbz_connection_search (VALUE self, VALUE criterion)
254
273
 
255
274
 
256
275
  /*
257
- * Method: package()
258
- *
259
276
  * Constructs a new extended services ZOOM::Package using this connections host information.
260
277
  *
261
278
  * Note: The Perl script passes this connections options if already set, otherwise constructs a new ZOOM::Option object.
262
279
  * Currently this method always constructs a new ZOOM::Option object for each package.
263
280
  *
264
- * Returns: a new ZOOM::Package object,
281
+ * Returns: a new ZOOM::Package object.
265
282
  */
266
283
  static VALUE
267
284
  rbz_connection_package(VALUE self)