From ac141413b0582e0a1d71509127f6fa72c12a10b4 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Thu, 24 Aug 2017 20:30:17 +0200 Subject: [PATCH] Define path with __dir__ --- jekyll-seo-tag.gemspec | 2 +- spec/spec_helper.rb | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/jekyll-seo-tag.gemspec b/jekyll-seo-tag.gemspec index e6269cc..4dddf8c 100644 --- a/jekyll-seo-tag.gemspec +++ b/jekyll-seo-tag.gemspec @@ -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" diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 81ab4ab..df976f1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -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 = {