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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c9131b3ef1b179385c510630bc7c14407b72f4f0857bd1f2ae9fd8f493c0871
4
- data.tar.gz: 4c67b9435f4aba166207f4811341a258cc98eb19a5900e5489c7efaa6499db69
3
+ metadata.gz: 5310277ac8adfa21b11145be6a0ca34b198a9407e8186eb1a54ac5af7da4b685
4
+ data.tar.gz: fff3d483dbf41ef774a4a3a5f30d6abc72c55919d6516c03dec8d1dfdb0f4c19
5
5
  SHA512:
6
- metadata.gz: a5dc91865331fef5f231e2d66192a561156955c1000fa1377d850fe649431b24f3c218ddea06d16e2f17da4a599db4a3b1378415a21dffe33d60a00c0ee40aac
7
- data.tar.gz: 61f002991c4b896c7e4cc221540a83d2f1cde375c120997401f3a2126404cb500efee44b57edc7581ec940f44435884c957cd5b08ddeb6dfcae89efaf3bafa2a
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
- watch { generate }
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
@@ -1,5 +1,5 @@
1
1
  module Victor
2
2
  module CLI
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.4"
4
4
  end
5
5
  end
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.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-09-09 00:00:00.000000000 Z
12
+ date: 2022-10-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: filewatcher