Merge pull request #232 from jekyll/define-path-with-__dir__

Define path with __dir__
This commit is contained in:
Ben Balter 2017-08-24 14:40:08 -04:00 committed by GitHub
commit a5463b175c
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
# coding: utf-8
lib = File.expand_path("../lib", __FILE__)
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "jekyll-seo-tag/version"

View File

@ -1,4 +1,4 @@
$LOAD_PATH.unshift File.expand_path("../../lib", __FILE__)
$LOAD_PATH.unshift File.expand_path("../lib", __dir__)
require "jekyll"
require "jekyll-seo-tag"
require "html-proofer"
@ -15,11 +15,11 @@ end
ENV["JEKYLL_LOG_LEVEL"] = "error"
def dest_dir
File.expand_path("../tmp/dest", File.dirname(__FILE__))
File.expand_path("tmp/dest", __dir__)
end
def source_dir
File.expand_path("./fixtures", File.dirname(__FILE__))
File.expand_path("./fixtures", __dir__)
end
CONFIG_DEFAULTS = {