rails_admin_telnet_print 1.2.11 → 1.2.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: bc7cf77cd4b838967a93c95e28de3075e111ff91
4
- data.tar.gz: c246f4f846510884853e2fc7393703b43cb8b3b4
3
+ metadata.gz: d89dc05a824271ecf4192b6319253f20d6f5c3fc
4
+ data.tar.gz: 58292e0896102ad66d92551be15c0448a1184a63
5
5
  SHA512:
6
- metadata.gz: 16fe9d8b333ad1913734f67c08919fcf62745c93d8beadcfdf9871809080cce2fcaf19bb8b74e5354f97a0cd2d4d09230cfb6ca7f0d5cd46336e2388906b75d3
7
- data.tar.gz: c0cc6202e77d7e7c9a0e6717ea7e5d976ae781f50c07a02669821d49b278e50bc56bad9cdb537a6b67b904e5e467ab4d83841b5d0d280bedd465b063aac14019
6
+ metadata.gz: 0fab57f772228e0ba132515944bde290bc4c4354c72c60edf9807971998d2a1fc3a63e06ff38c5c97acd822fc8f483670de0dd8b8d25d01c8286741dc17a368f
7
+ data.tar.gz: b95c5a9107937181663a61e4799700cd7c1a244ed0d8af1dda14b79343663f74800b186941c67bd9b68630f16a960fd7379631605c00650432361eb44a81da8d
@@ -13,7 +13,7 @@ class PrintItJob < ApplicationJob
13
13
  # Do something later
14
14
  printer = Printer.find(printer_id.to_i)
15
15
  print_template = printer.print_template
16
- Rails.logger.info "PrintItJob: PRINTING MODEL: #{model_name.constantize.inspect}"
16
+ Rails.logger.info "PrintItJob: PRINTING MODEL: #{model_name}"
17
17
  header = model_name.constantize.find(id)
18
18
  items = header.records_for_print(id).order(code: :asc)
19
19
 
@@ -25,14 +25,14 @@ class PrintItJob < ApplicationJob
25
25
  # Rails.logger.info "ITEMGROUP: #{item_group.inspect}"
26
26
  barcodes = item_group.map(&:id)
27
27
  barcodes = barcodes.fill("", barcodes.length..(print_template.number_of_barcodes - 1)) if print_template.number_of_barcodes > barcodes.length
28
- # Rails.logger.info "AAAAHHHHHHHHHH: #{barcodes.inspect}"
28
+ Rails.logger.info "PrintItJob: PASSING THESE IDs TO TEMPLATE: #{barcodes.inspect}"
29
29
  pivot.push print_template.translate(header: header, items: barcodes, temperature: printer.temperature)
30
30
  # Rails.logger.info "BARCODES: #{barcodes.inspect}"
31
31
  # Se il risultato è un errore, allora mi fermo completamente e loggo il numero di particolari stampati
32
32
  # Rails.logger.info "RISULTATO: #{result}"
33
33
  end
34
34
 
35
- Rails.logger.info "PrintItJob: SENDING TO PRINTER, TEXT TO PRINT IS:\n #{pivot.inspect}"
35
+ # Rails.logger.info "PrintItJob: SENDING TO PRINTER, TEXT TO PRINT IS:\n #{pivot.inspect}"
36
36
  result = pivot.empty? ? false : send_to_printer(printer.ip, pivot.join(""))
37
37
  @pjob.update(printed: (result ? pivot.length : 0)) # Se risultato true, allora ha stampato tutto, altrimenti non ha stampato nulla
38
38
  @pjob.update(total: pivot.length) # In realtà è inutile, ora manda tutto quello che può alla stampante, solo lei può andare storta
@@ -74,7 +74,7 @@ class PrintItJob < ApplicationJob
74
74
  break if response.count == 3
75
75
  end
76
76
  s.close
77
- Rails.logger.info response.inspect
77
+ Rails.logger.info "PrintIt: RESPONSE: #{response.inspect}"
78
78
  first = response[0].split(",")
79
79
  second = response[1].split(",")
80
80
  return "HEAD UP" if second[2].to_i == 1
@@ -83,6 +83,7 @@ class PrintItJob < ApplicationJob
83
83
  return "PAUSE" if first[2].to_i == 1
84
84
  return "OK"
85
85
  rescue
86
+ Rails.logger.info "PrintIt: STATUS: UNREACHABLE"
86
87
  return "UNREACHABLE"
87
88
  end
88
89
  end
@@ -1,3 +1,3 @@
1
1
  module RailsAdminTelnetPrint
2
- VERSION = '1.2.11'.freeze
2
+ VERSION = '1.2.12'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_admin_telnet_print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.11
4
+ version: 1.2.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriele Tassoni
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-10 00:00:00.000000000 Z
11
+ date: 2018-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thecore