mandy 0.4.4 → 0.4.5

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.
Files changed (2) hide show
  1. data/lib/mandy.rb +4 -1
  2. metadata +1 -1
data/lib/mandy.rb CHANGED
@@ -57,7 +57,10 @@ at_exit do
57
57
  input = Mandy.local_input || ENV['MANDY_INPUT']
58
58
  unless input
59
59
  print "Input file: "
60
- input = gets.chomp
60
+ input = (gets || '').chomp
61
+ end
62
+ if input.nil? or input.size==0 or !File.exists?(input)
63
+ raise "Input file #{input.nil? or input.size==0 ? 'was not provided' : "'#{input}' does not exist"}! Try specifying 'Mandy.local_input=' or if Mandy has launched by mistake then set 'Mandy.autorun = false' to avoid this check."
61
64
  end
62
65
  file = caller
63
66
  output_folder = FileUtils.mkdir_p("/tmp/mandy-local")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mandy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Kent