Define path with __dir__

This commit is contained in:
Frank Taillandier 2017-08-24 20:30:17 +02:00
parent 9dc5b01b45
commit ac141413b0
No known key found for this signature in database
GPG Key ID: E73258E3F50AEB7E
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 = {