escper 1.1.6 → 1.1.7

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.
@@ -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) == true and vendor_printers.kind_of?(ActiveRecord::Relation))
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
- puts "No VendorPrinters specified. Creating a set of temporary printers with common device paths"
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|
@@ -1,3 +1,3 @@
1
1
  module Escper
2
- VERSION = "1.1.6"
2
+ VERSION = "1.1.7"
3
3
  end
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.6
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-07 00:00:00.000000000 Z
12
+ date: 2013-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rmagick