sapos-print 1.0.1 → 1.0.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6635ef6ea96bf6f72ecf099879f34c8191c0e06e6429d1ea4dcb1e490a60c2b
4
- data.tar.gz: '0909b924874d5b092083739f5fc336f6040673c4d17718505b183718aa701a1b'
3
+ metadata.gz: ee739da76a7820cdcb7364a57efab5b6bd2ddaf476737108eb987b8a34953422
4
+ data.tar.gz: bdbd316766cb5c6ddf67b0a97b476b0c76d157cfe7543fd65a110475d84d990c
5
5
  SHA512:
6
- metadata.gz: 5ad0112d75de5b767527fb5f688caca88d01f13c39711973ee7457c9617d1f2bff4f8183e8a5ba56d1314108300537db4b430065525305fc7bdec5f6ac3f57aa
7
- data.tar.gz: eef7bfe1a87fbe3bbe4bd74470f03bea5c94570f0df58cb1177269801b1d79f2f7f9c1b2ef9abf5b0b88d1ad0471c1327b12e292d978fa002f0374bcd06ffcad
6
+ metadata.gz: 4c00fb31891bb8c696795a74917943bcba3688a446278587f1c539ceb8160276e64f6f3df6b45efc340d778e3edf2d57059487c00916e3069fd8b264ac676eb0
7
+ data.tar.gz: f2202006d8dfb082dbf653383df153dbdc18c2dea42177dbe604e7522b8ee22ebcf5342f9e8084afd552c02f0c2bd4de2caf4704e063022642deb40b677f38f9
@@ -47,7 +47,33 @@ module Sapos
47
47
  info
48
48
  config = Sapos::Print.config
49
49
  printer = Printer.new(config)
50
- printer.print("This is a test\nprint page\nwithno special commands")
50
+ printer.print(document: "This is a test\nprint page\nwithno special commands", document_number: "test", print_control: true)
51
+ end
52
+
53
+ def windows_test_print
54
+ info
55
+
56
+ filename = "test.print"
57
+
58
+ dir = File.join(Dir.home,".sapos-print")
59
+ FileUtils.mkdir_p dir unless File.exists?(dir)
60
+ dir
61
+
62
+ print_dir = File.join(dir, 'print')
63
+
64
+ FileUtils.mkdir_p print_dir unless File.exists?(print_dir)
65
+ filename = File.join(print_dir, filename)
66
+
67
+ puts "Test file Path: #{filename}"
68
+ File.open(filename, 'w'){|f| f.write("Test\nTest\nTest")}
69
+ puts "Execute COPY Command"
70
+ command = "COPY "+"'"+filename.gsub("/","\\")+"'"+'"\\\\%COMPUTERNAME%\\'+"TM"
71
+
72
+ if !system(command)
73
+ puts "ERROR"
74
+ else
75
+ puts "OK"
76
+ end
51
77
  end
52
78
 
53
79
  no_tasks do
@@ -89,7 +89,8 @@ module Sapos
89
89
  return true
90
90
 
91
91
  when 'windows'
92
- command = "copy #{opts[:file]} "+'"\\\\%COMPUTERNAME%\\'+@config.printer
92
+ command = "COPY "+'"'+filename.gsub("/","\\")+'"'+'"\\\\%COMPUTERNAME%\\'+@config.printer
93
+ #command = "copy #{opts[:file]} "+'"\\\\%COMPUTERNAME%\\'+@config.printer
93
94
  if !system(command)
94
95
  puts "Not executed"
95
96
  return false
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Sapos
4
4
  module Print
5
- VERSION = "1.0.1"
5
+ VERSION = "1.0.3"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sapos-print
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josef Sauter
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-29 00:00:00.000000000 Z
11
+ date: 2022-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor