raspell 1.1 → 1.2

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig ADDED
@@ -0,0 +1,5 @@
1
+ �|U��JV�����,?��a.b��_�إ��v����ϳ��M��:52Ŗۻ�=J H�/-��c&�2� ȲZ�2�6Cd���֮)��}��p;�
2
+ ��o*�Uհ} �F�
3
+ ����ʄ֏ X�XV���U��R�
4
+ "QR����]h�||���I4G�
5
+ ���J^��Ԏ��1��\m �©�񫼻p6���4�i�R<x�3K�(��Y�l��.��\#o�~����� ���C{�a[Щ��0�_��Na"
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ v1.2. Ruby 1.9 compatibility (ph7).
3
+
2
4
  v1.1. Would be nice if it actually compiled again.
3
5
 
4
6
  v1.0. Documentation.
data/LICENSE CHANGED
@@ -1,14 +1,16 @@
1
- GNU GENERAL PUBLIC LICENSE
2
- Version 2, June 1991
1
+ GNU GENERAL PUBLIC LICENSE
3
2
 
4
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6
- Everyone is permitted to copy and distribute verbatim copies
7
- of this license document, but changing it is not allowed.
3
+ Version 2, June 1991
8
4
 
9
- Preamble
5
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
6
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
10
7
 
11
- The licenses for most software are designed to take away your
8
+ Everyone is permitted to copy and distribute verbatim copies
9
+ of this license document, but changing it is not allowed.
10
+
11
+ == Preamble
12
+
13
+ The licenses for most software are designed to take away your
12
14
  freedom to share and change it. By contrast, the GNU General Public
13
15
  License is intended to guarantee your freedom to share and change free
14
16
  software--to make sure the software is free for all its users. This
@@ -18,48 +20,49 @@ using it. (Some other Free Software Foundation software is covered by
18
20
  the GNU Lesser General Public License instead.) You can apply it to
19
21
  your programs, too.
20
22
 
21
- When we speak of free software, we are referring to freedom, not
23
+ When we speak of free software, we are referring to freedom, not
22
24
  price. Our General Public Licenses are designed to make sure that you
23
25
  have the freedom to distribute copies of free software (and charge for
24
26
  this service if you wish), that you receive source code or can get it
25
27
  if you want it, that you can change the software or use pieces of it
26
28
  in new free programs; and that you know you can do these things.
27
29
 
28
- To protect your rights, we need to make restrictions that forbid
30
+ To protect your rights, we need to make restrictions that forbid
29
31
  anyone to deny you these rights or to ask you to surrender the rights.
30
32
  These restrictions translate to certain responsibilities for you if you
31
33
  distribute copies of the software, or if you modify it.
32
34
 
33
- For example, if you distribute copies of such a program, whether
35
+ For example, if you distribute copies of such a program, whether
34
36
  gratis or for a fee, you must give the recipients all the rights that
35
37
  you have. You must make sure that they, too, receive or can get the
36
38
  source code. And you must show them these terms so they know their
37
39
  rights.
38
40
 
39
- We protect your rights with two steps: (1) copyright the software, and
41
+ We protect your rights with two steps: (1) copyright the software, and
40
42
  (2) offer you this license which gives you legal permission to copy,
41
43
  distribute and/or modify the software.
42
44
 
43
- Also, for each author's protection and ours, we want to make certain
45
+ Also, for each author's protection and ours, we want to make certain
44
46
  that everyone understands that there is no warranty for this free
45
47
  software. If the software is modified by someone else and passed on, we
46
48
  want its recipients to know that what they have is not the original, so
47
49
  that any problems introduced by others will not reflect on the original
48
50
  authors' reputations.
49
51
 
50
- Finally, any free program is threatened constantly by software
52
+ Finally, any free program is threatened constantly by software
51
53
  patents. We wish to avoid the danger that redistributors of a free
52
54
  program will individually obtain patent licenses, in effect making the
53
55
  program proprietary. To prevent this, we have made it clear that any
54
56
  patent must be licensed for everyone's free use or not licensed at all.
55
57
 
56
- The precise terms and conditions for copying, distribution and
58
+ The precise terms and conditions for copying, distribution and
57
59
  modification follow.
58
60
 
59
- GNU GENERAL PUBLIC LICENSE
60
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
+ == GNU GENERAL PUBLIC LICENSE
62
+
63
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61
64
 
62
- 0. This License applies to any program or other work which contains
65
+ 0. This License applies to any program or other work which contains
63
66
  a notice placed by the copyright holder saying it may be distributed
64
67
  under the terms of this General Public License. The "Program", below,
65
68
  refers to any such program or work, and a "work based on the Program"
@@ -76,7 +79,7 @@ is covered only if its contents constitute a work based on the
76
79
  Program (independent of having been made by running the Program).
77
80
  Whether that is true depends on what the Program does.
78
81
 
79
- 1. You may copy and distribute verbatim copies of the Program's
82
+ 1. You may copy and distribute verbatim copies of the Program's
80
83
  source code as you receive it, in any medium, provided that you
81
84
  conspicuously and appropriately publish on each copy an appropriate
82
85
  copyright notice and disclaimer of warranty; keep intact all the
@@ -87,29 +90,29 @@ along with the Program.
87
90
  You may charge a fee for the physical act of transferring a copy, and
88
91
  you may at your option offer warranty protection in exchange for a fee.
89
92
 
90
- 2. You may modify your copy or copies of the Program or any portion
93
+ 2. You may modify your copy or copies of the Program or any portion
91
94
  of it, thus forming a work based on the Program, and copy and
92
95
  distribute such modifications or work under the terms of Section 1
93
96
  above, provided that you also meet all of these conditions:
94
97
 
95
- a) You must cause the modified files to carry prominent notices
96
- stating that you changed the files and the date of any change.
97
-
98
- b) You must cause any work that you distribute or publish, that in
99
- whole or in part contains or is derived from the Program or any
100
- part thereof, to be licensed as a whole at no charge to all third
101
- parties under the terms of this License.
102
-
103
- c) If the modified program normally reads commands interactively
104
- when run, you must cause it, when started running for such
105
- interactive use in the most ordinary way, to print or display an
106
- announcement including an appropriate copyright notice and a
107
- notice that there is no warranty (or else, saying that you provide
108
- a warranty) and that users may redistribute the program under
109
- these conditions, and telling the user how to view a copy of this
110
- License. (Exception: if the Program itself is interactive but
111
- does not normally print such an announcement, your work based on
112
- the Program is not required to print an announcement.)
98
+ a) You must cause the modified files to carry prominent notices
99
+ stating that you changed the files and the date of any change.
100
+
101
+ b) You must cause any work that you distribute or publish, that in
102
+ whole or in part contains or is derived from the Program or any
103
+ part thereof, to be licensed as a whole at no charge to all third
104
+ parties under the terms of this License.
105
+
106
+ c) If the modified program normally reads commands interactively
107
+ when run, you must cause it, when started running for such
108
+ interactive use in the most ordinary way, to print or display an
109
+ announcement including an appropriate copyright notice and a
110
+ notice that there is no warranty (or else, saying that you provide
111
+ a warranty) and that users may redistribute the program under
112
+ these conditions, and telling the user how to view a copy of this
113
+ License. (Exception: if the Program itself is interactive but
114
+ does not normally print such an announcement, your work based on
115
+ the Program is not required to print an announcement.)
113
116
 
114
117
  These requirements apply to the modified work as a whole. If
115
118
  identifiable sections of that work are not derived from the Program,
@@ -131,26 +134,26 @@ with the Program (or with a work based on the Program) on a volume of
131
134
  a storage or distribution medium does not bring the other work under
132
135
  the scope of this License.
133
136
 
134
- 3. You may copy and distribute the Program (or a work based on it,
137
+ 3. You may copy and distribute the Program (or a work based on it,
135
138
  under Section 2) in object code or executable form under the terms of
136
139
  Sections 1 and 2 above provided that you also do one of the following:
137
140
 
138
- a) Accompany it with the complete corresponding machine-readable
139
- source code, which must be distributed under the terms of Sections
140
- 1 and 2 above on a medium customarily used for software interchange; or,
141
+ a) Accompany it with the complete corresponding machine-readable
142
+ source code, which must be distributed under the terms of Sections
143
+ 1 and 2 above on a medium customarily used for software interchange; or,
141
144
 
142
- b) Accompany it with a written offer, valid for at least three
143
- years, to give any third party, for a charge no more than your
144
- cost of physically performing source distribution, a complete
145
- machine-readable copy of the corresponding source code, to be
146
- distributed under the terms of Sections 1 and 2 above on a medium
147
- customarily used for software interchange; or,
145
+ b) Accompany it with a written offer, valid for at least three
146
+ years, to give any third party, for a charge no more than your
147
+ cost of physically performing source distribution, a complete
148
+ machine-readable copy of the corresponding source code, to be
149
+ distributed under the terms of Sections 1 and 2 above on a medium
150
+ customarily used for software interchange; or,
148
151
 
149
- c) Accompany it with the information you received as to the offer
150
- to distribute corresponding source code. (This alternative is
151
- allowed only for noncommercial distribution and only if you
152
- received the program in object code or executable form with such
153
- an offer, in accord with Subsection b above.)
152
+ c) Accompany it with the information you received as to the offer
153
+ to distribute corresponding source code. (This alternative is
154
+ allowed only for noncommercial distribution and only if you
155
+ received the program in object code or executable form with such
156
+ an offer, in accord with Subsection b above.)
154
157
 
155
158
  The source code for a work means the preferred form of the work for
156
159
  making modifications to it. For an executable work, complete source
@@ -169,7 +172,7 @@ access to copy the source code from the same place counts as
169
172
  distribution of the source code, even though third parties are not
170
173
  compelled to copy the source along with the object code.
171
174
 
172
- 4. You may not copy, modify, sublicense, or distribute the Program
175
+ 4. You may not copy, modify, sublicense, or distribute the Program
173
176
  except as expressly provided under this License. Any attempt
174
177
  otherwise to copy, modify, sublicense or distribute the Program is
175
178
  void, and will automatically terminate your rights under this License.
@@ -177,7 +180,7 @@ However, parties who have received copies, or rights, from you under
177
180
  this License will not have their licenses terminated so long as such
178
181
  parties remain in full compliance.
179
182
 
180
- 5. You are not required to accept this License, since you have not
183
+ 5. You are not required to accept this License, since you have not
181
184
  signed it. However, nothing else grants you permission to modify or
182
185
  distribute the Program or its derivative works. These actions are
183
186
  prohibited by law if you do not accept this License. Therefore, by
@@ -186,7 +189,7 @@ Program), you indicate your acceptance of this License to do so, and
186
189
  all its terms and conditions for copying, distributing or modifying
187
190
  the Program or works based on it.
188
191
 
189
- 6. Each time you redistribute the Program (or any work based on the
192
+ 6. Each time you redistribute the Program (or any work based on the
190
193
  Program), the recipient automatically receives a license from the
191
194
  original licensor to copy, distribute or modify the Program subject to
192
195
  these terms and conditions. You may not impose any further
@@ -194,7 +197,7 @@ restrictions on the recipients' exercise of the rights granted herein.
194
197
  You are not responsible for enforcing compliance by third parties to
195
198
  this License.
196
199
 
197
- 7. If, as a consequence of a court judgment or allegation of patent
200
+ 7. If, as a consequence of a court judgment or allegation of patent
198
201
  infringement or for any other reason (not limited to patent issues),
199
202
  conditions are imposed on you (whether by court order, agreement or
200
203
  otherwise) that contradict the conditions of this License, they do not
@@ -226,7 +229,7 @@ impose that choice.
226
229
  This section is intended to make thoroughly clear what is believed to
227
230
  be a consequence of the rest of this License.
228
231
 
229
- 8. If the distribution and/or use of the Program is restricted in
232
+ 8. If the distribution and/or use of the Program is restricted in
230
233
  certain countries either by patents or by copyrighted interfaces, the
231
234
  original copyright holder who places the Program under this License
232
235
  may add an explicit geographical distribution limitation excluding
@@ -234,7 +237,7 @@ those countries, so that distribution is permitted only in or among
234
237
  countries not thus excluded. In such case, this License incorporates
235
238
  the limitation as if written in the body of this License.
236
239
 
237
- 9. The Free Software Foundation may publish revised and/or new versions
240
+ 9. The Free Software Foundation may publish revised and/or new versions
238
241
  of the General Public License from time to time. Such new versions will
239
242
  be similar in spirit to the present version, but may differ in detail to
240
243
  address new problems or concerns.
@@ -247,7 +250,7 @@ Software Foundation. If the Program does not specify a version number of
247
250
  this License, you may choose any version ever published by the Free Software
248
251
  Foundation.
249
252
 
250
- 10. If you wish to incorporate parts of the Program into other free
253
+ 10. If you wish to incorporate parts of the Program into other free
251
254
  programs whose distribution conditions are different, write to the author
252
255
  to ask for permission. For software which is copyrighted by the Free
253
256
  Software Foundation, write to the Free Software Foundation; we sometimes
@@ -255,9 +258,9 @@ make exceptions for this. Our decision will be guided by the two goals
255
258
  of preserving the free status of all derivatives of our free software and
256
259
  of promoting the sharing and reuse of software generally.
257
260
 
258
- NO WARRANTY
261
+ == NO WARRANTY
259
262
 
260
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
263
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261
264
  FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262
265
  OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263
266
  PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
@@ -267,7 +270,7 @@ TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267
270
  PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268
271
  REPAIR OR CORRECTION.
269
272
 
270
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
273
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271
274
  WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272
275
  REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273
276
  INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
@@ -277,45 +280,45 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277
280
  PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278
281
  POSSIBILITY OF SUCH DAMAGES.
279
282
 
280
- END OF TERMS AND CONDITIONS
283
+ == END OF TERMS AND CONDITIONS
281
284
 
282
- How to Apply These Terms to Your New Programs
285
+ How to Apply These Terms to Your New Programs
283
286
 
284
- If you develop a new program, and you want it to be of the greatest
287
+ If you develop a new program, and you want it to be of the greatest
285
288
  possible use to the public, the best way to achieve this is to make it
286
289
  free software which everyone can redistribute and change under these terms.
287
290
 
288
- To do so, attach the following notices to the program. It is safest
291
+ To do so, attach the following notices to the program. It is safest
289
292
  to attach them to the start of each source file to most effectively
290
293
  convey the exclusion of warranty; and each file should have at least
291
294
  the "copyright" line and a pointer to where the full notice is found.
292
295
 
293
- <one line to give the program's name and a brief idea of what it does.>
294
- Copyright (C) <year> <name of author>
296
+ <one line to give the program's name and a brief idea of what it does.>
297
+ Copyright (C) <year> <name of author>
295
298
 
296
- This program is free software; you can redistribute it and/or modify
297
- it under the terms of the GNU General Public License as published by
298
- the Free Software Foundation; either version 2 of the License, or
299
- (at your option) any later version.
299
+ This program is free software; you can redistribute it and/or modify
300
+ it under the terms of the GNU General Public License as published by
301
+ the Free Software Foundation; either version 2 of the License, or
302
+ (at your option) any later version.
300
303
 
301
- This program is distributed in the hope that it will be useful,
302
- but WITHOUT ANY WARRANTY; without even the implied warranty of
303
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
304
- GNU General Public License for more details.
304
+ This program is distributed in the hope that it will be useful,
305
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
306
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
307
+ GNU General Public License for more details.
305
308
 
306
- You should have received a copy of the GNU General Public License along
307
- with this program; if not, write to the Free Software Foundation, Inc.,
308
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
+ You should have received a copy of the GNU General Public License along
310
+ with this program; if not, write to the Free Software Foundation, Inc.,
311
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
309
312
 
310
313
  Also add information on how to contact you by electronic and paper mail.
311
314
 
312
315
  If the program is interactive, make it output a short notice like this
313
316
  when it starts in an interactive mode:
314
-
315
- Gnomovision version 69, Copyright (C) year name of author
316
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
317
- This is free software, and you are welcome to redistribute it
318
- under certain conditions; type `show c' for details.
317
+
318
+ Gnomovision version 69, Copyright (C) year name of author
319
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
320
+ This is free software, and you are welcome to redistribute it
321
+ under certain conditions; type `show c' for details.
319
322
 
320
323
  The hypothetical commands `show w' and `show c' should show the appropriate
321
324
  parts of the General Public License. Of course, the commands you use may
@@ -328,7 +331,7 @@ necessary. Here is a sample; alter the names:
328
331
 
329
332
  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
330
333
  `Gnomovision' (which makes passes at compilers) written by James Hacker.
331
-
334
+
332
335
  <signature of Ty Coon>, 1 April 1989
333
336
  Ty Coon, President of Vice
334
337
 
data/README CHANGED
@@ -5,7 +5,11 @@ An interface binding for the Aspell spelling checker.
5
5
 
6
6
  == License
7
7
 
8
- Copyright 2007 Cloudburst, LLC. Portions copyright 2005 Matthias Veit, Biro Eszter and used with permission. Licensed under the GPL 2.0. See included LICENSE file.
8
+ Copyright 2007-2010 Cloudburst, LLC. Licensed under the GPL 2.0. See included LICENSE file. Portions copyright 2005 Matthias Veit, Biro Eszter and used with permission.
9
+
10
+ The public certificate for the gem is here[http://rubyforge.org/frs/download.php/25331/evan_weaver-original-public_cert.pem].
11
+
12
+ If you use this software, please {make a donation}[http://blog.evanweaver.com/donate/], or {recommend Evan}[http://www.workingwithrails.com/person/7739-evan-weaver] at Working with Rails.
9
13
 
10
14
  == Requirements
11
15
 
@@ -19,6 +23,10 @@ Ubuntu:
19
23
 
20
24
  == Installation
21
25
 
26
+ Mac:
27
+ sudo gem install raspell -- --with-opt-dir=/opt/local
28
+
29
+ Ubuntu:
22
30
  sudo gem install raspell
23
31
 
24
32
  == Usage
@@ -58,7 +66,13 @@ The most useful options are <tt>suggestion_mode</tt>, and the passthrough option
58
66
 
59
67
  See http://aspell.net/man-html/The-Options.html for a list of the passthrough options.
60
68
 
69
+ == Reporting problems
70
+
71
+ The support forum is here[http://rubyforge.org/forum/forum.php?forum_id=13988].
72
+
73
+ Patches and contributions are very welcome. Please note that contributors are required to assign copyright for their additions to Cloudburst, LLC.
74
+
61
75
  == Futher resources
62
76
 
63
- * http://blog.evanweaver.com/pages/code#raspell
64
- * http://rubyforge.org/forum/forum.php?forum_id=13988
77
+ * http://blog.evanweaver.com/articles/2007/03/10/add-gud-spelning-to-ur-railz-app-or-wharever
78
+
data/Rakefile ADDED
@@ -0,0 +1,15 @@
1
+
2
+ require 'rubygems'
3
+ gem 'echoe', '>=2.3'
4
+ require 'echoe'
5
+
6
+ Echoe.new("raspell") do |p|
7
+ p.rubyforge_name = "fauna"
8
+ p.summary = "An interface binding for the Aspell spelling checker."
9
+ p.url = "http://blog.evanweaver.com/files/doc/fauna/raspell/"
10
+ p.docs_host = "blog.evanweaver.com:~/www/bax/public/files/doc/"
11
+ p.has_rdoc = false # avoids warnings on gem install
12
+ p.rdoc_pattern = /CHANGELOG|EXAMPLE|LICENSE|README|lib/
13
+ p.rdoc_options = [] # don't want to include the stubbed out source
14
+ p.require_signed = true
15
+ end
data/ext/extconf.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require "mkmf"
2
2
 
3
+ dir_config("opt", "/opt/local/include", "/opt/local/lib")
3
4
  have_header("ruby.h")
4
5
  have_header("aspell.h")
5
6
  have_library("aspell")
data/ext/raspell.c CHANGED
@@ -97,12 +97,12 @@ static void set_option(AspellConfig *config, char *key, char *value) {
97
97
 
98
98
  static void set_options(AspellConfig *config, VALUE hash) {
99
99
  VALUE options = rb_funcall(hash, rb_intern("keys"), 0);
100
- int count=RARRAY(options)->len;
100
+ int count=RARRAY_LEN(options);
101
101
  int c = 0;
102
102
  //set all values
103
103
  while(c<count) {
104
104
  //fetch option
105
- VALUE option = RARRAY(options)->ptr[c];
105
+ VALUE option = RARRAY_PTR(options)[c];
106
106
  VALUE value = rb_funcall(hash, rb_intern("fetch"), 1, option);
107
107
  if (TYPE(option)!=T_STRING) rb_raise(cAspellError, "Given key must be a string.");
108
108
  if (TYPE(value )!=T_STRING) rb_raise(cAspellError, "Given value must be a string.");
@@ -512,7 +512,7 @@ static VALUE aspell_correct_lines(VALUE self, VALUE ary) {
512
512
  VALUE vline, sline;
513
513
  VALUE word, rword;
514
514
  char *line;
515
- int count=RARRAY(ary)->len;
515
+ int count=RARRAY_LEN(ary);
516
516
  int c=0;
517
517
  //create new result array
518
518
  result = rb_ary_new();
@@ -520,7 +520,7 @@ static VALUE aspell_correct_lines(VALUE self, VALUE ary) {
520
520
  while(c<count) {
521
521
  int offset=0;
522
522
  //fetch line
523
- vline = RARRAY(ary)->ptr[c];
523
+ vline = RARRAY_PTR(ary)[c];
524
524
  //save line
525
525
  sline = rb_funcall(vline, rb_intern("dup"), 0);
526
526
  //c representation
@@ -607,12 +607,12 @@ static VALUE aspell_list_misspelled(VALUE self, VALUE ary) {
607
607
  AspellDocumentChecker * checker = get_checker(speller);
608
608
  AspellToken token;
609
609
  VALUE word, vline;
610
- int count=RARRAY(ary)->len;
610
+ int count=RARRAY_LEN(ary);
611
611
  int c=0;
612
612
  //iterate over array
613
613
  while(c<count) {
614
614
  //process line
615
- vline = RARRAY(ary)->ptr[c];
615
+ vline = RARRAY_PTR(ary)[c];
616
616
  aspell_document_checker_process(checker, STR2CSTR(vline), -1);
617
617
  //iterate over all misspelled words
618
618
  while (token = aspell_document_checker_next_misspelling(checker), token.len != 0) {
data/raspell.gemspec CHANGED
@@ -1,37 +1,33 @@
1
-
2
- # Gem::Specification for Raspell-1.1
3
- # Originally generated by Echoe
1
+ # -*- encoding: utf-8 -*-
4
2
 
5
3
  Gem::Specification.new do |s|
6
4
  s.name = %q{raspell}
7
- s.version = "1.1"
8
- s.date = %q{2007-08-12}
9
- s.summary = %q{An interface binding for the Aspell spelling checker.}
10
- s.require_paths = ["lib", "ext"]
11
- s.email = %q{}
12
- s.homepage = %q{http://blog.evanweaver.com/pages/code#raspell}
13
- s.rubyforge_project = %q{fauna}
14
- s.description = %q{An interface binding for the Aspell spelling checker.}
5
+ s.version = "1.2"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
15
8
  s.authors = [""]
16
- s.files = ["test/simple_test.rb", "lib/raspell_stub.rb", "ext/raspell.h", "ext/raspell.c", "ext/extconf.rb", "README", "LICENSE", "CHANGELOG", "raspell.gemspec"]
9
+ s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
10
+ s.date = %q{2011-01-30}
11
+ s.description = %q{An interface binding for the Aspell spelling checker.}
12
+ s.email = %q{}
17
13
  s.extensions = ["ext/extconf.rb"]
18
- end
14
+ s.extra_rdoc_files = ["lib/raspell_stub.rb", "README", "LICENSE", "CHANGELOG"]
15
+ s.files = ["test/simple_test.rb", "lib/raspell_stub.rb", "ext/raspell.h", "ext/raspell.c", "ext/extconf.rb", "README", "LICENSE", "CHANGELOG", "raspell.gemspec", "Rakefile"]
16
+ s.homepage = %q{http://blog.evanweaver.com/files/doc/fauna/raspell/}
17
+ s.require_paths = ["lib", "ext"]
18
+ s.rubyforge_project = %q{fauna}
19
+ s.rubygems_version = %q{1.3.7}
20
+ s.signing_key = %q{/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-private_key.pem}
21
+ s.summary = %q{An interface binding for the Aspell spelling checker.}
22
+ s.test_files = ["test/simple_test.rb"]
19
23
 
24
+ if s.respond_to? :specification_version then
25
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
26
+ s.specification_version = 3
20
27
 
21
- # # Original Rakefile source (requires the Echoe gem):
22
- #
23
- #
24
- # require 'rubygems'
25
- # gem 'echoe', '>=2.3'
26
- # require 'echoe'
27
- #
28
- # Echoe.new("raspell") do |p|
29
- # p.rubyforge_name = "fauna"
30
- # p.summary = "An interface binding for the Aspell spelling checker."
31
- # p.url = "http://blog.evanweaver.com/pages/code#raspell"
32
- # p.docs_host = "blog.evanweaver.com:~/www/snax/public/files/doc/"
33
- #
34
- # p.has_rdoc = false # avoids warnings on gem install
35
- # p.rdoc_pattern = /CHANGELOG|EXAMPLE|LICENSE|README|lib/
36
- # p.rdoc_options = [] # don't want to include the stubbed out source
37
- # end
28
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
29
+ else
30
+ end
31
+ else
32
+ end
33
+ end
data/test/simple_test.rb CHANGED
@@ -22,8 +22,8 @@ class TestSpell < Test::Unit::TestCase
22
22
 
23
23
  def test_suggest
24
24
  suggestions = @aspell.suggest("spel")
25
- assert_equal(["spell", "spiel", "spew", "Opel", "spec", "sped"],
26
- suggestions)
25
+ assert_equal [],
26
+ ["spell", "spiel", "spew", "Opel", "spec", "sped"] - suggestions
27
27
  end
28
28
 
29
29
  def test_check
metadata CHANGED
@@ -1,34 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4
3
- specification_version: 1
4
2
  name: raspell
5
3
  version: !ruby/object:Gem::Version
6
- version: "1.1"
7
- date: 2007-08-12 00:00:00 -04:00
8
- summary: An interface binding for the Aspell spelling checker.
9
- require_paths:
10
- - lib
11
- - ext
12
- email: ""
13
- homepage: http://blog.evanweaver.com/pages/code#raspell
14
- rubyforge_project: fauna
15
- description: An interface binding for the Aspell spelling checker.
16
- autorequire:
17
- default_executable:
18
- bindir: bin
19
- has_rdoc: false
20
- required_ruby_version: !ruby/object:Gem::Version::Requirement
21
- requirements:
22
- - - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
25
- version:
4
+ hash: 11
5
+ prerelease: false
6
+ segments:
7
+ - 1
8
+ - 2
9
+ version: "1.2"
26
10
  platform: ruby
27
- signing_key:
28
- cert_chain:
29
- post_install_message:
30
11
  authors:
31
12
  - ""
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain:
16
+ - |
17
+ -----BEGIN CERTIFICATE-----
18
+ MIIDLjCCAhagAwIBAgIBADANBgkqhkiG9w0BAQUFADA9MQ0wCwYDVQQDDARldmFu
19
+ MRgwFgYKCZImiZPyLGQBGRYIY2xvdWRidXIxEjAQBgoJkiaJk/IsZAEZFgJzdDAe
20
+ Fw0wNzA5MTYxMDMzMDBaFw0wODA5MTUxMDMzMDBaMD0xDTALBgNVBAMMBGV2YW4x
21
+ GDAWBgoJkiaJk/IsZAEZFghjbG91ZGJ1cjESMBAGCgmSJomT8ixkARkWAnN0MIIB
22
+ IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5C0Io89nyApnr+PvbNFge9Vs
23
+ yRWAlGBUEMahpXp28VrrfXZT0rAW7JBo4PlCE3jl4nE4dzE6gAdItSycjTosrw7A
24
+ Ir5+xoyl4Vb35adv56TIQQXvNz+BzlqnkAY5JN0CSBRTQb6mxS3hFyD/h4qgDosj
25
+ R2RFVzHqSxCS8xq4Ny8uzOwOi+Xyu4w67fI5JvnPvMxqrlR1eaIQHmxnf76RzC46
26
+ QO5QhufjAYGGXd960XzbQsQyTDUYJzrvT7AdOfiyZzKQykKt8dEpDn+QPjFTnGnT
27
+ QmgJBX5WJN0lHF2l1sbv3gh4Kn1tZu+kTUqeXY6ShAoDTyvZRiFqQdwh8w2lTQID
28
+ AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU+WqJz3xQ
29
+ XSea1hRvvHWcIMgeeC4wDQYJKoZIhvcNAQEFBQADggEBAGLZ75jfOEW8Nsl26CTt
30
+ JFrWxQTcQT/UljeefVE3xYr7lc9oQjbqO3FOyued3qW7TaNEtZfSHoYeUSMYbpw1
31
+ XAwocIPuSRFDGM4B+hgQGVDx8PMGiJKom4qLXjO40UZsR7QyN/u869Vj45LURm6h
32
+ MBcPeqCASI+WNprj9+uZa2kmHiitrFqqfMBNlm5IFbn9XeYSta9AHVvs5QQqV2m5
33
+ hIPfLqCyxsn/YgOGvo6iwyQTWyTswamaAC3HRWZxIS1sfn/Ssqa7E7oQMkv5FAXr
34
+ x5rKePfXINf8XTJczkl9OBEYdE9aNdJsJpXD0asLgGVwBICS5Bjohp6mizJcDC1+
35
+ yZ0=
36
+ -----END CERTIFICATE-----
37
+
38
+ date: 2011-01-30 00:00:00 -08:00
39
+ default_executable:
40
+ dependencies: []
41
+
42
+ description: An interface binding for the Aspell spelling checker.
43
+ email: ""
44
+ executables: []
45
+
46
+ extensions:
47
+ - ext/extconf.rb
48
+ extra_rdoc_files:
49
+ - lib/raspell_stub.rb
50
+ - README
51
+ - LICENSE
52
+ - CHANGELOG
32
53
  files:
33
54
  - test/simple_test.rb
34
55
  - lib/raspell_stub.rb
@@ -39,17 +60,42 @@ files:
39
60
  - LICENSE
40
61
  - CHANGELOG
41
62
  - raspell.gemspec
42
- test_files: []
63
+ - Rakefile
64
+ has_rdoc: true
65
+ homepage: http://blog.evanweaver.com/files/doc/fauna/raspell/
66
+ licenses: []
43
67
 
68
+ post_install_message:
44
69
  rdoc_options: []
45
70
 
46
- extra_rdoc_files: []
47
-
48
- executables: []
49
-
50
- extensions:
51
- - ext/extconf.rb
71
+ require_paths:
72
+ - lib
73
+ - ext
74
+ required_ruby_version: !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ hash: 3
80
+ segments:
81
+ - 0
82
+ version: "0"
83
+ required_rubygems_version: !ruby/object:Gem::Requirement
84
+ none: false
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ hash: 11
89
+ segments:
90
+ - 1
91
+ - 2
92
+ version: "1.2"
52
93
  requirements: []
53
94
 
54
- dependencies: []
55
-
95
+ rubyforge_project: fauna
96
+ rubygems_version: 1.3.7
97
+ signing_key:
98
+ specification_version: 3
99
+ summary: An interface binding for the Aspell spelling checker.
100
+ test_files:
101
+ - test/simple_test.rb
metadata.gz.sig ADDED
Binary file