sapos-print 1.0.1 → 1.0.6

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: aa9dbe51b563ee70ee2027c134a1bd153f324320b3de2fe8edeaf746cacf0074
4
+ data.tar.gz: dbd27b3c96dbd8f3f16a1127380e863e7e39abd2281f9fbd0e661257e6f34628
5
5
  SHA512:
6
- metadata.gz: 5ad0112d75de5b767527fb5f688caca88d01f13c39711973ee7457c9617d1f2bff4f8183e8a5ba56d1314108300537db4b430065525305fc7bdec5f6ac3f57aa
7
- data.tar.gz: eef7bfe1a87fbe3bbe4bd74470f03bea5c94570f0df58cb1177269801b1d79f2f7f9c1b2ef9abf5b0b88d1ad0471c1327b12e292d978fa002f0374bcd06ffcad
6
+ metadata.gz: 1ede8347459232583ccdef4f6b7f9750272c566b79f4c019fdc7043e30c9e685759527b3c2a5d692130abf53c81d012c2cd694d1feb423fc4cf089077e437fa8
7
+ data.tar.gz: d10655107cdad90e67da0e0a4ec2c97af27087e85b91e3859eb6edc23d1beb9c2381bc5a6311b1dd80960d4c103a4d3efedb9b8b72690c379e720f7bedc4d3fd
data/Gemfile.lock CHANGED
@@ -1,23 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- sapos-print (1.0.1)
4
+ sapos-print (1.0.6)
5
5
  activesupport
6
6
  awesome_print
7
7
  json
8
- pubnub
8
+ pubnub (~> 4.8.0)
9
9
  rest-client
10
10
  thor
11
11
 
12
12
  GEM
13
13
  remote: https://rubygems.org/
14
14
  specs:
15
- activesupport (6.1.4.1)
15
+ activesupport (7.0.2)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
17
  i18n (>= 1.6, < 2)
18
18
  minitest (>= 5.1)
19
19
  tzinfo (~> 2.0)
20
- zeitwerk (~> 2.3)
21
20
  addressable (2.8.0)
22
21
  public_suffix (>= 2.0.2, < 5.0)
23
22
  awesome_print (1.9.2)
@@ -26,7 +25,7 @@ GEM
26
25
  concurrent-ruby (~> 1.1.5)
27
26
  domain_name (0.5.20190701)
28
27
  unf (>= 0.0.5, < 1.0.0)
29
- dry-configurable (0.13.0)
28
+ dry-configurable (0.14.0)
30
29
  concurrent-ruby (~> 1.0)
31
30
  dry-core (~> 0.6)
32
31
  dry-container (0.9.0)
@@ -35,7 +34,7 @@ GEM
35
34
  dry-core (0.7.1)
36
35
  concurrent-ruby (~> 1.0)
37
36
  dry-inflector (0.2.1)
38
- dry-initializer (3.0.4)
37
+ dry-initializer (3.1.1)
39
38
  dry-logic (1.2.0)
40
39
  concurrent-ruby (~> 1.0)
41
40
  dry-core (~> 0.5, >= 0.5)
@@ -62,16 +61,16 @@ GEM
62
61
  http-cookie (1.0.4)
63
62
  domain_name (~> 0.5)
64
63
  httpclient (2.8.3)
65
- i18n (1.8.11)
64
+ i18n (1.9.1)
66
65
  concurrent-ruby (~> 1.0)
67
66
  json (2.6.1)
68
67
  mime-types (3.4.1)
69
68
  mime-types-data (~> 3.2015)
70
- mime-types-data (3.2021.1115)
71
- minitest (5.14.4)
69
+ mime-types-data (3.2022.0105)
70
+ minitest (5.15.0)
72
71
  netrc (0.11.0)
73
72
  public_suffix (4.0.6)
74
- pubnub (4.7.1)
73
+ pubnub (4.8.0)
75
74
  addressable (>= 2.0.0)
76
75
  concurrent-ruby (~> 1.1.5)
77
76
  concurrent-ruby-edge (~> 0.5.0)
@@ -84,14 +83,13 @@ GEM
84
83
  http-cookie (>= 1.0.2, < 2.0)
85
84
  mime-types (>= 1.16, < 4.0)
86
85
  netrc (~> 0.8)
87
- thor (1.1.0)
86
+ thor (1.2.1)
88
87
  timers (4.3.3)
89
88
  tzinfo (2.0.4)
90
89
  concurrent-ruby (~> 1.0)
91
90
  unf (0.1.4)
92
91
  unf_ext
93
92
  unf_ext (0.0.8)
94
- zeitwerk (2.5.1)
95
93
 
96
94
  PLATFORMS
97
95
  arm64-darwin-21
@@ -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,10 @@ module Sapos
89
89
  return true
90
90
 
91
91
  when 'windows'
92
- command = "copy #{opts[:file]} "+'"\\\\%COMPUTERNAME%\\'+@config.printer
92
+ #command = "copy" + ' "' + filename + '" ' + '"\\\\%COMPUTERNAME%\\'+"TM"
93
+ filename = opts[:file].to_s.gsub("/","\\")
94
+ command = "COPY " + '"' + filename + '" ' + '"\\\\%COMPUTERNAME%\\' + @config.printer
95
+ #command = "copy #{opts[:file]} "+'"\\\\%COMPUTERNAME%\\'+@config.printer
93
96
  if !system(command)
94
97
  puts "Not executed"
95
98
  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.6"
6
6
  end
7
7
  end
data/sapos-print.gemspec CHANGED
@@ -37,7 +37,7 @@ Gem::Specification.new do |spec|
37
37
  # guide at: https://bundler.io/guides/creating_gem.html
38
38
 
39
39
  spec.add_dependency "thor"
40
- spec.add_dependency "pubnub"
40
+ spec.add_dependency "pubnub", "~> 4.8.0"
41
41
  spec.add_dependency "rest-client"
42
42
  spec.add_dependency "awesome_print"
43
43
  spec.add_dependency "activesupport"
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.6
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-02-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: pubnub
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: 4.8.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ">="
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '0'
40
+ version: 4.8.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rest-client
43
43
  requirement: !ruby/object:Gem::Requirement