escper 1.1.2 → 1.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/escper/printer.rb +3 -2
- data/lib/escper/version.rb +1 -1
- metadata +2 -2
data/lib/escper/printer.rb
CHANGED
@@ -2,8 +2,9 @@ module Escper
|
|
2
2
|
class Printer
|
3
3
|
# mode can be local or sass
|
4
4
|
# vendor_printers can either be a single VendorPrinter object, or an Array of VendorPrinter objects, or an ActiveRecord Relation containing VendorPrinter objects.
|
5
|
-
def initialize(mode, vendor_printers =
|
5
|
+
def initialize(mode, vendor_printers=nil, subdomain=nil)
|
6
6
|
@mode = mode
|
7
|
+
@subdomain = subdomain
|
7
8
|
@open_printers = Hash.new
|
8
9
|
@codepages_lookup = YAML::load(File.read(Escper.codepage_file))
|
9
10
|
if vendor_printers.kind_of?(ActiveRecord::Relation) or vendor_printers.kind_of?(Array)
|
@@ -90,7 +91,7 @@ module Escper
|
|
90
91
|
|
91
92
|
if Escper.use_safe_device_path == true
|
92
93
|
sanitized_path = path.gsub(/[\/\s'"\&\^\$\#\!;\*]/,'_').gsub(/[^\w\/\.\-@]/,'')
|
93
|
-
path = File.join(Escper.safe_device_path, "#{sanitized_path}.
|
94
|
+
path = File.join(Escper.safe_device_path, @subdomain, "#{sanitized_path}.bill")
|
94
95
|
end
|
95
96
|
|
96
97
|
ActiveRecord::Base.logger.info "[PRINTING] Trying to open #{ name } @ #{ path } ..."
|
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.3
|
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: 2012-
|
12
|
+
date: 2012-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ''
|
15
15
|
email:
|