Sha256: a3adb1bcdf45c2db58371245b20bd62cfc443a43608a6b2105bb8a7226104679

Contents?: true

Size: 952 Bytes

Versions: 1

Compression:

Stored size: 952 Bytes

Contents

module Nanoc
  VERSION = '1.3.1'

  def self.ensure_in_site
    unless in_site?
      $stderr.puts 'ERROR: The current working directory does not seem to ' +
        'be a valid/complete nanoc site directory; aborting.' unless $quiet
      exit
    end
  end

  private

  def self.in_site?
    return false unless File.directory?('content')
    return false unless File.directory?('layouts')
    return false unless File.directory?('lib')
    return false unless File.directory?('output')
    return false unless File.directory?('tasks')
    return false unless File.directory?('templates')
    return false unless File.exist?('config.yaml')
    return false unless File.exist?('meta.yaml')
    return false unless File.exist?('Rakefile')

    true
  end
end

require File.dirname(__FILE__) + '/page.rb'
require File.dirname(__FILE__) + '/creator.rb'
require File.dirname(__FILE__) + '/compiler.rb'
require File.dirname(__FILE__) + '/enhancements.rb'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
nanoc-1.3.1 lib/nanoc.rb