thecore_print_commons 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/workers/print_worker.rb +3 -1
- data/lib/thecore_print_commons/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 288c62057e8436b3d78346e81105bacbb9017b662c2f5deb6e4941adafcc0bda
|
4
|
+
data.tar.gz: bc795a23da7c14c7b0283abe7613ecdac37e8da07f887b0e2ff44eb8f6f32d0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: efa4047c29bd90339b6ceb31360113fce35fe7678d71fb817e868a0fa58122e528a0734a46613d26000ecdd2b06d4e0266ee67a321848d553ecf70067d4b5c04
|
7
|
+
data.tar.gz: 64c9730e7d1f0e6323eb89e513cb6f371afc96d9839d09a9bc9ae6664e598701a2b19492056d2ab5315207d93604648c54e1c9685c4865dbd9c0ad364d14cd8e
|
data/app/workers/print_worker.rb
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
require 'ipaddr'
|
2
2
|
class PrintWorker
|
3
3
|
include Sidekiq::Worker
|
4
|
+
sidekiq_options retry: false
|
5
|
+
|
4
6
|
def perform printer_cups_name, text
|
5
7
|
# if Settings.ns(:printer_commons).cups_server.blank? || ['127.0.0.1', 'localhost'].contains(Settings.ns(:printer_commons).cups_server)
|
6
8
|
# printer = CupsPrinter.new printer_cups_name
|
@@ -13,7 +15,7 @@ class PrintWorker
|
|
13
15
|
# CupsPrinter.new printer_cups_name, hostname: Settings.ns(:printer_commons).cups_server
|
14
16
|
# printer.print_data text, 'text/plain', hostname: Settings.ns(:printer_commons).cups_server
|
15
17
|
puts "Printing with lp command on #{printer_cups_name} of #{Settings.ns(:printer_commons).cups_server} "
|
16
|
-
`lp -d "#{printer_cups_name}" -h "#{Settings.ns(:printer_commons).cups_server}" -o raw "#{print_file}"`
|
18
|
+
`cupsenable "#{printer_cups_name}";lp -d "#{printer_cups_name}" -h "#{Settings.ns(:printer_commons).cups_server}" -o raw "#{print_file}"`
|
17
19
|
File.delete print_file
|
18
20
|
# end
|
19
21
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thecore_print_commons
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore
|
@@ -100,7 +100,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
100
|
version: '0'
|
101
101
|
requirements: []
|
102
102
|
rubyforge_project:
|
103
|
-
rubygems_version: 2.
|
103
|
+
rubygems_version: 2.7.7
|
104
104
|
signing_key:
|
105
105
|
specification_version: 4
|
106
106
|
summary: Thecorized thecore_print_commons
|