ruby-escpos 0.0.4 → 0.0.5
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.
- checksums.yaml +4 -4
- data/lib/ruby-escpos.rb +11 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0e5efbc241bca099e58532571b39387b06df07e
|
4
|
+
data.tar.gz: 32271f4488ad7dcecb3e9583569f9fac7071211b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47e503ae5a23118d87a26439c35f0ce1ecade200701690f598e6b0f006814a8f2db7eefa8d29d132ac038950ce789c3c506d627e54d2a3faf34c8cc967d50f66
|
7
|
+
data.tar.gz: 794cb4104a9b21273c3bfcf5697942f267a1eceddff04288868742b31416d05c6e458ecab4e7c3908576c4e5b24f6fcec58d82bf990a66dfd6b633afebe69ea0
|
data/lib/ruby-escpos.rb
CHANGED
@@ -79,8 +79,18 @@ class RubyEscPos
|
|
79
79
|
|
80
80
|
def barcode(code, width = 64, height = 64, bc = BARCODE_UPC_A, pos = BARCODE_TXT_OFF, font = nil)
|
81
81
|
write TXT_ALIGN_CT
|
82
|
-
|
82
|
+
|
83
|
+
if height >= 2 && height <= 6
|
84
|
+
write BARCODE_HEIGHT
|
85
|
+
end
|
86
|
+
|
87
|
+
if width >= 1 && width <=255
|
88
|
+
write BARCODE_WIDTH
|
89
|
+
end
|
90
|
+
|
83
91
|
write font
|
92
|
+
write pos
|
93
|
+
|
84
94
|
write bc
|
85
95
|
write code
|
86
96
|
new_line
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-escpos
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Frederick Lemire-Collu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Ruby library to manipulate ESC/POS Printers
|
14
14
|
email: frederick@buildrevision.com
|