Sha256: d12a4277ef32a68a35ece3271870b983658b7556f62a381423effaeb62b26c58

Contents?: true

Size: 711 Bytes

Versions: 24

Compression:

Stored size: 711 Bytes

Contents

module Compass::Exec
  module Helpers
    extend self
    def select_appropriate_command_line_ui(arguments)
      if Compass::Commands.command_exists? arguments.first
        SubCommandUI
      else
        SwitchUI
      end
    end
    def report_error(e, options)
      $stderr.puts "#{e.class} on line #{get_line e} of #{get_file e}: #{e.message}"
      if options[:trace]
        e.backtrace[1..-1].each { |t| $stderr.puts "  #{t}" }
      else
        $stderr.puts "Run with --trace to see the full backtrace"
      end
    end

    def get_file(exception)
      exception.backtrace[0].split(/:/, 2)[0]
    end

    def get_line(exception)
      exception.backtrace[0].scan(/:(\d+)/)[0]
    end
  end
end

Version data entries

24 entries across 23 versions & 3 rubygems

Version Path
compass-0.10.0.rc3 lib/compass/exec/helpers.rb
compass-0.10.0.rc2 lib/compass/exec/helpers.rb
compass-0.10.0.rc1 lib/compass/exec/helpers.rb
compass-0.10.0.pre9 lib/compass/exec/helpers.rb
compass-0.10.0.pre8 lib/compass/exec/helpers.rb
compass-0.10.0.pre7 lib/compass/exec/helpers.rb
compass-0.10.0.pre6 lib/compass/exec/helpers.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.9.1/gems/compass-0.10.0.pre4/lib/compass/exec/helpers.rb
middleman-0.13.1 lib/middleman/vendor/gems/ruby/1.8/gems/compass-0.10.0.pre5/lib/compass/exec/helpers.rb
compass-0.10.0.pre5 lib/compass/exec/helpers.rb
compass-0.10.0.pre4 lib/compass/exec/helpers.rb
compass-0.10.0.pre3 lib/compass/exec/helpers.rb
middleman-0.12.2 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/exec/helpers.rb
middleman-0.12.1 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/exec/helpers.rb
middleman-0.12.0.pre3 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/exec/helpers.rb
middleman-0.12.0.pre2 lib/middleman/vendor/gems/gems/compass-0.10.0.pre2/lib/compass/exec/helpers.rb
compass-0.10.0.pre2 lib/compass/exec/helpers.rb
compass-0.10.0.pre1 lib/compass/exec/helpers.rb
compass-edge-0.9.5.0 lib/compass/exec/helpers.rb
compass-edge-0.9.4 lib/compass/exec/helpers.rb