escper 1.1.6 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/escper/printer.rb +2 -2
- data/lib/escper/version.rb +1 -1
- metadata +2 -2
data/lib/escper/printer.rb
CHANGED
@@ -13,13 +13,13 @@ module Escper
|
|
13
13
|
else
|
14
14
|
@fallback_root_path = '/'
|
15
15
|
end
|
16
|
-
if vendor_printers.kind_of?(Array) or (defined?(ActiveRecord) ==
|
16
|
+
if vendor_printers.kind_of?(Array) or (defined?(ActiveRecord) == 'constant' and vendor_printers.kind_of?(ActiveRecord::Relation))
|
17
17
|
@vendor_printers = vendor_printers
|
18
18
|
elsif vendor_printers.kind_of? VendorPrinter
|
19
19
|
@vendor_printers = [vendor_printers]
|
20
20
|
else
|
21
21
|
# If no available VendorPrinters are initialized, create a set of temporary VendorPrinters with usual device paths.
|
22
|
-
|
22
|
+
Escper.log "No VendorPrinters specified. Creating a set of temporary printers with common device paths"
|
23
23
|
paths = ['/dev/ttyUSB0', '/dev/ttyUSB1', '/dev/ttyUSB2', '/dev/usb/lp0', '/dev/usb/lp1', '/dev/usb/lp2', '/dev/salor-hospitality-front', '/dev/salor-hospitality-top', '/dev/salor-hospitality-back-top-left', '/dev/salor-hospitality-back-top-right', '/dev/salor-hospitality-back-bottom-left', '/dev/salor-hospitality-back-bottom-right']
|
24
24
|
@vendor_printers = Array.new
|
25
25
|
paths.size.times do |i|
|
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.7
|
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-03-
|
12
|
+
date: 2013-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rmagick
|