vae 0.9.4 → 0.9.5

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
  SHA256:
3
- metadata.gz: 7a871ea331961b6d4a0a54e1fe013f17c1c346a17a7d481d0d2e484689b297a6
4
- data.tar.gz: c8fbfd258cc4cd84b9139d0e071ea041c9b135d962e462d2e9290ca928600f36
3
+ metadata.gz: e650342a3e5a60b529d84c702690b397093f979e3a27e0f4db9575f8ab95be1d
4
+ data.tar.gz: fe63fa75c61178ea7a8410518543a327f60a2c9be09f1712fc7e1a64d8a5eb9a
5
5
  SHA512:
6
- metadata.gz: 5385cf34a29db5fb60fc6d8a109286f53ce733fbcb87eebf0032007872d7e9ba431e9789570e688fae123dac764c5c5c93262d87e2c25c328179203046876952
7
- data.tar.gz: 611d9f9179ef9193030991d07fbc8361f1bcba2d6fc909e7317d1f89770ed9deb100d897f0ad5cf6eb601309da43e3502747bcb55883a0302274153b1c637d4d
6
+ metadata.gz: 4db6acc8de7ee6b3e8c2bcff66646fc3b66870950762383483e121adede42dd01e0d733cda4fa614593d84f189db0a8a12680a5175f004097b224271712372a5
7
+ data.tar.gz: 2ed13daa4eca703a8c175478f2afbfb9d30955afdc5435454367cc197b5259f7ce928ef2ad5bf913bf63975aca768cc2b3d642cdf972bfb929bb291130106e7e
@@ -65,14 +65,17 @@ class PrintNodeServer < ProxyServer
65
65
  res = send_post
66
66
  @last_job_success = false
67
67
  @last_job_id = @last_job_output = nil
68
- if match = res.body.match(/<next-job-id>([^<]*)<\/next-job-id>/)
68
+ if match = res.body.match(/<next-job-id[^>]*>([^<]*)<\/next-job-id>/)
69
69
  @last_job_id = match[1]
70
70
  end
71
+ if match = res.body.match(/<next-job-name[^>]*>([^<]*)<\/next-job-name>/)
72
+ @last_job_name = match[1]
73
+ end
71
74
  if match = res.body.match(/<next-job-url>([^<]*)<\/next-job-url>/)
72
75
  url = match[1].gsub("&amp;", "&")
73
76
  path = "/tmp/VaePrintNode-#{@last_job_id}-#{rand.to_s.gsub(".", "")}.pdf"
74
77
  puts "Printing #{url} to #{path}"
75
- puts `chromehtml2pdf --printBackground true --marginLeft 1 --marginRight 1 --marginTop 1 --marginBottom 1 --out "#{path}" #{Shellwords.shellescape(url)}`
78
+ puts `chromehtml2pdf --displayHeaderFooter true --headerTemplate "<div></div>" --footerTemplate "<div style='font-size: 14px; padding-left: 38px'>#{@last_job_name} <span class='pageNumber'></span> / <span class='totalPages'></span></div>" --printBackground true --marginLeft 1 --marginRight 1 --marginTop 1 --marginBottom 1 --out "#{path}" #{Shellwords.shellescape(url)}`
76
79
  if File.exists?(path)
77
80
  @last_job_output = `lp #{path}`
78
81
  Thread.new { sleep 15; FileUtils.rm(path) }
@@ -1 +1 @@
1
- VER = "0.9.4"
1
+ VER = "0.9.5"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vae
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Action Verb, LLC
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2019-04-22 00:00:00.000000000 Z
12
+ date: 2019-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: chunky_png