thecore_print_commons 0.1.13 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/workers/print_worker.rb +2 -0
- data/lib/thecore_print_commons/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d1c4fde6510449123598ceac273c7e84e38d89d
|
4
|
+
data.tar.gz: e094b9cec1b650395fcb28468ad5ad87cfd4e8dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0444b8d5eae6036694195dd01b338995db7026580a41b76851e0a3fdfc8552d7f2c8e00b5b9dc3288424b210ebca6e046686a52e9d393206af0609100633d995
|
7
|
+
data.tar.gz: 33964dccec1fd51ae351ff0e93ae45e95fe73bd79687d6a9358be74a71202ea83750f6beee0de2adc384ee4a6bc896c84629912eb6cd4d97b53b9559f03e0692
|
data/app/workers/print_worker.rb
CHANGED
@@ -8,9 +8,11 @@ class PrintWorker
|
|
8
8
|
# printer.close
|
9
9
|
# else
|
10
10
|
print_file = "/tmp/print-#{printer_cups_name}-#{Time.now.strftime '%Y%m%d%H%M%S%L'}"
|
11
|
+
puts "Creating temp file: #{print_file}"
|
11
12
|
IO.write(print_file, text)
|
12
13
|
# CupsPrinter.new printer_cups_name, hostname: Settings.ns(:printer_commons).cups_server
|
13
14
|
# printer.print_data text, 'text/plain', hostname: Settings.ns(:printer_commons).cups_server
|
15
|
+
puts "Printing with lp command on #{printer_cups_name} of #{Settings.ns(:printer_commons).cups_server} "
|
14
16
|
`lp -d "#{printer_cups_name}" -h "#{Settings.ns(:printer_commons).cups_server}" -o raw "#{print_file}"`
|
15
17
|
File.delete print_file
|
16
18
|
# end
|