zint 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +33 -34
  3. data/lib/zint/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1508fa649df06932175af81a1fa92f79d0de5619865ba29c6280f44543254b75
4
- data.tar.gz: 82daace232a11917dba9ba2eb3d0893207520df6392b4f05b09047fbae0014f6
3
+ metadata.gz: b2c9c7adfbf1c0484fdeacc502bf260d2bc12f52a47981825ca33680a9b847eb
4
+ data.tar.gz: 90ca1024e6ec6e53a6dd4fc79cb687ae9ff01461a8bc447b6ad9f559b0968353
5
5
  SHA512:
6
- metadata.gz: e3bcd0124821f6a21ff710bd49923357f716ee62663ac23c614a7eda5586523052f1f847f132c578432f9a5db4c531f4c53799c3041d7d9f5add52f9fe7ba702
7
- data.tar.gz: 58c8b73b84a7d99c7169606a89c03369cf5a671b20f4d5c24d94bf1daa696680051df1b5419f19b2815104f42ce9790f9be3fce094ce7dfc3e2f1b5d4814442b
6
+ metadata.gz: 754e6e1d9810aeb87392ccb70c253360693d294e8a3f0a861ee92ba78793be2700eecd0ecbec3b00daedeeaa1e00f74f79bcc7e5f2a93a92768df51aeca7d4d6
7
+ data.tar.gz: 7f62453605698c8a7223c0e21ad9e9c6cf4f1ba0f72e50c520ba330e259fc6b91601cbfaa227c087bb5c15e2202d876cf090327aa84f13c00ba8a8e72572f2f9
data/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
 
2
- = Zint
2
+ # Zint
3
3
 
4
4
  This is a Ruby FFI wrapper for the Zint barcode generation library (http://www.zint.org.uk).
5
5
 
6
- == Installing Zint
6
+ ## Installing Zint
7
7
 
8
8
  For OS X leverage the [Homebrew](https://brew.sh)
9
9
 
@@ -15,41 +15,40 @@ Other platforms require building [from source](https://sourceforge.net/projects/
15
15
 
16
16
  **NOTE:** We assume that you are using Zint version [2.6.3_rc2](https://sourceforge.net/projects/zint/files/zint/2.6.3/) but future releases should work well enough.
17
17
 
18
- == Installation
18
+ ## Installation
19
19
 
20
20
  As mentioned, <b> you must install zint</b> to be able to use this gem. Once that dependency is satisfied, then you can just do the usual gem install.
21
21
 
22
- ```sh
22
+ ```bash
23
23
  gem install zint
24
-
25
24
  ```
26
25
 
27
- == Usage
28
-
29
- Summary
30
-
31
- require 'zint'
32
- # Create a code-128 barcode
33
- bc = Zint::Barcode.new("test")
34
- bc.print! # file is now on relative path "out.png"
35
- bc.path = "my_bc.png"
36
- bc.print! # file is now on relative path "my_bc.png"
37
- bc.path = "my_bc.svg"
38
- bc.print!
39
- bc.print! # file is now on relative path "my_bc.svg"
40
-
41
- # create a qrcode
42
- qrcode = Zint::Barcode.new("test", Zint::BARCODE_QRCODE)
43
- qrcode.path = "qrcode.png"
44
- qrcode.print! # file is now on relative path "qrcode.png"
45
- qrcode_string = qrcode.buffer!
46
- puts qrcode_string
47
-
48
- #QRCode with more options, specifically set a high error correction capacity
49
- qrcode = Zint::QRCode.new("test", Zint::QRCode::ECC_H)
50
- qrcode.path = "qrcode.ecc_h.png"
51
- qrcode.print! # file is now on relative path "qrcode.ecc_h.png"
52
- # encode barcode as text
53
- qrcode.path = "qrcode.ecc_h.txt"
54
- puts qrcode.buffer!
55
-
26
+ ## Usage
27
+
28
+
29
+ ```ruby
30
+ require 'zint'
31
+ # Create a code-128 barcode
32
+ bc = Zint::Barcode.new("test")
33
+ bc.print! # file is now on relative path "out.png"
34
+ bc.path = "my_bc.png"
35
+ bc.print! # file is now on relative path "my_bc.png"
36
+ bc.path = "my_bc.svg"
37
+ bc.print!
38
+ bc.print! # file is now on relative path "my_bc.svg"
39
+
40
+ # create a qrcode
41
+ qrcode = Zint::Barcode.new("test", Zint::BARCODE_QRCODE)
42
+ qrcode.path = "qrcode.png"
43
+ qrcode.print! # file is now on relative path "qrcode.png"
44
+ qrcode_string = qrcode.buffer!
45
+ puts qrcode_string
46
+
47
+ #QRCode with more options, specifically set a high error correction capacity
48
+ qrcode = Zint::QRCode.new("test", Zint::QRCode::ECC_H)
49
+ qrcode.path = "qrcode.ecc_h.png"
50
+ qrcode.print! # file is now on relative path "qrcode.ecc_h.png"
51
+ # encode barcode as text
52
+ qrcode.path = "qrcode.ecc_h.txt"
53
+ puts qrcode.buffer!
54
+ ```
@@ -1,3 +1,3 @@
1
1
  module Zint
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angel Pizarro
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-04 00:00:00.000000000 Z
11
+ date: 2018-12-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi