Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jekyll-redirect-from.gemspec
Original file line number Diff line number Diff line change
@@ -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-redirect-from/version"

Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll-redirect-from/layout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module JekyllRedirectFrom
class Layout < Jekyll::Layout
def initialize(site)
@site = site
@base = File.dirname(__FILE__)
@base = __dir__
@name = "redirect.html"
@path = File.expand_path(@name, @base)
@relative_path = "_layouts/redirect.html"
Expand Down
2 changes: 1 addition & 1 deletion spec/jekyll_redirect_from/layout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
end

it "exposes the path" do
expected = File.expand_path "../../lib/jekyll-redirect-from/redirect.html", File.dirname(__FILE__)
expected = File.expand_path "../../lib/jekyll-redirect-from/redirect.html", __dir__
expect(subject.path).to eql(expected)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
end

def fixtures_path
Pathname.new(__FILE__).parent.join("fixtures")
Pathname.new(__dir__).join("fixtures")
end

def dest_path
Expand Down