vae 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/vae +1 -0
- data/lib/print_node_server.rb +15 -5
- data/lib/vae_local.rb +1 -1
- data/lib/version.rb +1 -1
- data/node_wrapper/vae.js +9 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92e2ed1ab66a2045e2a3343fa7bdf033a5da5b840affc948407376863ec1f9a5
|
4
|
+
data.tar.gz: 2794d9c0bcdae2cffd28f287887f435b07abd9b454aed6dd598cca64c3e657ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad2a3844af78872f37c640bdf55c827ca3064d9d01bd926010c1f0d35ae0b34a2756dc0e2ae8815bf6c7aee619cb2f4a0ac4348cc6521e51ff0adaf51c4c78cc
|
7
|
+
data.tar.gz: c33eb0e919353a3556a68aaf1514f45ca6e5c0c13e56493772b723fbdb3a6883303fbd4aaa019bcd2afc49d7ffb4a961486300abe09a1129b4f86d902f2654e6
|
data/bin/vae
CHANGED
data/lib/print_node_server.rb
CHANGED
@@ -40,7 +40,10 @@ class PrintNodeServer < ProxyServer
|
|
40
40
|
name: node_name,
|
41
41
|
default_printer: default_printer,
|
42
42
|
printers_list: printers_list,
|
43
|
-
print_queue_status: print_queue_status
|
43
|
+
print_queue_status: print_queue_status,
|
44
|
+
last_job_id: @last_job_id,
|
45
|
+
last_job_success: @last_job_success,
|
46
|
+
last_job_output: @last_job_output
|
44
47
|
}
|
45
48
|
}.to_json
|
46
49
|
}
|
@@ -60,17 +63,24 @@ class PrintNodeServer < ProxyServer
|
|
60
63
|
|
61
64
|
def loop_action
|
62
65
|
res = send_post
|
63
|
-
|
66
|
+
@last_job_success = false
|
67
|
+
@last_job_id = @last_job_output = nil
|
68
|
+
if match = res.body.match(/<next-job-id>([^<]*)<\/next-job-id>/)
|
69
|
+
@last_job_id = match[1]
|
70
|
+
end
|
71
|
+
if match = res.body.match(/<next-job-url>([^<]*)<\/next-job-url>/)
|
64
72
|
url = match[1]
|
65
73
|
path = "/tmp/VaePrintNode-#{rand.to_s.gsub(".", "")}.pdf"
|
66
74
|
puts "Printing #{url} to #{path}"
|
67
|
-
`chromehtml2pdf --marginLeft
|
75
|
+
puts `chromehtml2pdf --marginLeft 1 --marginRight 1 --marginTop 1 --marginBottom 1 --out "#{path}" #{Shellwords.shellescape(url)}`
|
68
76
|
if File.exists?(path)
|
69
|
-
`lp #{path}`
|
77
|
+
@last_job_output = `lp #{path}`
|
70
78
|
Thread.new { sleep 15; FileUtils.rm(path) }
|
71
79
|
else
|
72
|
-
|
80
|
+
@last_job_output = "Error: could not generate PDF!"
|
73
81
|
end
|
82
|
+
@last_job_success = true if @last_job_output =~ /request id/
|
83
|
+
puts @last_job_output
|
74
84
|
end
|
75
85
|
rescue StandardError => e
|
76
86
|
puts e.message
|
data/lib/vae_local.rb
CHANGED
@@ -58,7 +58,7 @@ class VaeLocal
|
|
58
58
|
opts.banner = BANNER + "\n\nUsage: vae [options]\n starts a local development server\n vae [options] deploy\n deploys the source in Git repository or provided URL to the Vae servers\n\n If you are using the Vae Production environment features:\n vae [options] stage\n deploys the source in Git repository or provided URL to the staging environment\n vae [options] stagerelease\n deploys the source in Git repository or provided URL to the staging environment\n and releases it to the production environment\n vae [options] release\n releases the current staging environment to the production environment\n vae [options] rollback\n rolls back the production environment to a previous release\n\nAvailable Options:"
|
59
59
|
opts.on("-u","--username <username>","Your Vae username") { |o| options[:username] = o }
|
60
60
|
opts.on("-P","--password <password>","Your Vae password") { |o| options[:password] = o }
|
61
|
-
opts.on("-p","--port <port number>","Start server on this port") { |o| options[:port] = o.to_i; raise VaeError "Port #{o.to_i} is already in use." unless VaeLocal.port_open?(o.to_i) }
|
61
|
+
opts.on("-p","--port <port number>","Start server on this port") { |o| options[:port] = o.to_i; raise VaeError, "Port #{o.to_i} is already in use." unless VaeLocal.port_open?(o.to_i) }
|
62
62
|
opts.on("-r","--root <path to site root>","Path to the root of the local copy of your Vae site.") { |o| options[:site_root] = o }
|
63
63
|
opts.on("-s","--site <subdomain>","Vae subdomain for this site") { |o| options[:site] = o }
|
64
64
|
opts.on("-f","--full-stack [php|hhvm]","Run in Full Stack Mode. Optionally provide 'php' or 'hhvm' to specify your preferred PHP runtime") { |o| options[:server] = FullStack; options[:php_runtime] = o }
|
data/lib/version.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VER = "0.9.
|
1
|
+
VER = "0.9.1"
|
data/node_wrapper/vae.js
ADDED
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
|
+
version: 0.9.1
|
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-03-
|
12
|
+
date: 2019-03-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: chunky_png
|
@@ -197,6 +197,7 @@ files:
|
|
197
197
|
- lib/vae_local.rb
|
198
198
|
- lib/vae_site_servlet.rb
|
199
199
|
- lib/version.rb
|
200
|
+
- node_wrapper/vae.js
|
200
201
|
- test/vae_test.rb
|
201
202
|
homepage: http://docs.vaeplatform.com/vae_local
|
202
203
|
licenses:
|