Sha256: a5add0f6dedc050733c3b21453314254a2ea439e915edc4d436f370085aacdbf

Contents?: true

Size: 758 Bytes

Versions: 3

Compression:

Stored size: 758 Bytes

Contents

module Tigefa
  class Command
    def self.globs(source, destination)
      Dir.chdir(source) do
        dirs = Dir['*'].select { |x| File.directory?(x) }
        dirs -= [destination, File.expand_path(destination), File.basename(destination)]
        dirs = dirs.map { |x| "#{x}/**/*" }
        dirs += ['*']
      end
    end

    # Static: Run Site#process and catch errors
    #
    # site - the Tigefa::Site object
    #
    # Returns nothing
    def self.process_site(site)
      site.process
    rescue Tigefa::FatalException => e
      puts
      Tigefa.logger.error "ERROR:", "YOUR SITE COULD NOT BE BUILT:"
      Tigefa.logger.error "", "------------------------------------"
      Tigefa.logger.error "", e.message
      exit(1)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
tigefa-1.1.3 lib/tigefa/command.rb
tigefa-1.1.2 lib/tigefa/command.rb
tigefa-1.1.1 lib/tigefa/command.rb