thecore_print_commons 3.0.8 → 3.0.10

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
  SHA256:
3
- metadata.gz: 076d9d7ebc40292dec54e2700103d7ab47ac30193027753705f26194d2fe19da
4
- data.tar.gz: 5ecb12c7813bd402e25f3a09bb599269a3b8ed97437e733a975896f142f28c7f
3
+ metadata.gz: 881cefd0a6bc26b252cc6f40eb95e301c56628cd1a0e5613f3a043fd8e8a3b60
4
+ data.tar.gz: 125141263ce0b58c563c33b5670fb31abbc59e42f15f0f43a71dbe2c4891ff31
5
5
  SHA512:
6
- metadata.gz: 5d3ce496a19a3539c5bbb5d83c417e064566b8001202084a48bd3e5d0c4d83db6e98adc309ed9ab5e3e167bd9b7d6f6dda3b357cddba66122b28cf45a7fa9f69
7
- data.tar.gz: 6117494a568f48bd0a445b50c5c8f2664526e2e3a43ba310b8d640ecfe2a6cad87335cfab808fbbb7573ce954ea19777c6b0ff2cc55227dd8bfefd9ed17fc34d
6
+ metadata.gz: d5bc150571cbaf10d3257a55423ed99d6cde1b71561a3faace52e3f9015370588d0f3dc6f56ae6756f2118ece29fe1c8296be55453f5ebc3d80fc4317c6b1974
7
+ data.tar.gz: 4344c157b5a964b422699c0460f2a208e4011c336ee7840cf5f682fa9b2997c61010fdb378ad3bfddbbf05c64e46a70c0a57c1714fc1db12047b296166361438
@@ -39,12 +39,12 @@ module Api::Printer
39
39
  # ::PrintWorker.perform_async('192.168.0.1', 9100, "We all love DJ")
40
40
 
41
41
  printer = Printer.find(params[:id])
42
- base_template = printer.print_template.template.dup
42
+ result = base_template = printer.print_template.template.dup
43
43
  result = printer.print_template.translation_matrix.lines.map(&:strip).inject(base_template) do |base_template, replacement|
44
44
  base_template.gsub("$#{replacement}", params[replacement]) unless replacement.blank? && params[replacement].blank?
45
- end
45
+ end if printer.print_template.translation_matrix.present?
46
46
  ::PrintWorker.perform_async(printer.ip, printer.port, result)
47
- { info: "Print job sent in background to #{printer.ip} on port #{printer.port}" }
47
+ return { info: "Print job sent in background to #{printer.ip} on port #{printer.port}" }, 200
48
48
  end
49
49
  end
50
50
  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: 3.0.8
4
+ version: 3.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-24 00:00:00.000000000 Z
11
+ date: 2023-03-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore_background_jobs