forked from nanoc/nanoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nanoc.rb
54 lines (50 loc) · 1.35 KB
/
nanoc.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
module Nanoc
# @return [String] A string containing information about this Nanoc version
# and its environment (Ruby engine and version, Rubygems version if any).
#
# @api private
def self.version_information
gem_info = defined?(Gem) ? "with RubyGems #{Gem::VERSION}" : 'without RubyGems'
engine = defined?(RUBY_ENGINE) ? RUBY_ENGINE : 'ruby'
res = ''
res << "Nanoc #{Nanoc::VERSION} © 2007-2017 Denis Defreyne.\n"
res << "Running #{engine} #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) on #{RUBY_PLATFORM} #{gem_info}.\n"
res
end
# @return [Boolean] True if the current platform is Windows, false otherwise.
#
# @api private
def self.on_windows?
RUBY_PLATFORM =~ /windows|bccwin|cygwin|djgpp|mingw|mswin|wince/i
end
end
# Load external dependencies
require 'hamster'
require 'ref'
require 'ddplugin'
# Load general requirements
require 'digest'
require 'enumerator'
require 'fiber'
require 'fileutils'
require 'forwardable'
require 'pathname'
require 'pstore'
require 'set'
require 'singleton'
require 'tempfile'
require 'thread'
require 'time'
require 'yaml'
require 'uri'
require 'English'
# Load Nanoc
require 'nanoc/version'
require 'nanoc/base'
require 'nanoc/checking'
require 'nanoc/deploying'
require 'nanoc/extra'
require 'nanoc/data_sources'
require 'nanoc/filters'
require 'nanoc/helpers'
require 'nanoc/rule_dsl'