diff --git a/Rakefile b/Rakefile index bcfae46..bde93cf 100644 --- a/Rakefile +++ b/Rakefile @@ -11,7 +11,7 @@ $stdout.sync = true $stderr.sync = true # Change to the directory of this file. -Dir.chdir(File.expand_path('../', __FILE__)) +Dir.chdir(File.expand_path(__dir__)) # This installs the tasks that help with gem creation and # publishing. diff --git a/bin/floaty b/bin/floaty index 1a1b0be..5ab2e1f 100755 --- a/bin/floaty +++ b/bin/floaty @@ -1,7 +1,7 @@ #!/usr/bin/env ruby # frozen_string_literal: true -$LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__)) +$LOAD_PATH.unshift(File.expand_path('../lib', __dir__)) require 'vmfloaty' diff --git a/vmfloaty.gemspec b/vmfloaty.gemspec index fcbaaab..455fce0 100644 --- a/vmfloaty.gemspec +++ b/vmfloaty.gemspec @@ -1,6 +1,6 @@ # frozen_string_literal: true -$LOAD_PATH.push File.expand_path('../lib', __FILE__) +$LOAD_PATH.push File.expand_path('lib', __dir__) require 'vmfloaty/version' Gem::Specification.new do |s|