lib/sapos/print/cli.rb in sapos-print-1.1.0 vs lib/sapos/print/cli.rb in sapos-print-1.1.1
- old
+ new
@@ -109,9 +109,30 @@
else
puts "OK"
end
end
+ desc "test_q", "q reader test"
+ def test_q
+ config = Sapos::Print.config
+ puts ["Q=#{config.q.to_s}", "Printer=#{config.printer.to_s}", "Adapter=#{config.adapter.to_s}", "Interface=#{config.interface}", "DC=#{config.duplicate_control?}"].join(";")
+
+ Sapos::Print::QReader.printer_config = config
+ reader = QReader.new
+ puts reader.printer
+
+ message = {:document => "doc", :printer => "Daniel"}
+ ap reader.printers
+
+ Sapos::Print.config.printers.each do |p|
+ printer = reader.printers[p]
+ puts "Printing to: #{printer.config.printer}"
+ message[:document] = "Docu. #{p}"
+ printer.print(message)
+ end
+
+ end
+
no_tasks do
def info
if @printed.nil?
@printed ||= begin
print_wrapped("=+" * 40)
\ No newline at end of file