escper 1.1.8 → 1.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/debian/changelog +7 -0
- data/lib/escper/printer.rb +3 -2
- data/lib/escper/vendor_printer.rb +10 -0
- data/lib/escper/version.rb +1 -1
- metadata +2 -2
data/debian/changelog
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
ruby-escper (1.1.8-1) unstable; urgency=low
|
2
|
+
|
3
|
+
* fix: distinciton between VendorPrinter and ::VendorPrinter
|
4
|
+
* new version
|
5
|
+
|
6
|
+
-- Michael Franzl <office@michaelfranzl.com> Wed, 13 Mar 2013 16:35:01 +0100
|
7
|
+
|
1
8
|
ruby-escper (1.1.7-1) unstable; urgency=low
|
2
9
|
|
3
10
|
* fix
|
data/lib/escper/printer.rb
CHANGED
@@ -95,6 +95,7 @@ module Escper
|
|
95
95
|
name = p.name
|
96
96
|
path = p.path
|
97
97
|
codepage = p.codepage
|
98
|
+
baudrate = p.baudrate
|
98
99
|
|
99
100
|
if Escper.use_safe_device_path == true
|
100
101
|
sanitized_path = path.gsub(/[\/\s'"\&\^\$\#\!;\*]/,'_').gsub(/[^\w\/\.\-@]/,'')
|
@@ -102,10 +103,10 @@ module Escper
|
|
102
103
|
@file_mode = 'ab'
|
103
104
|
end
|
104
105
|
|
105
|
-
Escper.log "[PRINTING] Trying to open #{ name }
|
106
|
+
Escper.log "[PRINTING] Trying to open #{ name }@#{ path }@#{ baudrate }bps ..."
|
106
107
|
pid = p.id ? p.id : i
|
107
108
|
begin
|
108
|
-
printer = SerialPort.new path,
|
109
|
+
printer = SerialPort.new path, baudrate
|
109
110
|
@open_printers.merge! pid => { :name => name, :path => path, :copies => p.copies, :device => printer, :codepage => codepage }
|
110
111
|
Escper.log "[PRINTING] Success for SerialPort: #{ printer.inspect }"
|
111
112
|
next
|
@@ -6,6 +6,8 @@ module Escper
|
|
6
6
|
@path = attrs[:path]
|
7
7
|
@copies = attrs[:copies]
|
8
8
|
@codepage = attrs[:codepage]
|
9
|
+
@baudrate = attrs[:baudrate]
|
10
|
+
@baudrate ||= 9600
|
9
11
|
@id = attrs[:id]
|
10
12
|
end
|
11
13
|
|
@@ -41,6 +43,14 @@ module Escper
|
|
41
43
|
@codepage = codepage
|
42
44
|
end
|
43
45
|
|
46
|
+
def baudrate
|
47
|
+
@baudrate
|
48
|
+
end
|
49
|
+
|
50
|
+
def baudrate=(baudrate)
|
51
|
+
@baudrate = baudrate
|
52
|
+
end
|
53
|
+
|
44
54
|
def id
|
45
55
|
@id
|
46
56
|
end
|
data/lib/escper/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: escper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.9
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rmagick
|