thecore_print_commons 0.1.11 → 0.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a87bbd3fe90ce448c26e39d70ad389635e953bb7
4
- data.tar.gz: f763da92a61cb33c9dbca46ee0fce3c3ba6bb03a
3
+ metadata.gz: d76e9416ec4e1cbc10a87b927cb211fcd07f9b42
4
+ data.tar.gz: 91028fc14cd84f204ebae675aff061d31dab4409
5
5
  SHA512:
6
- metadata.gz: 305e45d984c529a853835eb6aca8577bea3abb5e61831fa8a12c7f999d9783de39cf25518fd9ac8b27869f1dfef71fd36638ba16717467b9b4a03914d3a8026f
7
- data.tar.gz: c5ead221770f490c8984c090af470e6615f4ac9e7999fd9636ddff0701feeacfe6f6368ccbf698729af524ad434018371df668a1dfcd9975ba7f7be5f2d3f4d1
6
+ metadata.gz: fb8574caf0b73b56e525b5f799c58b6ec3465b01cb212861bec63ed434e797a208b12f3f91ba955cc49448f19b69127417a3884acd3a7cf612d78f36be98f515
7
+ data.tar.gz: 0277de4dbac6f75f6dcadf9864c22bcdb27c90e7672054f67d119f538c4dba7a264f6c8afbabf07bec9ce90b820f7fcbdd5d5a0844bf0c0c0d38541410f5399f
@@ -5,12 +5,13 @@ class PrintWorker
5
5
  if Settings.ns(:printer_commons).cups_server.blank? || ['127.0.0.1', 'localhost'].contains(Settings.ns(:printer_commons).cups_server)
6
6
  printer = CupsPrinter.new printer_cups_name
7
7
  printer.print_data text, 'text/plain'
8
+ printer.close
8
9
  else
9
10
  print_file = "/tmp/print-#{printer_cups_name}-#{Time.now.strftime '%Y%m%d%H%M%S%L'}"
10
11
  IO.write(print_file, text)
11
12
  # CupsPrinter.new printer_cups_name, hostname: Settings.ns(:printer_commons).cups_server
12
13
  # printer.print_data text, 'text/plain', hostname: Settings.ns(:printer_commons).cups_server
13
- `lp -d "#{printer_cups_name}" -h #{Settings.ns(:printer_commons).cups_server} -o raw #{print_file}`
14
+ `lp -d "#{printer_cups_name}" -h "#{Settings.ns(:printer_commons).cups_server}" -o raw "#{print_file}"`
14
15
  File.delete print_file
15
16
  end
16
17
  end
@@ -1,3 +1,3 @@
1
1
  module ThecorePrintCommons
2
- VERSION = '0.1.11'.freeze
2
+ VERSION = '0.1.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thecore_print_commons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11
4
+ version: 0.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni