zxing 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
File without changes
@@ -0,0 +1,3 @@
1
+ Thread.new do
2
+ loop { puts "yay" }
3
+ end.join
@@ -0,0 +1,164 @@
1
+ !RBIX
2
+ 2390329161478264409
3
+ x
4
+ M
5
+ 1
6
+ n
7
+ n
8
+ x
9
+ 10
10
+ __script__
11
+ i
12
+ 14
13
+ 45
14
+ 0
15
+ 1
16
+ 56
17
+ 2
18
+ 50
19
+ 3
20
+ 0
21
+ 49
22
+ 4
23
+ 0
24
+ 15
25
+ 2
26
+ 11
27
+ I
28
+ 2
29
+ I
30
+ 0
31
+ I
32
+ 0
33
+ I
34
+ 0
35
+ n
36
+ p
37
+ 5
38
+ x
39
+ 6
40
+ Thread
41
+ n
42
+ M
43
+ 1
44
+ p
45
+ 2
46
+ x
47
+ 9
48
+ for_block
49
+ t
50
+ n
51
+ x
52
+ 9
53
+ __block__
54
+ i
55
+ 8
56
+ 5
57
+ 56
58
+ 0
59
+ 47
60
+ 50
61
+ 1
62
+ 0
63
+ 11
64
+ I
65
+ 3
66
+ I
67
+ 0
68
+ I
69
+ 0
70
+ I
71
+ 0
72
+ I
73
+ -2
74
+ p
75
+ 2
76
+ M
77
+ 1
78
+ p
79
+ 2
80
+ x
81
+ 9
82
+ for_block
83
+ t
84
+ n
85
+ x
86
+ 9
87
+ __block__
88
+ i
89
+ 9
90
+ 5
91
+ 7
92
+ 0
93
+ 64
94
+ 47
95
+ 49
96
+ 1
97
+ 1
98
+ 11
99
+ I
100
+ 3
101
+ I
102
+ 0
103
+ I
104
+ 0
105
+ I
106
+ 0
107
+ I
108
+ -2
109
+ p
110
+ 2
111
+ s
112
+ 3
113
+ yay
114
+ x
115
+ 4
116
+ puts
117
+ p
118
+ 3
119
+ I
120
+ 0
121
+ I
122
+ 2
123
+ I
124
+ 9
125
+ x
126
+ 49
127
+ /Users/ncrespo/Developer/ruby/ruby/zxing/lib/a.rb
128
+ p
129
+ 0
130
+ x
131
+ 4
132
+ loop
133
+ p
134
+ 3
135
+ I
136
+ 0
137
+ I
138
+ 2
139
+ I
140
+ 8
141
+ x
142
+ 49
143
+ /Users/ncrespo/Developer/ruby/ruby/zxing/lib/a.rb
144
+ p
145
+ 0
146
+ x
147
+ 3
148
+ new
149
+ x
150
+ 4
151
+ join
152
+ p
153
+ 3
154
+ I
155
+ 0
156
+ I
157
+ 1
158
+ I
159
+ e
160
+ x
161
+ 49
162
+ /Users/ncrespo/Developer/ruby/ruby/zxing/lib/a.rb
163
+ p
164
+ 0
@@ -1126,7 +1126,7 @@ x
1126
1126
  10
1127
1127
  decode_all
1128
1128
  i
1129
- 48
1129
+ 49
1130
1130
  26
1131
1131
  93
1132
1132
  0
@@ -1143,7 +1143,7 @@ i
1143
1143
  1
1144
1144
  30
1145
1145
  8
1146
- 44
1146
+ 45
1147
1147
  26
1148
1148
  93
1149
1149
  1
@@ -1160,12 +1160,13 @@ i
1160
1160
  10
1161
1161
  34
1162
1162
  8
1163
- 39
1163
+ 40
1164
1164
  15
1165
- 1
1165
+ 35
1166
+ 0
1166
1167
  25
1167
1168
  8
1168
- 44
1169
+ 45
1169
1170
  15
1170
1171
  92
1171
1172
  1
@@ -1219,11 +1220,11 @@ I
1219
1220
  I
1220
1221
  2f
1221
1222
  I
1222
- 2c
1223
+ 2d
1223
1224
  I
1224
1225
  0
1225
1226
  I
1226
- 30
1227
+ 31
1227
1228
  x
1228
1229
  61
1229
1230
  /Users/ncrespo/Developer/ruby/ruby/zxing/lib/zxing/decoder.rb
@@ -17,12 +17,11 @@ if RUBY_PLATFORM == 'java'
17
17
 
18
18
  private
19
19
  def self.abort_on_parent_exit!
20
- Thread.new do
21
- begin
22
- STDIN.read
23
- rescue IOError
24
- exit
25
- end
20
+ Thread.new(Thread.current) do |parent|
21
+ loop {
22
+ exit unless parent.alive?
23
+ sleep 0.5
24
+ }
26
25
  end
27
26
  end
28
27
  end
@@ -1,3 +1,3 @@
1
1
  module ZXing
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
@@ -3494,14 +3494,13 @@ x
3494
3494
  9
3495
3495
  __block__
3496
3496
  i
3497
- 9
3498
- 5
3497
+ 8
3499
3498
  5
3500
3499
  48
3501
3500
  0
3502
- 47
3503
- 49
3504
- 1
3501
+ 35
3502
+ 0
3503
+ 83
3505
3504
  1
3506
3505
  11
3507
3506
  I
@@ -3518,10 +3517,10 @@ p
3518
3517
  2
3519
3518
  x
3520
3519
  6
3521
- be_nil
3522
- x
3523
- 6
3524
3520
  should
3521
+ x
3522
+ 2
3523
+ ==
3525
3524
  p
3526
3525
  3
3527
3526
  I
@@ -3529,7 +3528,7 @@ I
3529
3528
  I
3530
3529
  5d
3531
3530
  I
3532
- 9
3531
+ 8
3533
3532
  x
3534
3533
  59
3535
3534
  /Users/ncrespo/Developer/ruby/ruby/zxing/spec/zxing_spec.rb
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zxing
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - ecin
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-08-12 00:00:00 -04:00
19
+ date: 2011-08-18 00:00:00 -04:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -95,30 +95,28 @@ extra_rdoc_files: []
95
95
  files:
96
96
  - bin/zxing
97
97
  - bin/zxing.compiled.rbc
98
- - lib/zxing.rb
99
- - lib/zxing.rbc
100
- - lib/zxing.rb~
98
+ - lib/a.rb
99
+ - lib/a.rbc
101
100
  - lib/zxing/client.rb
102
101
  - lib/zxing/client.rbc
103
102
  - lib/zxing/core.jar
104
103
  - lib/zxing/decodable.rb
105
- - lib/zxing/decodable.rbc
106
- - lib/zxing/decodable.rb~
107
104
  - lib/zxing/decoder.rb
108
105
  - lib/zxing/decoder.rbc
109
106
  - lib/zxing/javase.jar
110
107
  - lib/zxing/server.rb
111
108
  - lib/zxing/version.rb
112
109
  - lib/zxing/version.rbc
113
- - spec/spec_helper.rb
114
- - spec/spec_helper.rbc
115
- - spec/zxing_spec.rb
116
- - spec/zxing_spec.rbc
110
+ - lib/zxing.rb
111
+ - lib/zxing.rbc
117
112
  - spec/fixtures/cat.png
118
113
  - spec/fixtures/example.png
119
114
  - spec/fixtures/multi_barcode_example.png
115
+ - spec/spec_helper.rb
116
+ - spec/spec_helper.rbc
120
117
  - spec/zxing/decodable_spec.rb
121
- - spec/zxing/decodable_spec.rbc
118
+ - spec/zxing_spec.rb
119
+ - spec/zxing_spec.rbc
122
120
  - README.rdoc
123
121
  has_rdoc: true
124
122
  homepage: http://github.com/ecin/zxing.rb
@@ -150,17 +148,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
150
148
  requirements: []
151
149
 
152
150
  rubyforge_project: zxing
153
- rubygems_version: 1.5.2
151
+ rubygems_version: 1.6.2
154
152
  signing_key:
155
153
  specification_version: 3
156
154
  summary: JRuby wrapper for ZXing 1D/2D barcode image processing library.
157
155
  test_files:
158
- - spec/spec_helper.rb
159
- - spec/spec_helper.rbc
160
- - spec/zxing_spec.rb
161
- - spec/zxing_spec.rbc
162
156
  - spec/fixtures/cat.png
163
157
  - spec/fixtures/example.png
164
158
  - spec/fixtures/multi_barcode_example.png
159
+ - spec/spec_helper.rb
160
+ - spec/spec_helper.rbc
165
161
  - spec/zxing/decodable_spec.rb
166
- - spec/zxing/decodable_spec.rbc
162
+ - spec/zxing_spec.rb
163
+ - spec/zxing_spec.rbc
@@ -1,54 +0,0 @@
1
- raise "ZXing requires JRuby" unless defined?(JRuby)
2
-
3
- require File.expand_path( File.dirname(__FILE__) + '/core.jar' ) # ZXing core classes
4
- require File.expand_path( File.dirname(__FILE__) + '/javase.jar' ) # ZXing JavaSE classes
5
-
6
- require 'uri'
7
-
8
- # Google ZXing classes
9
- java_import com.google.zxing.MultiFormatReader
10
- java_import com.google.zxing.BinaryBitmap
11
- java_import com.google.zxing.Binarizer
12
- java_import com.google.zxing.common.GlobalHistogramBinarizer
13
- java_import com.google.zxing.LuminanceSource
14
- java_import com.google.zxing.client.j2se.BufferedImageLuminanceSource
15
-
16
- # Standard Java classes
17
- java_import javax.imageio.ImageIO
18
- java_import java.net.URL
19
-
20
- module ZXing
21
-
22
- @@decoder = MultiFormatReader.new
23
-
24
- # Transform the module into a singleton!
25
- extend self
26
-
27
- def decode(descriptor)
28
- begin
29
- decode!(descriptor)
30
- rescue NativeException
31
- return nil
32
- end
33
- end
34
-
35
- def decode!(descriptor)
36
- descriptor = case descriptor
37
- when URI.regexp(['http', 'https'])
38
- URL.new(descriptor)
39
- else
40
- Java::JavaIO::File.new(descriptor)
41
- end
42
- image = ImageIO.read(descriptor)
43
- bitmap = to_bitmap(image)
44
- @@decoder.decode(bitmap).to_s
45
- end
46
-
47
- private
48
-
49
- def to_bitmap(image)
50
- luminance = BufferedImageLuminanceSource.new(image)
51
- binarizer = GlobalHistogramBinarizer.new(luminance)
52
- BinaryBitmap.new(binarizer)
53
- end
54
- end
@@ -1,424 +0,0 @@
1
- !RBIX
2
- 2390329161478264409
3
- x
4
- M
5
- 1
6
- n
7
- n
8
- x
9
- 10
10
- __script__
11
- i
12
- 37
13
- 5
14
- 7
15
- 0
16
- 64
17
- 47
18
- 49
19
- 1
20
- 1
21
- 15
22
- 99
23
- 7
24
- 2
25
- 65
26
- 49
27
- 3
28
- 2
29
- 13
30
- 99
31
- 12
32
- 7
33
- 4
34
- 12
35
- 7
36
- 5
37
- 12
38
- 65
39
- 12
40
- 49
41
- 6
42
- 4
43
- 15
44
- 49
45
- 4
46
- 0
47
- 15
48
- 2
49
- 11
50
- I
51
- 6
52
- I
53
- 0
54
- I
55
- 0
56
- I
57
- 0
58
- n
59
- p
60
- 7
61
- s
62
- 5
63
- zxing
64
- x
65
- 7
66
- require
67
- x
68
- 9
69
- Decodable
70
- x
71
- 11
72
- open_module
73
- x
74
- 15
75
- __module_init__
76
- M
77
- 1
78
- n
79
- n
80
- x
81
- 9
82
- Decodable
83
- i
84
- 58
85
- 5
86
- 66
87
- 99
88
- 7
89
- 0
90
- 7
91
- 1
92
- 65
93
- 67
94
- 49
95
- 2
96
- 0
97
- 49
98
- 3
99
- 4
100
- 15
101
- 99
102
- 7
103
- 4
104
- 7
105
- 5
106
- 65
107
- 67
108
- 49
109
- 2
110
- 0
111
- 49
112
- 3
113
- 4
114
- 15
115
- 99
116
- 7
117
- 6
118
- 7
119
- 7
120
- 65
121
- 67
122
- 49
123
- 2
124
- 0
125
- 49
126
- 3
127
- 4
128
- 15
129
- 99
130
- 7
131
- 8
132
- 7
133
- 9
134
- 65
135
- 67
136
- 49
137
- 2
138
- 0
139
- 49
140
- 3
141
- 4
142
- 11
143
- I
144
- 5
145
- I
146
- 0
147
- I
148
- 0
149
- I
150
- 0
151
- n
152
- p
153
- 10
154
- x
155
- 6
156
- decode
157
- M
158
- 1
159
- n
160
- n
161
- x
162
- 6
163
- decode
164
- i
165
- 8
166
- 45
167
- 0
168
- 1
169
- 5
170
- 49
171
- 2
172
- 1
173
- 11
174
- I
175
- 2
176
- I
177
- 0
178
- I
179
- 0
180
- I
181
- 0
182
- n
183
- p
184
- 3
185
- x
186
- 5
187
- ZXing
188
- n
189
- x
190
- 6
191
- decode
192
- p
193
- 5
194
- I
195
- -1
196
- I
197
- 4
198
- I
199
- 0
200
- I
201
- 5
202
- I
203
- 8
204
- x
205
- 63
206
- /Users/ncrespo/Developer/ruby/ruby/zxing/lib/zxing/decodable.rb
207
- p
208
- 0
209
- x
210
- 17
211
- method_visibility
212
- x
213
- 15
214
- add_defn_method
215
- x
216
- 7
217
- decode!
218
- M
219
- 1
220
- n
221
- n
222
- x
223
- 7
224
- decode!
225
- i
226
- 8
227
- 45
228
- 0
229
- 1
230
- 5
231
- 49
232
- 2
233
- 1
234
- 11
235
- I
236
- 2
237
- I
238
- 0
239
- I
240
- 0
241
- I
242
- 0
243
- n
244
- p
245
- 3
246
- x
247
- 5
248
- ZXing
249
- n
250
- x
251
- 7
252
- decode!
253
- p
254
- 5
255
- I
256
- -1
257
- I
258
- 8
259
- I
260
- 0
261
- I
262
- 9
263
- I
264
- 8
265
- x
266
- 63
267
- /Users/ncrespo/Developer/ruby/ruby/zxing/lib/zxing/decodable.rb
268
- p
269
- 0
270
- x
271
- 10
272
- decode_all
273
- M
274
- 1
275
- n
276
- n
277
- x
278
- 10
279
- decode_all
280
- i
281
- 8
282
- 45
283
- 0
284
- 1
285
- 5
286
- 49
287
- 2
288
- 1
289
- 11
290
- I
291
- 2
292
- I
293
- 0
294
- I
295
- 0
296
- I
297
- 0
298
- n
299
- p
300
- 3
301
- x
302
- 5
303
- ZXing
304
- n
305
- x
306
- 10
307
- decode_all
308
- p
309
- 5
310
- I
311
- -1
312
- I
313
- c
314
- I
315
- 0
316
- I
317
- d
318
- I
319
- 8
320
- x
321
- 63
322
- /Users/ncrespo/Developer/ruby/ruby/zxing/lib/zxing/decodable.rb
323
- p
324
- 0
325
- x
326
- 11
327
- decode_all!
328
- M
329
- 1
330
- n
331
- n
332
- x
333
- 11
334
- decode_all!
335
- i
336
- 8
337
- 45
338
- 0
339
- 1
340
- 5
341
- 49
342
- 2
343
- 1
344
- 11
345
- I
346
- 2
347
- I
348
- 0
349
- I
350
- 0
351
- I
352
- 0
353
- n
354
- p
355
- 3
356
- x
357
- 5
358
- ZXing
359
- n
360
- x
361
- 11
362
- decode_all!
363
- p
364
- 5
365
- I
366
- -1
367
- I
368
- 10
369
- I
370
- 0
371
- I
372
- 11
373
- I
374
- 8
375
- x
376
- 63
377
- /Users/ncrespo/Developer/ruby/ruby/zxing/lib/zxing/decodable.rb
378
- p
379
- 0
380
- p
381
- 9
382
- I
383
- 2
384
- I
385
- 4
386
- I
387
- 10
388
- I
389
- 8
390
- I
391
- 1e
392
- I
393
- c
394
- I
395
- 2c
396
- I
397
- 10
398
- I
399
- 3a
400
- x
401
- 63
402
- /Users/ncrespo/Developer/ruby/ruby/zxing/lib/zxing/decodable.rb
403
- p
404
- 0
405
- x
406
- 13
407
- attach_method
408
- p
409
- 5
410
- I
411
- 0
412
- I
413
- 1
414
- I
415
- 9
416
- I
417
- 3
418
- I
419
- 25
420
- x
421
- 63
422
- /Users/ncrespo/Developer/ruby/ruby/zxing/lib/zxing/decodable.rb
423
- p
424
- 0