zint 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/CHANGELOG +1 -0
  2. data/lib/zint/version.rb +1 -1
  3. data/lib/zint/wrapper.rb +18 -18
  4. metadata +21 -20
@@ -0,0 +1 @@
1
+ v0.0.2 - fixed windows support by using ffi_lib "zint" instead of "libzint"
@@ -1,3 +1,3 @@
1
1
  module Zint
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -1,5 +1,5 @@
1
- module Zint
2
-
1
+ module Zint
2
+
3
3
  # Symbologies
4
4
  BARCODE_CODE11 = 1
5
5
  BARCODE_C25MATRIX = 2
@@ -85,14 +85,14 @@ module Zint
85
85
  BARCODE_CHANNEL = 140
86
86
  BARCODE_CODEONE = 141
87
87
  BARCODE_GRIDMATRIX = 142
88
-
88
+
89
89
  # barcode output options
90
90
  BARCODE_NO_ASCII = 1
91
91
  BARCODE_BIND = 2
92
92
  BARCODE_BOX = 4
93
-
94
- # Even thought this an option, it foobar's
95
- # Ruby's $stdout handle. Don't use it.
93
+
94
+ # Even thought this an option, it foobar's
95
+ # Ruby's $stdout handle. Don't use it.
96
96
  # BARCODE_STDOUT = 8
97
97
  BARCODE_READER_INIT = 16
98
98
 
@@ -114,12 +114,12 @@ module Zint
114
114
  :error_encoding_problem => 9 ,
115
115
  :error_file_access => 10,
116
116
  :error_memory => 11}
117
-
118
- # This is the FFI wrapper on the Zint C library. You should not use
119
- # this directly. Instead refer to Zint::Barcode and its decendents
117
+
118
+ # This is the FFI wrapper on the Zint C library. You should not use
119
+ # this directly. Instead refer to Zint::Barcode and its decendents
120
120
  module Wrapper
121
121
  extend FFI::Library
122
- ffi_lib "libzint"
122
+ ffi_lib "zint"
123
123
 
124
124
  #error codes
125
125
  enum :err, [:warn_invalid_option, 2,
@@ -141,20 +141,20 @@ module Zint
141
141
  attach_function(:zint_create, :ZBarcode_Create, [], :zint_symbol)
142
142
  attach_function(:zint_clear, :ZBarcode_Clear, [:zint_symbol], :void)
143
143
  attach_function(:zint_delete, :ZBarcode_Delete, [:zint_symbol], :void)
144
- attach_function(:zint_encode, :ZBarcode_Encode,
145
- [:zint_symbol, :input, :string_max_length],
144
+ attach_function(:zint_encode, :ZBarcode_Encode,
145
+ [:zint_symbol, :input, :string_max_length],
146
146
  :err)
147
- attach_function(:zint_print, :ZBarcode_Print,
148
- [:zint_symbol, :rotate_angle],
147
+ attach_function(:zint_print, :ZBarcode_Print,
148
+ [:zint_symbol, :rotate_angle],
149
149
  :err)
150
- attach_function(:zint_encode_and_print, :ZBarcode_Encode_and_Print,
151
- [:zint_symbol, :input, :string_max_length,
150
+ attach_function(:zint_encode_and_print, :ZBarcode_Encode_and_Print,
151
+ [:zint_symbol, :input, :string_max_length,
152
152
  :rotate_angle], :err)
153
153
 
154
154
  def self.create(bctype=BARCODE_CODE128)
155
155
  bc = Zint::ZintSymbol.new(self.zint_create())
156
- bc[:symbology] = bctype
156
+ bc[:symbology] = bctype
157
157
  return bc
158
158
  end
159
159
  end
160
- end
160
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zint
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 27
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 2
10
+ version: 0.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Angel Pizarro
@@ -15,11 +15,13 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-19 00:00:00 +00:00
18
+ date: 2011-04-04 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
+ name: ffi
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
23
25
  none: false
24
26
  requirements:
25
27
  - - ~>
@@ -29,12 +31,12 @@ dependencies:
29
31
  - 0
30
32
  - 6
31
33
  version: "0.6"
32
- requirement: *id001
33
34
  type: :runtime
34
- name: ffi
35
- prerelease: false
35
+ version_requirements: *id001
36
36
  - !ruby/object:Gem::Dependency
37
- version_requirements: &id002 !ruby/object:Gem::Requirement
37
+ name: bundler
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
38
40
  none: false
39
41
  requirements:
40
42
  - - ~>
@@ -44,12 +46,12 @@ dependencies:
44
46
  - 1
45
47
  - 0
46
48
  version: "1.0"
47
- requirement: *id002
48
49
  type: :development
49
- name: bundler
50
- prerelease: false
50
+ version_requirements: *id002
51
51
  - !ruby/object:Gem::Dependency
52
- version_requirements: &id003 !ruby/object:Gem::Requirement
52
+ name: shoulda
53
+ prerelease: false
54
+ requirement: &id003 !ruby/object:Gem::Requirement
53
55
  none: false
54
56
  requirements:
55
57
  - - ~>
@@ -59,12 +61,12 @@ dependencies:
59
61
  - 2
60
62
  - 11
61
63
  version: "2.11"
62
- requirement: *id003
63
64
  type: :development
64
- name: shoulda
65
- prerelease: false
65
+ version_requirements: *id003
66
66
  - !ruby/object:Gem::Dependency
67
- version_requirements: &id004 !ruby/object:Gem::Requirement
67
+ name: yard
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
68
70
  none: false
69
71
  requirements:
70
72
  - - ">="
@@ -73,10 +75,8 @@ dependencies:
73
75
  segments:
74
76
  - 0
75
77
  version: "0"
76
- requirement: *id004
77
78
  type: :development
78
- name: yard
79
- prerelease: false
79
+ version_requirements: *id004
80
80
  description: Ruby FFI wrapper on Zint barcode library. See README for more details
81
81
  email: angel@delagoya.com
82
82
  executables: []
@@ -87,6 +87,7 @@ extra_rdoc_files: []
87
87
 
88
88
  files:
89
89
  - .gitignore
90
+ - CHANGELOG
90
91
  - Gemfile
91
92
  - README.rdoc
92
93
  - Rakefile