victor-cli 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/victor/cli/commands/render.rb +10 -1
- data/lib/victor/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5310277ac8adfa21b11145be6a0ca34b198a9407e8186eb1a54ac5af7da4b685
|
4
|
+
data.tar.gz: fff3d483dbf41ef774a4a3a5f30d6abc72c55919d6516c03dec8d1dfdb0f4c19
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1001b0a3ccd0d48944f3abf93956acf8e524c71e2dd81a9b39dd0ee415197f8ebcf9b29f2f2cada4bef4cba7e910b2865e671ffa7ff2c8cb1b1f28ab3fb65a1e
|
7
|
+
data.tar.gz: 0d3e77e6cd44a095f5d7d45d7130ea2fd685bda224e1d31d1739eb60580216a90ab6be253ca8ae4cbad9ec70f8e57a9e9fdcbdbf50ca6d2c8045982c146fc014
|
@@ -18,11 +18,12 @@ module Victor
|
|
18
18
|
param "SVG_FILE", "Output SVG file. Leave empty to write to stdout"
|
19
19
|
|
20
20
|
example "victor render input.rb output.svg"
|
21
|
+
example "victor render input.rb output.svg --watch"
|
21
22
|
example "victor render input.rb --template minimal"
|
22
23
|
|
23
24
|
def run
|
24
25
|
if args['--watch']
|
25
|
-
|
26
|
+
watch_and_generate
|
26
27
|
else
|
27
28
|
generate
|
28
29
|
end
|
@@ -54,6 +55,14 @@ module Victor
|
|
54
55
|
end
|
55
56
|
end
|
56
57
|
|
58
|
+
def watch_and_generate
|
59
|
+
watch do
|
60
|
+
generate
|
61
|
+
rescue Exception => e
|
62
|
+
say! "!undred!#{e.class}!txtrst!\n#{e.message}"
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
57
66
|
def file_watcher
|
58
67
|
@file_watcher ||= Filewatcher.new(ruby_file, immediate: true)
|
59
68
|
end
|
data/lib/victor/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: victor-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Danny Ben Shitrit
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-10-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: filewatcher
|