haml-edge 3.1.61 → 3.1.62

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 (4) hide show
  1. data/EDGE_GEM_VERSION +1 -1
  2. data/VERSION +1 -1
  3. data/lib/haml/exec.rb +10 -3
  4. metadata +1 -1
data/EDGE_GEM_VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.61
1
+ 3.1.62
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.61
1
+ 3.1.62
data/lib/haml/exec.rb CHANGED
@@ -161,7 +161,7 @@ module Haml
161
161
  raise err if @options[:trace] || dep.nil? || dep.empty?
162
162
  $stderr.puts <<MESSAGE
163
163
  Required dependency #{dep} not found!
164
- Run "gem install #{dep}" to get it.
164
+ Run "gem install #{dep}" to get it.
165
165
  Use --trace for backtrace.
166
166
  MESSAGE
167
167
  exit 1
@@ -388,6 +388,12 @@ END
388
388
  ::Sass::Plugin.options.merge! @options[:for_engine]
389
389
  ::Sass::Plugin.options[:unix_newlines] = @options[:unix_newlines]
390
390
 
391
+ raise <<MSG if @args.empty?
392
+ What files should I watch? Did you mean something like:
393
+ sass --watch input.sass:output.css
394
+ sass --watch input-dir:output-dir
395
+ MSG
396
+
391
397
  if !colon_path?(@args[0]) && probably_dest_dir?(@args[1])
392
398
  flag = @options[:update] ? "--update" : "--watch"
393
399
  err =
@@ -396,9 +402,9 @@ END
396
402
  elsif @args[1] =~ /\.css$/
397
403
  "is a CSS file"
398
404
  end
399
- msg = <<MSG if err
405
+ raise <<MSG if err
400
406
  File #{@args[1]} #{err}.
401
- Did you mean: sass #{flag} #{@args[0]}:#{@args[1]}
407
+ Did you mean: sass #{flag} #{@args[0]}:#{@args[1]}
402
408
  MSG
403
409
  end
404
410
 
@@ -456,6 +462,7 @@ MSG
456
462
  # Whether path is likely to be meant as the destination
457
463
  # in a source:dest pair.
458
464
  def probably_dest_dir?(path)
465
+ return false unless path
459
466
  return false if colon_path?(path)
460
467
  return Dir.glob(File.join(path, "*.s[ca]ss")).empty?
461
468
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-edge
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.61
4
+ version: 3.1.62
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Weizenbaum