thecore_print_commons 2.0.4 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/concerns/api/print_job.rb +30 -0
- data/app/models/concerns/api/print_template.rb +30 -0
- data/app/models/concerns/api/printer.rb +45 -0
- data/app/models/concerns/rails_admin/print_job.rb +19 -0
- data/app/models/concerns/rails_admin/print_template.rb +24 -0
- data/app/models/concerns/rails_admin/printer.rb +45 -0
- data/app/models/print_job.rb +10 -0
- data/app/models/print_template.rb +34 -0
- data/app/models/printer.rb +35 -33
- data/app/workers/print_worker.rb +72 -15
- data/config/initializers/abilities_thecore_print_commons_concern.rb +11 -9
- data/config/locales/telnet_print.en.yml +2 -3
- data/config/locales/telnet_print.it.yml +2 -2
- data/db/migrate/20160407141529_create_print_jobs.rb +10 -0
- data/db/migrate/20160407152547_add_fields_to_print_job.rb +9 -0
- data/db/migrate/20160519093702_create_print_templates.rb +12 -0
- data/db/migrate/20160519124051_add_print_template_id_to_printer.rb +5 -0
- data/db/migrate/20160629140730_add_port_to_printer.rb +5 -0
- data/lib/thecore_print_commons.rb +1 -1
- metadata +16 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4ade4721428be9aee5378e3643e7bcc47f5e518b6ff46e4b88839fab6c8ce57
|
4
|
+
data.tar.gz: c1051c17921d2685ce61c3896dfb2d42bd2e7317ab28596d7f88bb1084bacb2a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a86bc5fa0a85bada3886445801153b70b96bdd0e9786b491a482a03497dbbfb941d3f08c491d34fb9e55abdbe2c3b5e6d7c5332463667486a3a4269d3eecdc34
|
7
|
+
data.tar.gz: 8aab7a93e08509e18ba2859049190b4e790f610be272746b2622eca01fced26cfb58facafbae37206ec336789e009c4261d2fde01ad2e86080bf0fb8865be236
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Api::PrintJob
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
# Use @@json_attrs to drive json rendering for
|
6
|
+
# API model responses (index, show and update ones).
|
7
|
+
# For reference:
|
8
|
+
# https://api.rubyonrails.org/classes/ActiveModel/Serializers/JSON.html
|
9
|
+
# The object passed accepts only these keys:
|
10
|
+
# - only: list [] of model fields to be shown in JSON serialization
|
11
|
+
# - except: exclude these fields from the JSON serialization, is a list []
|
12
|
+
# - methods: include the result of some method defined in the model
|
13
|
+
# - include: include associated models, it's an object {} which also accepts the keys described here
|
14
|
+
cattr_accessor :json_attrs
|
15
|
+
@@json_attrs = ::ModelDrivenApi.smart_merge (json_attrs || {}), {}
|
16
|
+
|
17
|
+
# Here you can add custom actions to be called from the API
|
18
|
+
# The action must return an serializable (JSON) object.
|
19
|
+
# Here you can find an example, in the API could be called like:
|
20
|
+
#
|
21
|
+
# GET /api/v2/:model/:id?do=test&custom_parameter=hello
|
22
|
+
#
|
23
|
+
# Please uncomment it to test with a REST client.
|
24
|
+
# Please take note on the fact that, if the do params is test, the custom
|
25
|
+
# action definition must be, like below self.custom_action_test.
|
26
|
+
# def self.custom_action_test id=nil, params=nil
|
27
|
+
# { test: [ :first, :second, :third ], id: id, params: params}
|
28
|
+
# end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module Api::PrintTemplate
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
# Use @@json_attrs to drive json rendering for
|
6
|
+
# API model responses (index, show and update ones).
|
7
|
+
# For reference:
|
8
|
+
# https://api.rubyonrails.org/classes/ActiveModel/Serializers/JSON.html
|
9
|
+
# The object passed accepts only these keys:
|
10
|
+
# - only: list [] of model fields to be shown in JSON serialization
|
11
|
+
# - except: exclude these fields from the JSON serialization, is a list []
|
12
|
+
# - methods: include the result of some method defined in the model
|
13
|
+
# - include: include associated models, it's an object {} which also accepts the keys described here
|
14
|
+
cattr_accessor :json_attrs
|
15
|
+
@@json_attrs = ::ModelDrivenApi.smart_merge (json_attrs || {}), {}
|
16
|
+
|
17
|
+
# Here you can add custom actions to be called from the API
|
18
|
+
# The action must return an serializable (JSON) object.
|
19
|
+
# Here you can find an example, in the API could be called like:
|
20
|
+
#
|
21
|
+
# GET /api/v2/:model/:id?do=test&custom_parameter=hello
|
22
|
+
#
|
23
|
+
# Please uncomment it to test with a REST client.
|
24
|
+
# Please take note on the fact that, if the do params is test, the custom
|
25
|
+
# action definition must be, like below self.custom_action_test.
|
26
|
+
# def self.custom_action_test id=nil, params=nil
|
27
|
+
# { test: [ :first, :second, :third ], id: id, params: params}
|
28
|
+
# end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module Api::Printer
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
|
4
|
+
included do
|
5
|
+
# Use @@json_attrs to drive json rendering for
|
6
|
+
# API model responses (index, show and update ones).
|
7
|
+
# For reference:
|
8
|
+
# https://api.rubyonrails.org/classes/ActiveModel/Serializers/JSON.html
|
9
|
+
# The object passed accepts only these keys:
|
10
|
+
# - only: list [] of model fields to be shown in JSON serialization
|
11
|
+
# - except: exclude these fields from the JSON serialization, is a list []
|
12
|
+
# - methods: include the result of some method defined in the model
|
13
|
+
# - include: include associated models, it's an object {} which also accepts the keys described here
|
14
|
+
cattr_accessor :json_attrs
|
15
|
+
@@json_attrs = ::ModelDrivenApi.smart_merge (json_attrs || {}), {}
|
16
|
+
|
17
|
+
# Here you can add custom actions to be called from the API
|
18
|
+
# The action must return an serializable (JSON) object.
|
19
|
+
# Here you can find an example, in the API could be called like:
|
20
|
+
#
|
21
|
+
# GET /api/v2/:model/:id?do=test&custom_parameter=hello
|
22
|
+
#
|
23
|
+
# Please uncomment it to test with a REST client.
|
24
|
+
# Please take note on the fact that, if the do params is test, the custom
|
25
|
+
# action definition must be, like below self.custom_action_test.
|
26
|
+
# def self.custom_action_test id=nil, params=nil
|
27
|
+
# { test: [ :first, :second, :third ], id: id, params: params}
|
28
|
+
# end
|
29
|
+
|
30
|
+
def self.custom_action_print_single_barcode id, params
|
31
|
+
# Example Usage:
|
32
|
+
# item = ::Item.joins(:projects).where(projects: {id: params[:order_id].to_i}).first
|
33
|
+
# printer = ::Printer.where(supplier_id: current_user.supplier_id, default: true).first
|
34
|
+
# single_text = "#{printer.print_template.template.gsub("%DESCRIPTION%", item.description)}"
|
35
|
+
# text = single_text * params[:quantity].to_i
|
36
|
+
# # Preso l'ordine mi recupero l'item e ne stampo la quantità richiesta
|
37
|
+
# ::PrintWorker.perform_async(printer.ip, text)
|
38
|
+
|
39
|
+
printer = Printer.find(id)
|
40
|
+
text = printer.print_template.template.gsub(printer.print_template.translation_matrix.lines.first, params[:barcode])
|
41
|
+
::PrintWorker.perform_async(printer.ip, printer.port, text)
|
42
|
+
{ info: "Print job sent in background to #{printer.ip} on port #{printer.port}" }
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module RailsAdmin::PrintJob
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
included do
|
4
|
+
# Here You can define the RailsAdmin DSL
|
5
|
+
rails_admin do
|
6
|
+
# rails_admin do
|
7
|
+
navigation_label I18n.t("admin.settings.label")
|
8
|
+
navigation_icon 'fa fa-check-square'
|
9
|
+
parent Printer
|
10
|
+
|
11
|
+
field :printer
|
12
|
+
field :created_at
|
13
|
+
field :description
|
14
|
+
list do
|
15
|
+
field :printed_on_total
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module RailsAdmin::PrintTemplate
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
included do
|
4
|
+
# Here You can define the RailsAdmin DSL
|
5
|
+
rails_admin do
|
6
|
+
navigation_label I18n.t("admin.settings.label")
|
7
|
+
navigation_icon 'fa fa-file-text'
|
8
|
+
parent Printer
|
9
|
+
|
10
|
+
field :name
|
11
|
+
field :description
|
12
|
+
|
13
|
+
edit do
|
14
|
+
field :template
|
15
|
+
field :translation_matrix
|
16
|
+
end
|
17
|
+
|
18
|
+
show do
|
19
|
+
field :template
|
20
|
+
field :translation_matrix
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
module RailsAdmin::Printer
|
2
|
+
extend ActiveSupport::Concern
|
3
|
+
included do
|
4
|
+
# Here You can define the RailsAdmin DSL
|
5
|
+
rails_admin do
|
6
|
+
navigation_label I18n.t("admin.settings.label")
|
7
|
+
navigation_icon 'fa fa-print'
|
8
|
+
|
9
|
+
field :print_template
|
10
|
+
field :name
|
11
|
+
field :ip
|
12
|
+
field :port do
|
13
|
+
default_value do
|
14
|
+
9100
|
15
|
+
end
|
16
|
+
end
|
17
|
+
field :default, :toggle
|
18
|
+
field :temperature
|
19
|
+
field :description
|
20
|
+
field :online? do
|
21
|
+
read_only true
|
22
|
+
formatted_value do # used in form views
|
23
|
+
(value ? "<strong style='color:green'>👍</strong>" : "<strong style='color:red'>👎</strong>").html_safe
|
24
|
+
end
|
25
|
+
|
26
|
+
pretty_value do # used in list view columns and show views, defaults to formatted_value for non-association fields
|
27
|
+
(value ? "<strong style='color:green'>👍</strong>" : "<strong style='color:red'>👎</strong>").html_safe
|
28
|
+
end
|
29
|
+
|
30
|
+
export_value do
|
31
|
+
value ? "OK" : "KO" # used in exports, where no html/data is allowed
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
list do
|
36
|
+
configure :description do
|
37
|
+
visible false
|
38
|
+
end
|
39
|
+
configure :temperature do
|
40
|
+
visible false
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
class PrintTemplate < ApplicationRecord
|
2
|
+
include Api::PrintTemplate
|
3
|
+
include RailsAdmin::PrintTemplate
|
4
|
+
|
5
|
+
has_many :printers, inverse_of: :print_template
|
6
|
+
|
7
|
+
validates :name, presence: true
|
8
|
+
validates :template, presence: true
|
9
|
+
|
10
|
+
# def translate args
|
11
|
+
# # Rails.logger.info("COME CAZZO SEI FATTO? #{args.inspect}")
|
12
|
+
# temp = template.clone
|
13
|
+
# temp.gsub!("TEMPERATURE", args[:temperature].to_s)
|
14
|
+
# number_of_barcodes.times.with_index do |i|
|
15
|
+
# #Rails.logger.debug "MAMAMAMA! #{args[:items][i]}"
|
16
|
+
# item = (ChosenItem.find(args[:items][i]) rescue false)
|
17
|
+
# HashWithIndifferentAccess.new(YAML.load(translation_matrix)).each_pair do |k, v|
|
18
|
+
# Rails.logger.debug "ITEM: #{item.inspect} AND THE STRING: #{v}"
|
19
|
+
# temp.gsub!(k, item.is_a?(FalseClass) ? "" : v.split(".").inject(item, :send))
|
20
|
+
# end
|
21
|
+
# # Rails.logger.debug "MAMAMAMA! #{item.inspect}"
|
22
|
+
# # Se item è stringa vuota (quindi non ha .barcode), allora ritorna il campo FD remmato
|
23
|
+
# temp.gsub!("BARCODE#{i.to_s.rjust(2, '0')}", (item.barcode rescue "BARCODE#{i.to_s.rjust(2, '0')}"))
|
24
|
+
# end
|
25
|
+
# # Deleting the lines with BARCODE\d\d in them
|
26
|
+
# pivot = ""
|
27
|
+
# temp.each_line do |el|
|
28
|
+
# pivot += el if /BARCODE\d\d/.match(el).blank?
|
29
|
+
# end
|
30
|
+
# Rails.logger.info pivot
|
31
|
+
# pivot
|
32
|
+
# end
|
33
|
+
|
34
|
+
end
|
data/app/models/printer.rb
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
class Printer < ApplicationRecord
|
2
|
+
include Api::Printer
|
3
|
+
include RailsAdmin::Printer
|
2
4
|
#serialize :translation, Hash
|
3
|
-
|
4
|
-
validates :name, presence: true
|
5
|
-
validates :ip, presence: true
|
6
|
-
|
5
|
+
|
7
6
|
# before_save :check_if_unique_default
|
8
7
|
# validates :qty, presence: true, numericality: { only_integer: true, greater_than: 0 }
|
9
8
|
# validates :translation, presence: true
|
10
|
-
|
9
|
+
|
11
10
|
# def template_enum
|
12
11
|
# PrintTemplate.descendants
|
13
12
|
# end
|
@@ -33,36 +32,39 @@ class Printer < ApplicationRecord
|
|
33
32
|
# def self.assigned_to section
|
34
33
|
# where(used_in: (USED.index(section.to_sym) + 1))
|
35
34
|
# end
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
end
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
35
|
+
|
36
|
+
# Usable with CUPS (STUB)
|
37
|
+
# def ip_enum
|
38
|
+
# # Getting from CUPS the list of configured printers
|
39
|
+
# if Settings.ns(:printer_commons).cups_server.blank? || ['127.0.0.1', 'localhost'].include?(Settings.ns(:printer_commons).cups_server)
|
40
|
+
# # Local Cups server
|
41
|
+
# CupsPrinter.get_all_printer_names
|
42
|
+
# else
|
43
|
+
# # Remote Cups server
|
44
|
+
# CupsPrinter.get_all_printer_names hostname: Settings.ns(:printer_commons).cups_server
|
45
|
+
# end
|
46
|
+
# end
|
47
|
+
|
48
|
+
belongs_to :print_template, inverse_of: :printers
|
49
|
+
has_many :print_jobs, dependent: :destroy, inverse_of: :printer
|
50
|
+
|
51
|
+
validates :name, presence: true
|
52
|
+
validates :ip, presence: true
|
53
|
+
validates :port, presence: true
|
54
|
+
validates :print_template, presence: true
|
55
|
+
|
56
|
+
def online?
|
57
|
+
begin
|
58
|
+
s = TCPSocket.new(self.ip, 9100)
|
59
|
+
s.puts("~hs")
|
60
|
+
s.close
|
61
|
+
rescue
|
62
|
+
return false
|
64
63
|
end
|
64
|
+
true
|
65
65
|
end
|
66
|
+
|
67
|
+
|
66
68
|
# private
|
67
69
|
# def check_if_unique_default
|
68
70
|
# if self.default?
|
data/app/workers/print_worker.rb
CHANGED
@@ -1,22 +1,79 @@
|
|
1
1
|
require 'ipaddr'
|
2
|
+
require 'socket'
|
2
3
|
class PrintWorker
|
3
4
|
include Sidekiq::Worker
|
4
5
|
sidekiq_options retry: false
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
7
|
+
# ZPL print
|
8
|
+
def perform ip, port, text
|
9
|
+
@pjob = PrintJob.create(printer_id: Printer.find_by(ip: ip), finished: false, iserror: false, total: 0, printed: 0)
|
10
|
+
status = check_status(ip)
|
11
|
+
print_job_status = false
|
12
|
+
if status == "OK"
|
13
|
+
begin
|
14
|
+
streamSock = TCPSocket.new ip, port
|
15
|
+
streamSock.send text, 0
|
16
|
+
streamSock.close
|
17
|
+
print_job_status = true
|
18
|
+
rescue
|
19
|
+
@pjob.update(iserror: true, description: "PRINTER ERROR: TIMEOUT")
|
20
|
+
print_job_status = false
|
21
|
+
end
|
22
|
+
else
|
23
|
+
@pjob.update(iserror: true, description: "PRINTER ERROR: #{status}")
|
24
|
+
print_job_status = false
|
25
|
+
end
|
26
|
+
# '~hs alla posizione 56 per 8 caratteri la quantità di etichette rimaste'
|
27
|
+
total = text.scan(/~PQ(\d+)/).last.first.to_i rescue 0
|
28
|
+
@pjob.update(printed: (print_job_status ? total : 0)) # Se risultato true, allora ha stampato tutto, altrimenti non ha stampato nulla
|
29
|
+
@pjob.update(total: total) # In realtà è inutile, ora manda tutto quello che può alla stampante, solo lei può andare storta
|
30
|
+
@pjob.update(finished: print_job_status)
|
21
31
|
end
|
32
|
+
|
33
|
+
def check_status printer
|
34
|
+
begin
|
35
|
+
s = TCPSocket.new(printer, 9100)
|
36
|
+
# Must create intepolation between item and template
|
37
|
+
# Printer.template può essere anche
|
38
|
+
# una parola di comando epr chiedere lo stato della stampante, solo nel caso sia ok,
|
39
|
+
# Allora mando la stampa
|
40
|
+
s.puts("~hs")
|
41
|
+
# Attende per la risposta (si mette in wait)
|
42
|
+
response = []
|
43
|
+
while (response_text = s.gets)
|
44
|
+
response << response_text
|
45
|
+
break if response.count == 3
|
46
|
+
end
|
47
|
+
s.close
|
48
|
+
Rails.logger.info "PrintIt: RESPONSE: #{response.inspect}"
|
49
|
+
first = response[0].split(",")
|
50
|
+
second = response[1].split(",")
|
51
|
+
return "HEAD UP" if second[2].to_i == 1
|
52
|
+
return "RIBBON OUT" if second[3].to_i == 1
|
53
|
+
return "PAPER OUT" if first[1].to_i == 1
|
54
|
+
return "PAUSE" if first[2].to_i == 1
|
55
|
+
return "OK"
|
56
|
+
rescue
|
57
|
+
Rails.logger.info "PrintIt: STATUS: UNREACHABLE"
|
58
|
+
return "UNREACHABLE"
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
# This is for cups only
|
63
|
+
# def perform printer_cups_name, text
|
64
|
+
# # if Settings.ns(:printer_commons).cups_server.blank? || ['127.0.0.1', 'localhost'].contains(Settings.ns(:printer_commons).cups_server)
|
65
|
+
# # printer = CupsPrinter.new printer_cups_name
|
66
|
+
# # printer.print_data text, 'text/plain'
|
67
|
+
# # printer.close
|
68
|
+
# # else
|
69
|
+
# print_file = "/tmp/print-#{printer_cups_name}-#{Time.now.strftime '%Y%m%d%H%M%S%L'}"
|
70
|
+
# puts "Creating temp file: #{print_file}"
|
71
|
+
# IO.write(print_file, text)
|
72
|
+
# # CupsPrinter.new printer_cups_name, hostname: Settings.ns(:printer_commons).cups_server
|
73
|
+
# # printer.print_data text, 'text/plain', hostname: Settings.ns(:printer_commons).cups_server
|
74
|
+
# puts "Printing with lp command on #{printer_cups_name} of #{Settings.ns(:printer_commons).cups_server} "
|
75
|
+
# `cupsenable "#{printer_cups_name}";lp -d "#{printer_cups_name}" -h "#{Settings.ns(:printer_commons).cups_server}" -o raw "#{print_file}"`
|
76
|
+
# File.delete print_file
|
77
|
+
# # end
|
78
|
+
# end
|
22
79
|
end
|
@@ -2,16 +2,18 @@ module Abilities
|
|
2
2
|
class ThecorePrintCommon
|
3
3
|
include CanCan::Ability
|
4
4
|
def initialize user
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
cannot [:destroy, :create, :update, :show], [PrintJob]
|
6
|
+
# if user
|
7
|
+
# cannot :edi
|
8
|
+
# # if the user is logged in, it can do certain tasks regardless his role
|
9
|
+
# if user.admin?
|
10
|
+
# # if the user is an admin, it can do a lot of things, usually
|
11
|
+
# end
|
10
12
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
end
|
13
|
+
# if user.has_role? :role
|
14
|
+
# # a specific role, brings specific powers
|
15
|
+
# end
|
16
|
+
# end
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -1,6 +1,5 @@
|
|
1
1
|
en:
|
2
2
|
admin:
|
3
3
|
help:
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
print_template:
|
5
|
+
translation_matrix:
|
@@ -1,5 +1,5 @@
|
|
1
1
|
it:
|
2
2
|
admin:
|
3
3
|
help:
|
4
|
-
|
5
|
-
|
4
|
+
print_template:
|
5
|
+
translation_matrix:
|
@@ -0,0 +1,9 @@
|
|
1
|
+
class AddFieldsToPrintJob < ActiveRecord::Migration[4.2]
|
2
|
+
def change
|
3
|
+
add_column :print_jobs, :iserror, :boolean, default: false
|
4
|
+
add_column :print_jobs, :description, :string
|
5
|
+
add_index :print_jobs, :description
|
6
|
+
add_column :print_jobs, :printed, :integer
|
7
|
+
add_column :print_jobs, :total, :integer
|
8
|
+
end
|
9
|
+
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: 2.0
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriele Tassoni
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thecore_background_jobs
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: cupsffi
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '0.1'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '0.1'
|
41
27
|
description: Thecorized thecore_print_commons full description.
|
42
28
|
email:
|
43
29
|
- gabriele.tassoni@gmail.com
|
@@ -49,6 +35,14 @@ files:
|
|
49
35
|
- README.md
|
50
36
|
- Rakefile
|
51
37
|
- app/assets/config/thecore_print_commons_manifest.js
|
38
|
+
- app/models/concerns/api/print_job.rb
|
39
|
+
- app/models/concerns/api/print_template.rb
|
40
|
+
- app/models/concerns/api/printer.rb
|
41
|
+
- app/models/concerns/rails_admin/print_job.rb
|
42
|
+
- app/models/concerns/rails_admin/print_template.rb
|
43
|
+
- app/models/concerns/rails_admin/printer.rb
|
44
|
+
- app/models/print_job.rb
|
45
|
+
- app/models/print_template.rb
|
52
46
|
- app/models/printer.rb
|
53
47
|
- app/workers/print_worker.rb
|
54
48
|
- config/initializers/abilities_thecore_print_commons_concern.rb
|
@@ -59,8 +53,13 @@ files:
|
|
59
53
|
- config/locales/telnet_print.it.yml
|
60
54
|
- config/routes.rb
|
61
55
|
- db/migrate/20160323152041_create_printers.rb
|
56
|
+
- db/migrate/20160407141529_create_print_jobs.rb
|
57
|
+
- db/migrate/20160407152547_add_fields_to_print_job.rb
|
62
58
|
- db/migrate/20160413115407_add_temperature_to_printer.rb
|
59
|
+
- db/migrate/20160519093702_create_print_templates.rb
|
60
|
+
- db/migrate/20160519124051_add_print_template_id_to_printer.rb
|
63
61
|
- db/migrate/20160629140729_add_default_to_printer.rb
|
62
|
+
- db/migrate/20160629140730_add_port_to_printer.rb
|
64
63
|
- db/seeds.rb
|
65
64
|
- lib/tasks/thecore_print_commons_tasks.rake
|
66
65
|
- lib/thecore_print_commons.rb
|
@@ -85,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
84
|
- !ruby/object:Gem::Version
|
86
85
|
version: '0'
|
87
86
|
requirements: []
|
88
|
-
rubygems_version: 3.0.3
|
87
|
+
rubygems_version: 3.0.3.1
|
89
88
|
signing_key:
|
90
89
|
specification_version: 4
|
91
90
|
summary: Thecorized thecore_print_commons
|