zbar 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/zbar/lib.rb +13 -1
- data/zbar.gemspec +1 -1
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/lib/zbar/lib.rb
CHANGED
@@ -1,6 +1,18 @@
|
|
1
1
|
module ZBar
|
2
2
|
extend FFI::Library
|
3
|
-
|
3
|
+
|
4
|
+
paths =
|
5
|
+
Array(
|
6
|
+
ENV['ZBAR_LIB'] ||
|
7
|
+
Dir['/{opt,usr}/{,local/}lib{,64}/libzbar.{dylib,so*}']
|
8
|
+
)
|
9
|
+
begin
|
10
|
+
ffi_lib(*paths)
|
11
|
+
rescue LoadError => le
|
12
|
+
raise LoadError,
|
13
|
+
"didn't find libzbar on your system. " +
|
14
|
+
"Please install zbar (http://zbar.sourceforge.net/)"
|
15
|
+
end
|
4
16
|
|
5
17
|
attach_function :zbar_symbol_get_type, [:pointer], :int
|
6
18
|
attach_function :zbar_symbol_get_data, [:pointer], :string
|
data/zbar.gemspec
CHANGED